W3C home > Mailing lists > Public > www-validator@w3.org > March 2013

Re: [VE][html5] Add Subject Here

From: Jukka K. Korpela <jkorpela@cs.tut.fi>
Date: Wed, 20 Mar 2013 16:24:19 +0200
Message-ID: <5149C693.3020508@cs.tut.fi>
To: mariannanaak@googlemail.com
CC: "www-validator@w3.org" <www-validator@w3.org>
2013-03-20 15:05, mariannanaak@googlemail.com wrote:

> Validating http://baku.inf-d.de/ws12ba70/indext.html
> Error [html5]: "Error Line 54, Column 25: Duplicate ID navigation_main.
> |<ul id="navigation_main">|

The id attribute value must be unique within a document. In this case, 
the same value is used several times.

This is one of the most useful checks that validators perform. If an id 
value is not unique, strange things may happen, especially in scripting.

Since the style sheet seems to use #navigation_main, probably with the 
intent that rules are applied all elements with that id, the simplest 
solution is probably to change the id attribute to a class attribute, 
class="navigation_main", and use class selector .navigation_main instead 
of id selector #navigation_main.

Things get more complicated if the id attribute is also used in scripting.

Received on Wednesday, 20 March 2013 14:24:49 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 1 March 2016 14:18:08 UTC