NikMac Posted October 4, 2009 Share Posted October 4, 2009 Hi, sorry if this seems simple - I've started learning HTML and CSS and the w3schools tutorial wasn't clear about this.Is it required to have a "title" attribute after all links? For example: <a href="/" title="Home">HOME</a> Would there be any problems if I removed the title attribute? Or changed it to title="" ? What are the advantages of having a title?Also, when linking to pages in my website.... does it matter if my code links to www.example.com or is it okay to have href="/" as in the example above? Should I use <a href="www.example.com/about.html"> or <a href="/about.html">? Should I add a slash to the end of links (a href="/about.html/")?Many thanks. Link to comment Share on other sites More sharing options...
jlhaslip Posted October 4, 2009 Share Posted October 4, 2009 The "title" attribute is what displays when a client 'hovers' over the link. They are suggested to be there for all links. It adds information about the link. You can use it to describe the link and promote clicks on it.If the link is to your own site, you do not need the http://domain.com/ part. Check out relative and absolute linking. You do not need the slash after the html part. Link to comment Share on other sites More sharing options...
Synook Posted October 4, 2009 Share Posted October 4, 2009 It's not invalid not to have a title attribute, though. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.