Jump to content

Quick Question About Links


NikMac

Recommended Posts

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

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...