HTML5 Boilerplate – Beginners Guide for Web Developers
This tutorial is connected from the previous HTML5 tutorial, the “HTML5 Shiv or Shim“.
In this tutorial, you will know what HTML5 Boilerplate intended to HTML5 and lets you create awesome HTML5 site without starting from scratch.
Click here to download the latest HTML5 boilerplate.
So, what HTML5 Boilerplate contains?
- Google Analytics Snippet
- jQuery using Google CDN
These features of HTML5 Boilerplate can be explained on the HTML5 Boilerplate website provided on top of the features.
Now, let’s download the HTML5 Boilerplate and create a new folder named “boilerplate” from our recent HTML5 document, then extract it on the said folder.
So, let me explain to you about the contents inside the HTML5 Boilerplate.
Let us discuss about the humans.txt file:[text] # humanstxt.org/
# The humans responsible & technology colophon
<name> — <role> — <twitter>
# TECHNOLOGY COLOPHON
Apache Server Configs, jQuery, Modernizr, Normalize.css
This is a great idea because you can know how you can give cross settings to robots.txt. humans.txt is for humans to look at it so that if you are on a site and you want to see a little bit more about the site to yourself.
You can self type and /humans.txt then you can get the THANKS, the TECHNOLOGY they are using, the TEAM and it is really a great idea. In fact, when you usually go to a site and you can see they are using humans.txt and you will know the guys are with it and it is really helpful and learn more about the project.
Next, let’s check out the index file located at your “boilerplate” folder:
<html class=”no-js” lang=””>
<meta http-equiv=”x-ua-compatible” content=”ie=edge”>
<meta name=”description” content=””>
<meta name=”viewport” content=”width=device-width, initial-scale=1″>
<link rel=”apple-touch-icon” href=”apple-touch-icon.png”>
<!– Place favicon.ico in the root directory –>
<link rel=”stylesheet” href=”css/normalize.css”>
<link rel=”stylesheet” href=”css/main.css”>
<!–[if lt IE 8]>
<p class=”browserupgrade”>You are using an <strong>outdated</strong> browser. Please <a href=”http://browsehappy.com/”>upgrade your browser</a> to improve your experience.</p>
<!– Add your site or application content here –>
<p>Hello world! This is HTML5 Boilerplate.</p>
<!– Google Analytics: change UA-XXXXX-X to be your site’s ID. –>
As you can see the !DOCTYPE html is indicated there which this index file is an HTML5 document. The html file gives classes to our body based on what version of IE it is. Its basically giving us everything we need to start our project out.
Also, the default .css files are there, the normalize and main .css’ which have some basic styles for your HTML5 document. It also has some great print style stuff.
Basically, if you are on your old version of IE the html file is gonna give you a chromeframe notice that is going to allow you to install the chromeframe plug-in that lets your browser use modern features which is a great thing to you.
Then, you can see the google’s version of jQuery where their google is hosted and also a back-up of our own that is located on the boilerplate/js/vendor folder.
Also, on the last part of the HTML5 document, you can see a Google Analytics Script which can be helpful to where we can put our site’s ID.
It is not really a ton of stuff but it is really helpful in terms of creating your own HTML5 project without starting from scratch.
On our next tutorial, we will be discussing about Page Structure – Coding a Blogsite. Stay tuned webbies!
For questions or any other concerns or thesis/capstone creation with documentation, you can contact me through the following:
E-Mail: [email protected]
Contact No.: +639771069640
Ian Hero L. Lavapiez
BSIT Graduate, soon to be MIT.
System Analyst and Developer
Related topic(s) that you may like: