HTML Basics

HTML Introduction HTML Basic HTML Comments HTML Tags/Elements HTML Attributes HTML Formatting HTML Block and Inline HTML Charsets HTML Classes HTML Colors HTML Div HTML Headings HTML Id HTML Iframes HTML Images HTML File Paths HTML Tables HTML Layout HTML Lists HTML Links <a> HTML Paragraphs HTML Quotations HTML JavaScript HTML Emojis HTML URL Encode HTML Entities HTML Computercode HTML Symbols HTML Styles

HTML Forms

HTML Forms HTML Form Elements HTML Form Attributes HTML Input Attributes HTML Input Regex HTML Input Form Attributes HTML Input Types

HTML SEO

HTML Head HTML Page Title HTML Responsive HTML Semantics HTML Favicon

HTML Graphics

HTML Canvas HTML SVG

HTML Media

HTML Media HTML Audio HTML Video

HTML Reference

a abbr acronym address applet area article aside audio b base basefont bdi bdo big blockquote body br button canvas caption center cite code col colgroup data datalist dd del details dfn dialog dir div dl DOCTYPE dt em embed fieldset figcaption figure font footer form frame frameset h1_-_h6 head header hgroup hr html i iframe img input ins kbd label legend li link main map mark menu meta meter nav noframes noscript object ol optgroup option output p param picture pre progress q rp rt ruby s samp script search section select small source span strike strong style sub summary sup svg table tbody td template textarea tfoot th thead time title tr track tt u ul var video wbr

HTML <head> Tag

The <head> tag is a container for metadata (data about data) in an HTML document. It contains information such as the document's title, links to external resources, character set declarations, and other important information that is not displayed on the page itself.

Usage of <head> Tag

The <head> tag is placed between the <html> tag and the <body> tag in an HTML document. It is used to define metadata about the document and to include various elements that are necessary for the document but not for display.

Attributes of <head> Tag

Below is a table of some of the main attributes of the <head> tag and their use:

Attribute Description
title Specifies the title of the document, which is displayed in the browser's title bar or tab.
meta Defines metadata about the HTML document, such as the character set, author, description, and keywords.
link Defines relationships between the current document and external resources, such as stylesheets.
script Specifies scripts that should be executed when the document is loaded.

Example of <head> Tag

Below is an example of how the <head> tag is used in an HTML document:


    <head>
        <title>My Website</title>
        <meta charset="UTF-8">
        <meta name="description" content="This is my website">
        <link rel="stylesheet" href="styles.css">
        <script src="script.js"></script>
    </head>