Overview of HTML5 and HTML5 Features
Hello Guys,
In this article, We will learn about the overview of HTML5 and HTML5 Features
HTML5 is the latest specification of HTML language, which represents a major breakthrough with previous markup practice. The purpose of making profound changes to the language is to standardize many new ways developers use it and encourage a set of best practices related to web development.
Most individual changes are the result of larger goals in language design. These goals mainly include:
1.VIDEO
The video element allows you to easily stream video from the website.
In the above HTML, the width and height set the size of the video element. The controls attribute creates playback buttons, such as "Play" and "Pause". The source src tag provides the URL of the hosted video, and type specifies the type of video, in this case "video/mp4".
2. FIGURE
Figure elements can be used to display visual content, such as photos, illustrations, diagrams or code snippets.
In the example code above,
3. SECTION
Above, a
Above, the
Above, between
In this article, We will learn about the overview of HTML5 and HTML5 Features
What is HTML5?
![]() |
HTML 5 |
HTML5 is the latest specification of HTML language, which represents a major breakthrough with previous markup practice. The purpose of making profound changes to the language is to standardize many new ways developers use it and encourage a set of best practices related to web development.
Most individual changes are the result of larger goals in language design. These goals mainly include:
- Encourage semantic (meaningful) markup
- Separate design from content
- Promote accessibility and design responsiveness
- Reduce the overlap between HTML, CSS, and JavaScript
- Support rich media experiences without plug-ins like Flash or Java
- Understanding HTML5 is not only about understanding which CSS features can replace old HTML features. If you want to understand HTML5 intuitively, it is best to understand how these goals affect the development of the language.
1.VIDEO
The video element allows you to easily stream video from the website.
<video width="450px" height="350px" controls>
<source src="video-url.mp4" type="video/mp4">
</video>
In the above HTML, the width and height set the size of the video element. The controls attribute creates playback buttons, such as "Play" and "Pause". The source src tag provides the URL of the hosted video, and type specifies the type of video, in this case "video/mp4".
2. FIGURE
Figure elements can be used to display visual content, such as photos, illustrations, diagrams or code snippets.
<figure class="gallery-item">
<img src="image-1.png">
</figure>
<figure class="gallery-item">
<img src="image-2.png">
</figure>
In the example code above,
figure
elements have the class “gallery-item”, and each contains an img
element.3. SECTION
Section elements, like divs, can be used to organize webpage content into thematic groups.
<section class="contact-form">
<h2>Contact Us</h2>
<form>
...
</form>
</section>
Above, a
section
element is used to organize h2
and form
elements for a website’s “Contact Us” feature
4. NAV
The nav element is used for the part of a website that links to other pages on the site. The links can be organized a number of ways. Below, the links are displayed within paragraph elements. An unordered list could also be used.
<nav>
<p><a href="login.html">Log In</a></p>
<p><a href="signup.html">Sign Up</a></p>
<p><a href="contact.html">Contact Us</a></p>
</nav>
5.HEADER
The header element can be used to group together introductory elements on a website, such as a company logo, navigation items, and sometimes, a search form.
<header>
<img src="company-logo.png">
<nav>
<p><a href="login.html">Log In</a></p>
<p><a href="signup.html">Sign Up</a></p>
<p><a href="contact.html">Contact Us</a></p>
</nav>
</header>
Above, the
header
element encloses the img
and nav
.
5. FOOTER
The footer element is typically found at the bottom or foot of a webpage. It can contain copyright information, links to social media and additional site navigation items.
<footer>
<p>© Acme Granola Corporation 2016<p>
<div class="social">
<a href="#"><img src="instagram-icon.png"></a>
<a href="#"><img src="facebook-icon.png"></a>
<a href="#"><img src="twitter-icon.png"></a>
</div>
</footer>
Above, between
<footer>
and </footer>
, copyright information is contained in the p
element and social media links are contained within the div
with class “social”.
Recourses : Codecademy
Comments
Post a Comment