Invalid HTML Examples


Missing title attribute in abbr.

The USA is a country in North America.


Hidden content, with style="display: none".


The figcaption not first/last child of figure.

Example image
Image description

(This paragraph is :last-child.)


More than one figcaption per figure. Image with missing src.

Image description
(Image source omitted)
Image description

Caption is not a child of figure.

This figcaption lacks a figure parent.

External link to non-HTTPS site.

Example link


Link with target="_blank" that lacks rel="noopener noreferrer".

Example link


Invalid child of ol.

  1. Valid item within list.

  2. Invalid item within list.


Invalid child of ul.


  • li without parent ol or ul.


  • dd - Definition list: Definition
    dt - Definition list: Term
    dd - Definition list: Definition

    Invalid item within list.

    dd - Definition list: Definition
    dt - Definition list: Term
    dd - Definition list: Definition

    Invalid item within list.

    dt without correct parent.
    dd without correct parent.
    dt without correct parent.
    dd without correct parent.

    Radios without name="…"

    Checkboxes with/without nesting

    This paragraph is :first-child.

    This legend is not :first-child.


    Table with role="presentation"

    Table nested inside another table

    Table with invalid col values.

      Uno Dos
    Foo: Value 1 Value 2
    Foo: Value 1 Value 2

    Empty div.


    Improperly nested div, inside span.

    Improperly nested div, inside p.


    Needless nesting of div tags.