Why we use semantic elements in html5








Semantic tags mean tags with meaning understood already.
A semantic elements defines meaning to all either they are users or software developer etc.
HTML5 offers new semantic elements to clearly define different parts of a web page:


what is meaning of semantic elements in html5

Now all modern browsers support all html5 tags .

The <section> element defines a section in a document.
Below is an alphabetical list of the new semantic elements in HTML5.
Tag Description
<article> Defines an article
<aside> Defines content aside from the page content
<details> Defines additional details that the user can view or hide
<figcaption> Defines a caption for a <figure> element
<figure> Specifies self-contained content, like illustrations, diagrams, photos, code listings, etc.
<footer> Defines a footer for a document or section
<header> Specifies a header for a document or section
<main> Specifies the main content of a document
<mark> Defines marked/highlighted text
<nav> Defines navigation links
<datalist> Defines pre-defined options for input controls
<keygen> Defines a key-pair generator field (for forms)
<output> Defines the result of a calculation
<section> Defines a section in a document
<summary> Defines a visible heading for a <details> element
<time> Defines a date/time
<canvas> Defines graphic drawing using JavaScript

Audio support tags with their meaning :

WebM = WebM files with VP8 video codec and Vorbis audio codec

Ogg = Ogg files with Theora video codec and Vorbis audio codec

MP4 = MPEG 4 files with H264 video codec and AAC audio codec

How to use audio tags in html5

HTML5 defines a new element which specifies a standard way to embed an audio file on a web page: the <audio> element

<audio> src=”my.mp3″ type=”audio/mpeg”</audio>

<audio> src=”my.wav” type=”audio/wav”</audio>

<audio> src=”my.ogg” type=”audio/ogg”</audio>