yandoo Posted January 13, 2013 Share Posted January 13, 2013 Hiya I was wondering how the correct way to have a hyperlink of some text that is also anchored from somewhere else.. e.g. <h1><a id="SomeText Anchored"><a href="SomeText.html" class="TitleText">Some Text</a></a></h1> The above works but im not sure if its good practice? Thanks Link to comment https://forums.phpfreaks.com/topic/273093-hyperlink-that-is-also-the-anchor/ Share on other sites More sharing options...
requinix Posted January 13, 2013 Share Posted January 13, 2013 You could just stick the ID on the H1... Link to comment https://forums.phpfreaks.com/topic/273093-hyperlink-that-is-also-the-anchor/#findComment-1405337 Share on other sites More sharing options...
yandoo Posted January 13, 2013 Author Share Posted January 13, 2013 Thanks for reply.. So you mean <h1 id="SomeText"> and without the need for the (a or </a>)? I didnt know that was possible... Thanks ever so much Link to comment https://forums.phpfreaks.com/topic/273093-hyperlink-that-is-also-the-anchor/#findComment-1405339 Share on other sites More sharing options...
requinix Posted January 14, 2013 Share Posted January 14, 2013 Anchors will work on anything that has an ID - doesn't have to be an element. Link to comment https://forums.phpfreaks.com/topic/273093-hyperlink-that-is-also-the-anchor/#findComment-1405618 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.