<head> element is the sole location of the
<title> element. The
<title> can exist nowhere else, and should be the first thing specified in the page, after the basic structure has been created.
<head> <title>Dudley Storey's Home Page on the Web</title> </head>
Always make the title full, unique and descriptive. When making a web page for a company, include the company name and the subject of the page itself in the
<title>Immortan Joe's Car Shop – Vehicles for Sale</title>
Alternatively, the subject of the page can go first:
<title>Vehicles for Sale – Immortan Joe's Car Shop</title>
The title is used in several places:
- In the browser tab.
- In search engine results, as the primary link text
- In bookmarks
- In print versions of the page
Never title a page simply "Products" or "About": this makes for poor search engine optimisation, difficult bookmarking, and adds to user confusion about the purpose of the page.
Three final lines of code added inside the
<head> tell the browser the encoding of the text on the document, how to scale the page on mobile devices, and the location of the page's external style rules:
<meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="styles.css">
As a general rule this information should be added to your page without alteration.
Rendering by Kai C. Schwarzer, used under a Creative Commons license
Enjoy this piece? I invite you to follow me at twitter.com/dudleystorey to learn more.