HTML Academy
Basic HTML tags
HTML document structure3/19
Back to the list of tasks
  • 1. The HTML doctype, or document type declaration
  • 2. Basic HTML tags
  • 3. The head tag, which provides metadata information about the page
  • 4. The title tag for page titles
  • 5. The main tag for main content
  • 6. The header and footer tags
  • 7. The section tag, which is used for semantic sections
  • 8. The nav tag, which is used to specify the main navigation
  • 9. The article tag, which is used to indicate an independent section
  • 10. The aside tag, which is used to specify additional content
  • 11. The h1-h6 and title tags in HTML
  • 12. The p tag for paragraphs
  • 13. Let’s finish designing our pages
  • 14. The meta tag, which is used for page character encoding
  • 15. The meta tag, which is used for keywords
  • 16. Let’s connect another frame to the page
  • 17. Summary of “HTML document structure”
  • 18. First challenge
  • 19. First mastery challenge
The title tag for page titles
  • Sign up
  • Log in

Loading…
Everything will be ready in few seconds

  • Theory
  • Theory
  • Comments

The head tag, which provides metadata information about the page

The <head> tag is used to store metadata information about the page. It is located first in the <html> tag immediately before <body>.

The <head> tag typically contains a title, keywords, page description and other metadata, and it often refers to style files and other external resources. The contents of this tag are not displayed directly on the page.

Do you recall how in the introductory chapter we tried to change the content of the <head> tag? Then we linked various CSS files to the document using the <link> tag.

<head>
  <link href="style_file_address.css" rel="stylesheet">
</head>

The address of the style file is specified using the href attribute in <link>, whereas the rel attribute with the value stylesheet tells the browser that the file is a stylesheet (there are other things that the <link> tag can point to).

In the previous chapter, we linked to a readymade set of styles. Now let’s link to our special template styles. They are used to highlight and label blocks of content and slightly alter the design of the text inside them. These styles provide us with convenient tools for designing our website, since the structure of the entire page will be visible.

Normally, styles are invoked within <head>, but this is not necessary. The <link rel="stylesheet"> tag will also work if it is used inside the <body>.

Comments

  • index.html
HTML
<!DOCTYPE html> <html lang="en"> <head> <!-- Connect to template styles here --> </head> <body> Greetings to everyone! Welcome to my first site. Up until just recently I had no idea what a coder does for a living, but now I have found interactive courses in HTML and CSS and I have set myself the goal of becoming one. I even was assigned an instructor, Muffin, who does not allow me to slack off and will track my progress. My first assignment is to keep a diary and honestly write about all of my accomplishments. </body> </html>

What didn’t you like in this task?

Thanks! We’ll fix everything at once!

The code has changed, click “Refresh” or turn autorun on.

You’ve gone to a different page

Click inside the mini-browser to shift the focus onto this window.

100%
Goalscompleted
0

    Link the template styles file to the page.

    1. Add the <link> tag to the <head> tag.
    2. Then add the rel attribute with the stylesheet value to the <link> tag
    3. and the href attribute with the outlines.css value.

    Cookies ∙ Privacy ∙ License Agreement ∙ About ∙ Contacts ∙ © HTML Academy OÜ, 2019−2025

    VISAMastercard

    Log in

    or

    Forgot your password?

    Sign up

    Sign up

    or
    Log in

    Restore access

    Have you forgotten your password or lost access to your profile? Enter your email connected to your profile and we will send you a link to restore access.

    Forgot to connect your email to the profile? Email us and we’ll help.