Every HTML page We make should have a document title. So how exactly do you set the title? This tutorial is a beginner for beginners!
Add a title to your document and change your code according to the following:
<! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 strict//en"
<title> My first page </title>
My first page
As you can see, we've added two new elements starting with
The header element (from the start tag
As we learn more, you will see more elements that can be inserted into the header element, but the most important is the header element.
If you view this page from the browser (as previously saved and refreshed), you can see "This is my first page" appearing in the title bar of the browser window. The text you typed in the title tag has become the title of the document, is it amazing? If you add this page to your favorites or bookmarks, you'll see that the title will also appear here.