Sunday 12 January 2014

Learn the uses of the head tag

The head comes first, and contains all the non-content code, including:

  • The title of the page, for example:

    • <title>How to Learn HTML - wikiHow</title>

  • Meta tags, which are used to provide metadata about a web page. This data can be used by search engines when the robot scours the internet to locate and list websites:

    • <meta name="description" content="A description of your page">
    • <meta name="keywords" content="list of keywords, each separated by a comma">
    • <meta name="robots" content="options for enabling/disabling certain abilities of a web-crawler for search engines">
    • <meta content="en-gb" http-equiv="Content-Language">
    • <meta content="text/html" http-equiv="Content-Type">

  • Link tags are used to link the page to other files, for example stylesheets - (CSS styles of the elements in the page) and favicons (an icon associated with the webpage, displayed next to the url in the address bar and other places):

    • <link class="misspell" type="text/css" stylesheet">href="styles.css">
    • <link class="misspell" href="favicon.ico">

  • Script tags are used to link the page to JavaScript files (although this does not necessarily have to be in the head section). These tags can also contain the JavaScript code instead of an external file:

    • <script class="misspell" src="scripts.js" language="javascript" type="text/javascript"></script>

0 comments:

Post a Comment

Twitter Delicious Facebook Digg Stumbleupon Favorites More

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | Affiliate Network Reviews