HTML Tutorial – Head

The HTML <head> Element

<head> acts like a container for all the head elements. Most common head elements are <title>, <style>, <link> and <script>

The HTML <title> Element

The <title> tag defines the title of the document and it is required in all HTML/XHTML documents

  • Defines a title in the browser toolbar
  • Provides a title for the page when it is added to favorites
  • Displays a title for the page in search-engine results

HTML Title Examples

<!DOCTYPE html>
<html>
<head>
<title>How you set the title of a web page</title>
</head>
<body>
</body>
</html>

The HTML <link> Element

The HTML Link Element specifies relationships between the current document and external resource. This Element is most used to link to style sheets. CSS will be explained in later chapter.

HTML Link Examples

<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="mystyle.css">
</head>
</html>

The HTML <script> Element

The <script> tag is used to define a client-side script, such as a JavaScript. It will be explained in later chapter.