I'd like to know if it's possible to add an HTML anchor in a Stack Overflow answer or question.
For example, I made an edit in an answer and I put a link named "See the edit" redirecting to the Edit part of my answer.
Example of answer : (The following is not a real issue, I don't care about the code, I found it randomly. It's just for the example.)
Start of the example
This code is outdated, see the edit.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin gravida enim ex, eu luctus nibh fermentum a. Morbi ullamcorper nisi sit amet erat placerat, at posuere ex vestibulum. Pellentesque eget lacus rhoncus, iaculis dui a, tincidunt purus. Morbi eleifend ultricies sapien, ac laoreet sem fermentum vel. Pellentesque ultricies ligula eget nisi bibendum molestie at eu nulla. In id consequat mi. Sed vitae arcu ac nisl rutrum facilisis. Mauris ut ipsum eros. Nam fermentum risus ut euismod sagittis. Sed sem nibh, accumsan quis nisi et, pulvinar condimentum sapien. Curabitur quis pulvinar mi, sed dapibus eros. Nam euismod venenatis enim, vitae maximus nisl. Etiam in nisi ullamcorper, placerat enim a, blandit erat. Mauris vestibulum volutpat urna ac porttitor. Donec congue nisi ac maximus gravida.
Here's a few code :
Dim currentCaption As String
Dim lastCaption As String
Dim message As String
message = "This is scrolling text"
currentCaption = Combo1.Text
currentCaption = Right(currentCaption, Len(currentCaption) - 1)
Combo1.Text = currentCaption & Space(10) & message
EDIT :
I forgot one condition... Here's a working code:
Dim currentCaption As String
Dim lastCaption As String
Dim message As String
message = "This is scrolling text"
currentCaption = Combo1.Text
If Len(currentCaption) <> Len(message) Then
currentCaption = Right(currentCaption, Len(currentCaption) - 1)
Combo1.Text = currentCaption & Space(10) & message
Else
Combo1.Text = Combo1.Text & Space(10) & message
End If
End of the example
Can I use the id=""
attribute?
If yes, how?
Because I tried but it wasn't working. I noticed that when I click on a notification it redirects me to a link of the question with an anchor. (i.e. http://meta.stackoverflow.com/questions/303420/is-it-possible-to-add-html-anchor-in-a-stackoverflow-answer/
303422?noredirect=1#comment238163_303422
)
<a id="something"></a>
within your answer, so you can link to specific parts of your answer usinghttp://stackoverflow.com/youranswer#something
?