HTML: Head tags

I previously mentioned you can add information to the head tag of an HTML document.

The head tag contains special tags that define the document properties.

It’s always written before the body tag, right after the opening html tag:

<!DOCTYPE html>
<html>
  <head>
    ...
  </head>
  ...
</html>

We never use attributes on this tag.

And we don’t write content in it.

It’s just a container for other tags.

Inside it we can have a wide variety of tags, depending on what you need to do:

  • title
  • script
  • link
  • style
  • meta

We’ll see them in details in the “More HTML” section.

Lessons in this unit:

0: Introduction
1: Your first HTML page
2: Text tags
3: Attributes
4: Links
5: Images
6: Lists
7: ▶︎ Head tags
8: Container tags
9: DEMO Using CodePen
10: DEMO Using VS Code
Are you intimidated by Git? Can’t figure out merge vs rebase? Are you afraid of screwing up something any time you have to do something in Git? Do you rely on ChatGPT or random people’s answer on StackOverflow to fix your problems? Your coworkers are tired of explaining Git to you all the time? Git is something we all need to use, but few of us really master it. I created this course to improve your Git (and GitHub) knowledge at a radical level. Launching May 21, 2024. Join the waiting list!