Wikia

Head

Talk8
645pages on
this wiki
Head
Basic usage:
<head>
   <title>Head - HTML &amp; CSS Wiki</title>
</head>
Spec version 1.0
IE Version 1.0
Firefox 1.0
Google Chrome 1.0
Safari 1.0
Opera 1.0
Example output:
See the top of your browser window.

The HTML <head> element contains the page's title and description, and some optional scripts and styles. It is usually placed right after the opening <html> tag and right before the opening <body> tag. <Title> is always inserted first within the head. To apply CSS directly into an HTML document, you must insert the code in the <head> section (or at the very beginning of the <body>) for it to work.

Contents

AttributesEdit

HTML 4 attributesEdit

Internationalization attributes lang and dir.

Attribute Value Description
profile URL Specifies some meta data profile location(s), separated by white space. Obsolete in HTML5[1].

HTML5 attributesEdit

UsageEdit

To apply this is an HTML document, use:

<html>
    <head>
        <title>The title</title>
        Head content
    </head>
    <body>
        Body content
    </body>
</html>

To use internal CSS in the <head> tag, use:

<html>
    <head>
        <title>The title</title>
        <style type="text/css">
            h1 {
                background-color:black;
                color:white;
            }
        </style>
    </head>
    <body>
        Body content
    </body>
</html>

Rendering Edit

The <head> element defines document properties, and is by itself not visible.

Typical CSS representation:

head {
    display: none;
}

Coding rules Edit

The <head> element is the first child element of the <html> element. It must contain a <title> element, can contain an <isindex> and an <base> element, and can contain several <script>, <style>, <meta>, <link> and <object> elements.

References Edit

  1. http://dev.w3.org/html5/spec/Overview.html#attr-head-profile

External linksEdit

Advertisement | Your ad here

Photos

Add a Photo
233photos on this wiki
See all photos >

Recent Wiki Activity

See more >

Around Wikia's network

Random Wiki