Introduction to HTML5. This simple tutorial is for Newbies/Beginners, who are just starting off with HTML5.
<nav></nav>
<article></article>
<summary></summary>
<footer></footer> etc...
<input type="tel" placeholder="Input your telephone number here" >
<input type="email" placeholder="Enter your email id here" >
<input type="range" >
<audio></audio>
<canvas></canvas>
Geo location etc
All the above will be explained in my next tutorial "HTML5 tutorial for intermediates".
So guys, As I told you - I have used few HTML5 Elements in the above example. I have Commented on every usage of the HTML5 Elements, so that it would be just as easy as I deliver it out of my mouth!!
This tutorial contains the following:
- Definition/Description of HTML5
- Difference between HTML4 and HTML5
- What's new in HTML5
- Working HTML5 example with few new HTML5 standard Tags/Elements
What is HTML5?
HTML5 is the latest standards for Hyper Text Markup Language. Previous standard that is still in practice is
HTML4/XHTML1.0.
HTML4/XHTML1.0.
Difference between HTML4 and HTML5
These two standards duffer mainly with their Doc-type definition.
HTML4 uses the
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!doctype html>
HTML4 uses the
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!doctype html>
Where:
HTML4 Doc-type says - If this particular Doc-type is defined in the HTML Page, then it is going to parse that particular Page as HTML4 page. While parsing, the Parser/processor will look out for HTML4 Elements/Tags.
If any other Elements related to other Standards/Version like HTML5 - Then, they will be judged as Warnings and Errors. Traditional Browsers like Internet Explorer will be the first one's to show them off as Errors and Warnings. Other than that, they differ using their own set of New Elements/Tags. and so on...
HTML4 Doc-type says - If this particular Doc-type is defined in the HTML Page, then it is going to parse that particular Page as HTML4 page. While parsing, the Parser/processor will look out for HTML4 Elements/Tags.
If any other Elements related to other Standards/Version like HTML5 - Then, they will be judged as Warnings and Errors. Traditional Browsers like Internet Explorer will be the first one's to show them off as Errors and Warnings. Other than that, they differ using their own set of New Elements/Tags. and so on...
What's New in HTML5?
HTML5 has introduced many Elements/Tags to be used as HTML5 Elements. There are regular Markup Elements, Multimedia Elements and many more. Some of them are listed out for your ease.
Markup Tags/Elements like:
<header></header><nav></nav>
<article></article>
<summary></summary>
<footer></footer> etc...
Form Tags/Elements like:
<input type="search" placeholder="Search here" ><input type="tel" placeholder="Input your telephone number here" >
<input type="email" placeholder="Enter your email id here" >
<input type="range" >
Multimedia Tags/Elements like:
<video></video><audio></audio>
<canvas></canvas>
Other functionality like:
Local storageGeo location etc
All the above will be explained in my next tutorial "HTML5 tutorial for intermediates".
Working HTML5 example with few new HTML5 standard Tags/Elements.
This example is a Simple Web Page which will contain some of the Markup Elements used.
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>HTML5 Basic Example</title>
<style>
html {
font-family: Arial, Helvetica, sans-serif;
font-size: 13px;
line-height: 16px;
color: #555555;
}
</style>
</head>
<body>
<div class="container">
<!-- HTML5 Header Tag -->
<header>
<h1>Header region</h1>
</header>
<!-- HTML5 Header Tag -->
<!-- HTML5 Nav Tag -->
<nav>
<ul>
<li><a href="#">Lorem ipsum</a></li>
<li><a href="#">Lorem ipsum</a></li>
<li><a href="#">Lorem ipsum</a></li>
<li><a href="#">Lorem ipsum</a></li>
</ul>
</nav>
<!-- HTML5 Nav Tag -->
<!-- HTML5 Aside Tag -->
<aside>
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore .</p>
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim .</p>
</aside>
<!-- HTML5 Aside Tag -->
<!-- HTML5 Article Tag -->
<article>
<!-- HTML5 Section Tag -->
<section>
<h2>Lorem ipsum dolor sit amet,</h2>
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ...</p>
</section>
<!-- HTML5 Section Tag -->
</article>
<!-- HTML5 Article Tag -->
<!-- HTML5 Footer Tag -->
<footer>
<p>© Copyright | _Copyright Holder__</p>
</footer>
<!-- HTML5 Footer Tag -->
</div>
</body>
</html>
<html>
<head>
<meta charset="utf-8">
<title>HTML5 Basic Example</title>
<style>
html {
font-family: Arial, Helvetica, sans-serif;
font-size: 13px;
line-height: 16px;
color: #555555;
}
</style>
</head>
<body>
<div class="container">
<!-- HTML5 Header Tag -->
<header>
<h1>Header region</h1>
</header>
<!-- HTML5 Header Tag -->
<!-- HTML5 Nav Tag -->
<nav>
<ul>
<li><a href="#">Lorem ipsum</a></li>
<li><a href="#">Lorem ipsum</a></li>
<li><a href="#">Lorem ipsum</a></li>
<li><a href="#">Lorem ipsum</a></li>
</ul>
</nav>
<!-- HTML5 Nav Tag -->
<!-- HTML5 Aside Tag -->
<aside>
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore .</p>
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim .</p>
</aside>
<!-- HTML5 Aside Tag -->
<!-- HTML5 Article Tag -->
<article>
<!-- HTML5 Section Tag -->
<section>
<h2>Lorem ipsum dolor sit amet,</h2>
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ...</p>
</section>
<!-- HTML5 Section Tag -->
</article>
<!-- HTML5 Article Tag -->
<!-- HTML5 Footer Tag -->
<footer>
<p>© Copyright | _Copyright Holder__</p>
</footer>
<!-- HTML5 Footer Tag -->
</div>
</body>
</html>
So guys, As I told you - I have used few HTML5 Elements in the above example. I have Commented on every usage of the HTML5 Elements, so that it would be just as easy as I deliver it out of my mouth!!
0 comments:
Post a Comment