Anatomy 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
-
<!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. -
<html lang = 'en-us'>
provides metadata on what language we will use in this document. -
<head>
encapsulates the content you want to be part of the HTML document, but most of it shouldn't be displayed to the user. -
<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. -
<title>
sets the page title on the browser tab. -
<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:
Grazie per i tuoi commenti!
Chieda ad AI
Chieda ad AI
Chieda pure quello che desidera o provi una delle domande suggerite per iniziare la nostra conversazione
Mi faccia domande su questo argomento
Riassuma questo capitolo
Mostri esempi dal mondo reale
Awesome!
Completion rate improved to 3.45
Anatomy of an HTML Document
Scorri per mostrare il menu
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
-
<!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. -
<html lang = 'en-us'>
provides metadata on what language we will use in this document. -
<head>
encapsulates the content you want to be part of the HTML document, but most of it shouldn't be displayed to the user. -
<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. -
<title>
sets the page title on the browser tab. -
<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:
Grazie per i tuoi commenti!