HTML5

HTML 5 – Using attribute ‘id’ instead of attribute ‘name’ for Anchors

HTML 5As discussed on stackoverflow.com HTML Anchors with ‘name’ or ‘id’?

According to the HTML 5 specification, we should use id attribute instead of name for anchors.

Right:

<a id="anchorname"></a>
<h1 id="anchorname">TEXT</h1>

Wrong:

<a name="anchorname"></a>

Insisting on using name attribute might cause many problems, such as “browser not scrolling to the right anchor position

So, I recommend every users of Easy Smooth Scroll Links WordPress Plugin do an urgent update on your previous anchor texts.

Here is a quick way to achieve this:

  1. Install this plugin  Search and Replace
  2. Backup your database
  3. Do as the following screenshot shows:Using attribute id instead of attribute name for Anchors

 

 

 

  2Comments

  1. Anders Sundstedt   •  

    Great article and I love your plugin ESSL!

    Having an small issue right now that some pages do not slide and some do.

    Looking into it….

    Thanks,

    Anders

  2. nesly   •  

    Ever since I updated to version 2.0 the plugin has stopped working. My test site test.clearconnector.com works fine (this uses version 1.9)

    clearconnector.com uses 2.0 and doesnt work. I tried replacing with at the anchor and it still doesnt work.

    Whats going on here?

Leave a Reply

Your email address will not be published. Required fields are marked *