HTML6 overview. HTML is a simple web development language that keeps on rolling out new versions, and has started working on its sixth revision. HTML5 the current revision of HTML is considered to be one of the most sought-after revisions, compared to all the previous HTML versions.
Let’s have an Overview of HTML5
HTML5 gave us some very exciting features like audio and video support, offline local storage, and most importantly ability to build mobile optimized websites. In addition, it gave us freedom from using type attribute from tags such as <link>
and <script>
. What’s more? It helped developers organize content in a more relevant manner using new tags like <article>
, <section>
, <header>
etc. However, HTML5 is still in its development stage and isn’t a truly semantic markup.
Understanding the Concept of HTML6
Have you ever wondered if you could express tags? If you haven’t then, just imagine using tags like <logo></logo>
for assigning a logo to your web page, or using tag <toolbar></toolbar>
and so on. Wouldn’t it be better if your could use the <div>
tag without using multiple id’s such as a wrapper or container, and rather use <wrapper>
or a <container>
directly. Simply put, instead of using <div id='container'>
you can simply use <container>
. This is where HTML6 comes in.
HTML6 is sixth revision of HTML with namespaces that has structure like XML. XML namespaces will help you use the same tag without conflicting it with any other tag. For instance the one used in the XHTML DOCTYPE:
1 |
xmlns:xhtml="http://www.w3.org/1999/xhtml" |
HTML6 will provide us the benefit to use tags that we want and won’t have to use only the defined tags.
Example of HTML6
04 |
< html:title >A Look Into HTML6</ html:title > |
05 |
< html:meta type = "title" value = "Page Title" > |
06 |
< html:meta type = "description" value = "HTML example with namespaces" > |
07 |
< html:link src = "css/mainfile.css" title = "Styles" type = "text/css" > |
08 |
< html:link src = "js/mainfile.js" title = "Script" type = "text/javascript" > |
13 |
< html:media type = "image" src = "images/xyz.png" > |
16 |
< html:a href = "/img1" >a1</ a > |
17 |
< html:a href = "/img2" >a2</ a > |
22 |
< h1 >Heading of main article</ h1 > |
23 |
< h2 >Sub-heading of main article</ h2 > |
28 |
< h1 >The concept of HTML6</ h1 > |
29 |
< h2 >Understanding the basics</ h2 > |
34 |
< copyright >This site is © to Anonymous 2014</ copyright > |
Looking at the above HTML6 document you’ll see some odd <html:x>
tags. Those odd tags are the namespaced elements that belong to the W3C and HTML6 spec, and will trigger browser events. For example, the <html:title>
element will change the title bar of your browser and the <html:media>
element will help make the defined image appear on your browser screen. The best part is that all these elements are specifically defined for users and don’t have anything to do with the browser. They’re nothing more than hooks for JavaScript and style sheet and helps to make your sample code more semantic.
HTML6 APIs
The HTML6 tags will have the namespace html like <html:html>
or <html: head>
etc. Let’s have a look at the each tag attributes used in the above HTML6 example document.
1. <html:html>
2 |
< html:html >// this is equivalent to < html > tag written in previous HTML versions |
2. <html:head>
This tag is equivalent to <head>
tag. It’s purpose is to obtain data and scripts that tweaks how the content is displayed within the <html:body>
tag.
3. <html:title>
As the name implies, it will change the title of the HTML document, and is similar to the <title>
tag used in earlier HTML versions. This tag is used by browsers for changing the title bar, favorites, etc.
4 |
< html:title >A Look Into HTML6</ html:title > |
4. <html:meta>
This tag is somewhat different from the <meta>
tag used in the latest HTML version. Using this HTML6 tag you can use any sort of meta data. And so, unlike HTML5 you won’t have to use the standard meta types in HTML6. It helps to accumulate information such as a webpage description, by storing content.
4 |
< html:title >A Look Into HTML6</ html:title > |
5 |
< html:meta type = "description" value = "HTML example with namespaces" > |
5. <html:link>
This tag will help you link external documents and scripts (like CSS, JS etc.) to the HTML document. It’s similar to <link>
tag used in HTML5. This tag includes following attributes:
- charset: “UTF-8” character encoding.
- href: It contains link to your source file.
- media: This defines the kind of device on which your item will run, for example, “Smartphone” or “tablet”.
- type: The MIME type of the document.
4 |
< html:title >A Look Into HTML6</ html:title > |
5 |
< html:link src = "js/mainfile.js" title = "Script" type = "text/javascript" > |
6. <html:body>
This is just like the <body>
tag that you’ve been using in the current HTML version. This is where all your website stuff like text, media and others are placed.
4 |
< html:title >A Look Into HTML6</ html:title > |
7. <html:a>
This tag is similar to the <a>
tag, and is used to represent a link to other web page. However, unlike the <a>
tag, <html:a>
takes only a single ‘href’ attribute, which directs the link to the page you need to visit.
4 |
< html:title >A Look Into HTML6</ html:title > |
7 |
< html:a href = "http://siteurl" >Go to siteurl.com!</ html:a > |
8. <html:button>
This tag is equivalent to <button>
tag or <input type="button">
used in the current and older HTML versions. This tag enables you to create a button to help a user perform some interaction on your site’s page. It has one attribute disabled.
4 |
< html:title >A Look Into HTML6</ html:title > |
7 |
< html:button >Click Here</ html:button > |
9. <html:media>
This tag wrap up all the <media>
tags like <img>
, <video>
, <embed>
, etc. By using <html:media>
tag, you no longer have to specify a tag for each of the file type. The <html:media>
tag you’re using will be executed by the browser based on the type attribute (if provided), or it will just make a guess on the basis of file extension, or by the ‘MIME type’.
04 |
< html:title >A Look Into HTML6</ html:title > |
08 |
< html:media src = "img1/logo.jpg" type = "image" > |
10 |
< html:media src = "videos/slide.mov" > |
An Overview of Tag types
Similar to the current and previous HTML versions, HTML6 will also have two types of tags such as single tags and double tags. The single tags won’t be having any text content, and rather will only have attributes. For example:
1 |
< html:meta type = "author" content = "z13a" > |
2 |
< html:meta type = "author" content = "z13a" /> |
Compared to the double tag, you don’t need to close your single tag. Double tags have opening and closing tag, as they have some text content. But, in the case double tags don’t have any text based content, you can reduce it to the ‘self-closing single variant’. For example:
1 |
< html:link href = "./a.html" >Text based content</ html:link > |
5 |
< foo class = "xyz" ></ foo > |
Conclusion
HTML6 isn’t here yet. But an idea of what it will be offering has been provided by Oscar Godson. This post will help you provide an overview of some of the basic concepts of HTML6.