In the second session, we will design the HTML5 site design with page structure tags.
These tags, as their name suggests, are used to create a web page structure.
In HTML 4, there were two methods for naming tags.
1 Use id
2. use class
Which id was used to name unique segments and class was used for style.
For example, a website usually has a header, so we used id with header value to name it. Or, for example, for the style of the blue text, we used the site with a text-blue value class. Of course, this type of standard naming is not a rule; someone may use a class with a text-blue value for the logo, or … But usually the naming is meaningful, and each name should accurately identify the exact part that it forms.
In 2005, an investigation was made into how many web designers use the id and class attributes to label tags. The study found that more than one billion sites used these two attributes. The image below is the most commonly used names for these two attributes:
New HTML5 tag
plus we assigned each name because all the parts were just one tag and the definition of the style without the definition of the name was problematic.
The following code example shows the structure of an html5 web page:
<! doctype html> <html lang = "en"> <head> <title> Hello HTML5 </ title> <meta charset = "utf-8"> <! - [if lt IE 9]> <script src = "http://html5shiv.googlecode.com/svn/trunk/html5.js"> </ script> <! [endif] -> </ head> <body> <div id = "layout"> <header> <no> </ no> </ header> <div id = "wrapper"> <aside> </ aside> <section> <article> </ article> <article> </ article> <article> </ article> </ section> </ div> <footer> </ footer> </ div> </ body> </ html>
See the fuller code on this page along with the stylesheet and also apply to the bottom of the page without using html5shiv.
(Of course, the use of this method is only for minor issues, and if you want to design with html5, you should use html5shiv.