The HTML <head> element

The HTML <head> element contains for the following HTML elements: <title>, <style>, <meta>, <link> and <script>, among others. The <head> element also contains metadata, which is data about data. This element needs to be placed between the <html> tag and the <body> tag. The metadata information does not appear in the website and it determines the document title, character set, styles, scripts, icons and other meta information.

The HTML <title> element

The <title> element determines the title of the website. This title appears on the browser's title bar or in the website's tab. The <title> element represents an absolute requirement in the HTML file.

The content of the title is extremely relevant for search engine optimization (SEO) purposes, since this data is considered by search engine algorithms to establish the position of the appearance of the website in search results.

The HTML <style> element

The HTML <style> element determines the style information of the website.

The HTML <link> element

The HTML <link> element establishes, as its title implies, the relationship between the HTML document and other resources. One common application of the <link> tag is to link to separate style documents.

The HTML <meta> element

The <meta> element determines the character set, page description, keywords, author of the document, and viewport settings. As mentioned earlier, the metadata will not be shown on the page. However, it is extremely important since it is used by browsers, search engines (keywords), and other web services.

There are several attributes of the <meta> element, each one with its own and particular application:

Exercises

  1. Link your HTML document to a separate style sheet called "styles".
  2. Define the charset of your website to "UTF-8".
  3. Define 5 essential keywords to an ecommerce website that sells audio equipment.
  4. Write a thorough description of your website including keywords.
  5. Write a concise bio of yourself using the author attribute.