HTML is the main Basic key of web development for creating simple web pages. when you will start a career in web development you must need somehow to know about HTML,
So today I,m Share with you difference Between HTML and HTML5.
Basically, Hypertext markup language (HTML) is the structure for creating a weblog.
so, guys Let's go to know how HTML is working and which is Difference Between HTML And HTML5.
doctype is the version type like HTML Start-up Before html5 we were using doctype like:
* That was impossible and difficult-to-memorize
* There, unfortunately, isn't any easy or semantic way to associate the caption
Read my article about Html Tags and Elements
Remember, in XHTML or some other version of HTML the Quote (single or double) was necessary.
Example:
this is the 7 Best Difference Between HTML and HTML5. I hope you understood very well and learned.
So today I,m Share with you difference Between HTML and HTML5.
What is HTML?
Basically, Hypertext markup language (HTML) is the structure for creating a weblog.
so, guys Let's go to know how HTML is working and which is Difference Between HTML And HTML5.
What is the difference between HTML and HTML5
1. Html Doctype vs Html5 Doctypedoctype is the version type like HTML Start-up Before html5 we were using doctype like:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
BUT in HTML5 features
You can simply write and easy to memorize:
<!DOCTYPE html>
* Still it truthfully isn't even really necessary for HTML5.
* However, it's used for current, and older browsers that require a specified doctype
* So, without worry, feel free to use a new HTML5 doctype2. Figure Element
Consider the following code for an image with its caption:
<h3>Before using HTML5:</h3> <img src = “nature.jpg“ alt = "About image“ height = “30%" width = “40%“ /> <p>Fig.1: Nature Image. </p>
BUT in HTML5 Features
Introduced the <figure> element, combined with the <figcaption>element:
<h3>Using HTML5:</h3> <figure> <img src = “nature.jpg" alt = "About image" height = “30%” width = “40%” /> <figcaption> <p>Fig.1: This is an image of something interesting. </p> </figcaption> </figure>
Read my article about Html Tags and Elements
Output
3. Html Scripts and Links vs HTML5
Some programmer possibly still add the type attribute to link and script tags as:
<link rel="stylesheet" href="path/to/stylesheet.css" />
<script src="path/to/script.js“ ></script>
BUT in HTML5
This is no longer necessary we can remove the type attribute as:
<link rel="stylesheet" href="path/to/stylesheet.css" />
<script src="path/to/script.js"></script>
4. Quote or Not to Quote
...That is the Good question.Remember, in XHTML or some other version of HTML the Quote (single or double) was necessary.
<p class = “myClass” id = “someId”> This is paragraph </p> OR <p class = ‘myClass’ id = ‘someId’> This is paragraph </p>
BUT in HTML5
This is no longer necessary we can write it without Quote:
<p class = myClass id = someId> This is paragraph </p>
5. Make Content Editable
A new attribute that can be applied to elements, called content editable
As the name implies, this allows the user to edit any of the text contained within the element,
including its children.
For Example:
<h2> To-Do List </h2>
<ul >
<li> Break mechanical cab driver. </li>
<li> Drive to abandoned factory </li>
<li> Watch video of self </li>
</ul>
Output
6. Audio Support
No longer do we have to rely on third-party plugins in order to render audio.
HTML5 now offers the <audio> element.
Well, at least, ultimately, we won't have to worry about these plugins.
For the time being, only the most recent of browsers offer support for HTML5 audio.
Example:
<audio autoplay = "autoplay" controls = "controls"> <source src = "file.mp3" />
</audio>
7. Video Support
- Much like the <audio> element, we also, of course, have HTML5 video as well in the new browsers!
- Before HTML5, there was no standard for showing videos on a web page.
- Before HTML5, videos could only be played with a plug-in (like flash).
- The HTML5 <video> element specifies a standard way to embed a video in a web page.
Example:
<video autoplay = "autoplay" controls = "controls" >
<source src=“anyVideo.mp4" />
<p> Your browser is old.
<a href=“anyVideo.mp4">Download this video instead.</a> </p>
</video>
HTML5 Input Types
HTML5 Input Attributes
this is the 7 Best Difference Between HTML and HTML5. I hope you understood very well and learned.
COMMENTS