The header of the page
The header page contains key information such as page title, or information on the character encoding. It begins with a <head> and ends with the closing of this tag (</ head>). The heading is placed right after the opening of the <html>. Until then, you should have this code:
Code:
<! DOCTYPE html PUBLIC "- / / W3C / / DTD XHTML 1.0 Strict / / EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<Html xmlns = "http://www.w3.org/1999/xhtml" xml: lang = "en">
<Head>
</ Head>
</ Html>
It's all well and good, but where does it the title, what should we put in this header?
For the page title, it goes between the <title> and </ title>. If you want to give your page the title Welcome to my web page, you must use this code:
Code:
<! DOCTYPE html PUBLIC "- / / W3C / / DTD XHTML 1.0 Strict / / EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<Html xmlns = "http://www.w3.org/1999/xhtml" xml: lang = "en">
<Head>
<Title> Welcome to my web page </ title>
</ Head>
</ Html>
As you can see, this is not very complicated. Another mandatory, it is the character encoding of your webpage. Simply put, there are different character encodings, and the one we use is ISO-8859-1 (with the notebook at least). In short here is the code to add:
<Meta http-equiv = "content-type" content = "text / html; charset = ISO-8859-1" />
Do not learn this line by heart, it means that your page was saved using encoding ISO-8859-1. This is a tag <meta>. We will see later in the annex to what may well serve this tag, remember at the moment it has many uses. Your code should now look like this:
Code:
<! DOCTYPE html PUBLIC "- / / W3C / / DTD XHTML 1.0 Strict / / EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<Html xmlns = "http://www.w3.org/1999/xhtml" xml: lang = "en">
<Head>
<Title> Welcome to my web page </ title>
<Meta http-equiv = "content-type" content = "text / html; charset = ISO-8859-1" />
</ Head>
</ Html>
The title will be displayed in the browser window, everything else is invisible to the user.
Bookmarks