Minimal html Template

Min. html template

Breakdown Already in 2008 I published a detailled list of HTML tagging which you should reduce to the absolute necessary in every HTML-file. Today's needs for web access, SEO, JavaScript handling of documents consistent and supporting global character sets demand more from our HTML. Minimum HTML file has become much larger. The HTML5 workgroup has since given much thought to reducing this minimum number of taglets. Turns out that all popular browser types agreed on multiple short-cuts that can reduce the amount of coding, and the HTML5 spec now allows these short-cuts to be used in legitimate codec.

Now that all web browser (even old ones like IE6) fully supports HTML5 standard short cuts, we can use them today, despite most of HTML5's new functions that remain taboo until web browser catch-up. Using these key combinations in the game, here is the minimal that an HTML should now contain provided it is associated with JavaScript and CSS:

See below for a complete explanation of each line of this minimal work. Each HTML file should begin with , which is requested by HTML5 files, is much smaller than the previous ones:

As with all these keyboard combinations, this keystroke has been specially developed to "fool" today's browser (not yet supporting HTML5) by handling the page like a full-blown HTML4 page. Next, select the beginning of the file with the Open day. The next thing is the day that launches the print header:

If you specify it here, the documents will be shown properly even if they are directly downloaded from the hard drive without consultation of a webhost. HTML5 once again significantly reduces this day in comparison to its HTML4 equivalents, but as before, this link uses the troubleshooting behaviour of all popular web browser and is therefore secure to use today:

When you want to associate a page with a style sheet to change its look (which you will normally do), all you need is a tag at this point: The type="text/css" property needed in HTML4 is now optionally available in HTML5, and all recent web browser know what to do if you omit it.

In HTML5, the type= "text/javascript" property is now again an option, and all recent browser behaves properly if you omit it. Then you can end the headers and begin the page bodies with a tag. You have the contents of the page, but since it is a minimal page, there doesn't have to be any bodily contents at all: what does it look like to you?

When you are like me, some of the abbreviations presented here will make you uncomfortable the first time you flush. It is really secure to use an HTML5 declare when recent browser does not yet supports most of HTML5? As odd as it may seem to be to take a piece of non-supported coding from a given spec, HTML5 has been written to be taken over in exactly the same way.

Short cuts like the ones presented above are not a feature of a new standards, but a more effective use of the HTML parsing functions that have been integrated into web browser for years. Since the W3C HTML Validator now has HTML5 support, it will invalidate any document that contains these links; there's really no need to do it the long way anymore.

Do you have a query about HTML5?

Mehr zum Thema