What are the HTML5 New Tags?

Learn via video course
FREE
View all courses
JavaScript Course With Certification: Unlocking the Power of JavaScript
JavaScript Course With Certification: Unlocking the Power of JavaScript
by Mrinal Bhattacharya
1000
4.8
Start Learning
JavaScript Course With Certification: Unlocking the Power of JavaScript
JavaScript Course With Certification: Unlocking the Power of JavaScript
by Mrinal Bhattacharya
1000
4.8
Start Learning
Topics Covered

HTML5 is an upgraded version of HTML 4.01. New elements are added in HTML5 to write easy and fast code to create complex, dynamic, engaging, and effective websites. These new elements add advanced functional features, improvised page layouts, and other improvements. The commonly used new HTML5 tags are <figure>, <article>, <header>, <main>,<footer>, <nav>, and <section>.

some-html5-new-tags

HTML5 New Tags

HTML5 Structural or Semantic Tags

As the name suggests, the new semantic elements are used to define the structure of different parts of a web page.

TAGFUNCTION
<article>Used to specify a portion of a page that includes an independent piece of content in a document, section, or website.
<aside>Used to indicate that the specified article is somehow related to the rest of the document but is kept aside. It is mainly used for extra information in main content like links, sidebars, and ads.
<data>Used to facilitate a machine-readable version of the data.
<details>Used to define any additional information on a topic or a summary.
<dialog>Used to include a dialog box in webpage.
<figcaption>Used to specify a caption for a <figure> element.
<figure>Used to indicate content like photos, diagrams, categorizations, maps, images, code articles, etc.
<footer>Used to specify a footer for a section Information like copyright, and author name are mentioned here.
<header>Used to specify a header for a section.
<main>Used to specify the main content or important section of a document.
<mark>Used to mark or highlight the specified content with a background color.
<menuitem>Used to specify a command that the user can invoke from a popup menu.
<meter>Used to determine a scalar/fractional value within a given range.
<nav>Used to specify a navigation link in a webpage.
<rp>Used to include parentheses in a ruby character.
<rt>Used to indicate the pronunciation of ruby characters.
<ruby>Used to specify a ruby annotation along with <rp> and <rt>. Ex: Japanese characters
<section>Used to define a specific section in a webpage.
<summary>Used as a subpart of the <details> tag which displays hidden text on clicking the heading.
<time>It displays human-readable date/time within a webpage.

Example

Output

html5-structural-tags

HTML5 Text-level Tags

TAGFUNCTION
<bdi>Bdi stands for Bi-Directional Isolation. It is used to isolate part of the text that might be formatted in a different direction from other text.
<wbr>It refers to a possible line break in the text. It is mainly used in the case of long words to avoid the browser from making line breaks at the wrong place.

Example

Output

html5-text-level-tags

HTML5 Form Tags

HTML5 has multiple new input types, attributes, and other elements. Some of the newly introduced HTML5 form tags are as follows.

TAGFUNCTION
<datalist>It is used to facilitate an auto-complete feature for the text field.
<output>It is used to represent the type of output of a calculation or outcome of a user action.
<keygen>It is used to specify a key-pair generator field (for forms) to authenticate users and provide security.
<progress>It presents a progress bar to track the task progress.

Example

Output

html5-form-tags

HTML5 Graphics Tags

The Graphics tags allow developers to add graphics and make a bland website presentable. The graphic tags in HTML5 are as follows.

TAGFUNCTION
<canvas>It is used to draw canvas, graphics and animations using JavaScript.
<svg>It is used to draw vector graphics and display shapes.

Example

Output

html5-graphics-tags

HTML5 Media Tags

The media tags used to enhance a HTML webpage are <audio>, <source>, <track>, <video>, and <embed>.

TAGFUNCTION
<audio>It is used to insert a sound file into the webpage.
<embed>It is used as a container to embed external files/applications/media. It only has the starting tag.
<source>It refers to multiple media resources for the media elements.
<track>It refers to text tracks for <audio> and <video> files.
<video>It is used to insert video content (like movie clips) within an HTML document.

Example

Output

html5-media-tags

More Relaxed Attribute Syntax

In HTML5, attribute values can be represented by single or double quotes or without either (in the case of single-word entries). Attributes without a value (example - disabled) don’t require equals or quotes.

Example

Output

html5-disabled-button.webp

The HTML5 Declaration

The declaration is not an HTML tag. It refers to the version of the HTML page. The declaration is the first line of the HTML document, which is placed before the opening <html> tag.

Syntax

Code Examples of the above New HTML5 Elements

Code

Output

html5-new-tags-output

HTML5 New Way of Declaring Attributes

HTML5 New <input> Types

HTML5 has introduced developers to numerous new <input> types.

TypeFunction
colorInput field with a specific color. It supports hexadecimal values.
dateInput field for date selection.
datetime-localInput field for a date without a time zone.
emailInput field for an email address.
monthInput month and year, (without time zone).
numberInput field to enter a number.
urlField for URL.
weekField to enter the date with week-year, (without time zone).
searchSingle line text field to search for a string.
telInput field to enter the telephone number.
rangeThe input specifies a range of values.

HTML5 Codes for the Above Input Types are as Below

Example

Output

html5-new-input-types-tags-output

Browser Support

ElementChromeFirefoxInternet ExplorerOperaSafari
<article>YesYesYesYesYes
<aside>YesYesYesYesYes
<bdi>YesYesNoNoNo
<details>YesNoYesYesYes
< dialog>YesYesNoYesNo
<figure>YesYesYesYesYes
<footer>YesYesYesYesYes
<header>YesYesYesYesYes
<main> YesYesYesYesYes
<mark>YesYesYesYesYes
<meter>YesYesYesYesYes
<nav>YesYesYesYesYes
<progress>YesYesYesYesYes
<ruby> YesYesYesYesYes
<rp>YesYesYesYesYes
<rt>YesYesYesYesYes
<section>YesYesYesYesYes
<summary>YesYesNoYesYes
<time> YesYesYesYesYes
<wbr>YesYesYesYesYes
<datalist>YesYesYesYesYes
<output>YesYesYesYesYes
<canvas>YesYesYesYesYes
<audio>YesYesYesYesYes
<embed>YesYesYesYesYes
<source>YesYesYesYesYes
<track>YesYesYesYesYes
<video>YesYesYesYesYes

Conclusion

  • HTML5 is an upgraded version of HTML 4.01.The new HTML5 elements come in handy for various kinds of development tasks.
  • The new tags can be classified into:
    • HTML5 Structural or Semantic Tags
    • HTML5 Text-level Tags
    • HTML5 Form Tags
    • HTML5 Graphic Tags
    • HTML5 Media Tags
  • New <input> types have been introduced in HTML5. For example - date, color, url, email, month etc.
  • The new HTML5 elements add special features to make highly interactive websites with friendly interfaces, higher performance rates, and efficient outcomes.