Document metadata

The next elements will give metadata about the document. In addition to this, you can also include links to resources, such as CSS and JavaScript.

head

The head element is the metadata parent element. All other metadata elements will be children of this element:

<head></head>

Description

The head element usually must have a title element inside it. The elements that can go in head are title, link, meta, style, script, noscript, and base. These elements are explained next.

Here is an example of the head element that defines a title and stylesheet element:

<head>
    <title>Title that appears as the tab name</title>
    <link href="style.css" rel="stylesheet" type="text/css" media="all" />
</head>

title

The title element displays the title of the ...

Get Web Developer's Reference Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.