Difference between title and name in html href element

in href in html what is the difference between using

<a href="http://www.somesite.com/" name="The Name"> 

and

 <a href="http://www.somesite.com/" title="The Name"> 

Is there an advantage to using one over the other?

thanks

+4
source share
2 answers

Look at the specification, or better yet, a resource that slightly condenses the specification. (And, then spec, if that is not enough.)

 title text Specifies extra information about an element 

http://www.w3schools.com/tags/tag_a.asp

The name attribute indicates the name of the anchor.

The name attribute is used to create bookmarks within the document.

The href or name attribute must be present in the tag

http://www.w3schools.com/tags/att_a_name.asp

So, the binding name is used for links like exampledomain.com/index.php#some_section , which will cause the binding to focus on the page.

Many modern browsers will display the title attribute in a tooltip when they hang on the link. It is probably also useful for screen reading, etc.

+4
source

Node markup tag - Name is the identification of the element and search - title is the default toolTip property. like alt

+2
source

All Articles