HTML <header> Tag

Definition and Usage

The <header> element represents a container for introductory content or a set of navigational links.

<header> element typically contains:

Example

Result

A heading here

Posted by John Doe

Some additional information here

Lorem Ipsum dolor set amet.

 

CSS Navigation Bars

A navigation bar is an important component of web design.

Navigation bars helps users to easily navigate between different sections of a website.

Navigation bars are typically built with HTML list elements ( <ul> and <li>), and then styled with CSS to get a great look.

A navigation bar is typically located at the top or at the side of a webpage.

 

Navigation Bar = List of Links

A navigation bar is basically a list of links, so using the HTML <ul> and <li> elements makes perfect sense:

Example

Result

Basic HTML code for Navbar

Note: We use href=”#” for links. In a real website this would be URLs.

 

Now let’s remove the bullets and the margins and padding from the <ul> element:

Example explained:

 

HTML <main> Tag

Definition and Usage

The <main> tag specifies the main content of a document.

The content inside the <main> element should be unique to the document. It should not contain any content that is repeated across documents such as sidebars, navigation links, copyright information, site logos, and search forms.

Example

Result

The main element

Most Popular Browsers

Chrome, Firefox, and Edge are the most used browsers today.

Google Chrome

Google Chrome is a web browser developed by Google, released in 2008. Chrome is the world’s most popular web browser today!

Mozilla Firefox

Mozilla Firefox is an open-source web browser developed by Mozilla. Firefox has been the second most popular web browser since January, 2018.

Microsoft Edge

Microsoft Edge is a web browser developed by Microsoft, released in 2015. Microsoft Edge replaced Internet Explorer.

 

HTML <section> Tag

Definition and Usage

The <section> tag defines a section in a document.

Example

Result

The section element

WWF History

The World Wide Fund for Nature (WWF) is an international organization working on issues regarding the conservation, research and restoration of the environment, formerly named the World Wildlife Fund. WWF was founded in 1961.

WWF’s Symbol

The Panda has become the symbol of WWF. The well-known panda logo of WWF originated from a panda named Chi Chi that was transferred from the Beijing Zoo to the London Zoo in the same year of the establishment of WWF.

 

HTML <article> Tag

Definition and Usage

The <article> tag specifies independent, self-contained content.

An article should make sense on its own and it should be possible to distribute it independently from the rest of the site.

Potential sources for the <article> element:

Example

Result

The article element

Google Chrome

Google Chrome is a web browser developed by Google, released in 2008. Chrome is the world’s most popular web browser today!

Mozilla Firefox

Mozilla Firefox is an open-source web browser developed by Mozilla. Firefox has been the second most popular web browser since January, 2018.

 

HTML <aside> Tag

Definition and Usage

The <aside> tag defines some content aside from the content it is placed in.

The aside content should be indirectly related to the surrounding content.

Tip: The <aside> content is often placed as a sidebar in a document.

 

Example

Result

The aside element

My family and I visited The Epcot center this summer. The weather was nice, and Epcot was amazing! I had a great summer together with my family!

HTML <footer> Tag

The <footer> tag is used to define the footer section of a webpage or a section. It usually contains information like copyright, contact details, links, or author information.

The footer typically appears at the bottom of a webpage.

Example

Common Uses of <footer>

The <footer> section often contains:

 

HTML Layout Elements

HTML has several semantic elements that define the different parts of a web page:

HTML5 Semantic Elements
  • <header> – Defines a header for a document or a section
  • <nav> – Defines a set of navigation links
  • <section> – Defines a section in a document
  • <article> – Defines independent, self-contained content
  • <aside> – Defines content aside from the content (like a sidebar)
  • <footer> – Defines a footer for a document or a section