Skip to main content

HTML Guide

Free site validation

Find out what web pages on your sites are affected by HTML issues.

Bad value “button” for attribute “role” on element “li”.

A <li> element, used to define a list item, does not accept the button role.

This HTML code is invalid because the <li> elements can’t have role="button":

  <li role="button">One</li>
  <li role="button">Two</li>

Learn more:

Related W3C validator issues