0
What to give as href for same page paragraph ?
3 Answers
+ 6
For a link on the same page you use the id of the tag/element that you wish to link to in your <a> anchors href attribute.
<p id="para">...</p>
...
...
...
<a href="#para">...</a>
+ 4
@Dima I don't think anybody said anything about using the whole paragraph as the link. What this does is links from somewhere else on the same page back to that paragraph. Just like you see on some pages where when you scroll down to the bottom of the page where there is a link to take you back to the top.
0
What for? You can probably put text of the whole paragraph to "a" tag... but the whole paragraph as a link will look ugly dont you think? Just put it to the end of the text...