Skip to main content

HTML Guide

Free site validation

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

The “banner” role is unnecessary for element “header”.

The <header> HTML element represents introductory content, typically a group of introductory or navigational aids, and has an implicit role of banner, so specifying this role is redundant.

The following example represents a banner using the role attribute:

<div role="banner">
  <img src="companylogo.svg" alt="my company name" />

By default, the HTML5 <header> element has an identical meaning to the banner landmark, unless it is a descendant of <aside>, <article>, <main>, <nav>, or <section>, at which point <header> is the heading for that section and not the equivalent of the site-wide banner.

This example uses the <header> element instead of the banner role:

  <img src="companylogo.svg" alt="my company name" />

Related W3C validator issues