Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Lære Anatomy of an HTML Document | Basics Introduction
Introduction to HTML

bookAnatomy of an HTML Document

HTML is a Markup Language derived from another one called XML. XML has some standards required to be followed, and since HTML is a subset of it, there are also some standard practices for writing an HTML document. Here is a template of an HTML document:

index.html

index.html

copy
  1. <!DOCTYPE html>at the start of the document, we had to specify which version of HTML the browser should adhere to for parsing this document and validating everything.

  2. <html lang = 'en-us'> provides metadata on what language we will use in this document.

  3. <head> encapsulates the content you want to be part of the HTML document, but most of it shouldn't be displayed to the user.

  4. <meta charset="utf-8"> any data not meant for that element that must be included on the page must be put in this element mostly as an attribute.

  5. <title> sets the page title on the browser tab.

  6. <body> contains all the content of the page, which is to be displayed on the web page.

1. What does the <title> element do?

2. Select all the elements that can be included in the body:

question mark

What does the <title> element do?

Select the correct answer

question mark

Select all the elements that can be included in the body:

Select the correct answer

Alt var klart?

Hvordan kan vi forbedre det?

Takk for tilbakemeldingene dine!

Seksjon 1. Kapittel 5

Spør AI

expand

Spør AI

ChatGPT

Spør om hva du vil, eller prøv ett av de foreslåtte spørsmålene for å starte chatten vår

Suggested prompts:

Still meg spørsmål om dette emnet

Oppsummer dette kapittelet

Vis eksempler fra virkeligheten

Awesome!

Completion rate improved to 3.45

bookAnatomy of an HTML Document

Sveip for å vise menyen

HTML is a Markup Language derived from another one called XML. XML has some standards required to be followed, and since HTML is a subset of it, there are also some standard practices for writing an HTML document. Here is a template of an HTML document:

index.html

index.html

copy
  1. <!DOCTYPE html>at the start of the document, we had to specify which version of HTML the browser should adhere to for parsing this document and validating everything.

  2. <html lang = 'en-us'> provides metadata on what language we will use in this document.

  3. <head> encapsulates the content you want to be part of the HTML document, but most of it shouldn't be displayed to the user.

  4. <meta charset="utf-8"> any data not meant for that element that must be included on the page must be put in this element mostly as an attribute.

  5. <title> sets the page title on the browser tab.

  6. <body> contains all the content of the page, which is to be displayed on the web page.

1. What does the <title> element do?

2. Select all the elements that can be included in the body:

question mark

What does the <title> element do?

Select the correct answer

question mark

Select all the elements that can be included in the body:

Select the correct answer

Alt var klart?

Hvordan kan vi forbedre det?

Takk for tilbakemeldingene dine!

Seksjon 1. Kapittel 5
some-alt