An HTML page contains a lot of hidden information. We finds content that is not displayed directly in the browser, but which are nevertheless of primary importance. This information is structured inside the page and separated by tags according to the following architecture:
<!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <title>Page title</title> <meta name="description" content="Short description of the page" /> </head> <body> ... <!-- Displayed page content --> ... </body> </html>
<! Doctype html> is the typ e of doc ument. Here, of course, this is a
HTML document. This tag allows compatibility between HTML and XML
which is another more general markup file format.
<html> tag marks the beginning of the HTML code. It is generally
composed of two sections:
`<head>`is the header of the page, it contains metadata (title, description, scripts ...);
`<body>`is the body of the page, this section contains the content of the page that will be displayed in the browser.
It is recommended to add the attribute
`lang =" xx "` in the tag
to specify the language of the page.
The header of the page contains metadata, this information is not displayed in the browser, but is necessary for the browser to correctly interpret the content. This section can also contain information that search engines will analyze for page indexing. For search engine optimization, it is a good practice to include at least the following two tags:
<title>contains the title of the page that will appear in the browser tab
<meta name =" description "content =" ... ">contains the page description that will be displayed in search engine results.
This information may seem unecessary, since it does not appear directly on the page. They are however very important since they are used, among other things, for referencing pages in search engines.