Why doesn't the site's title appear on the page?


#1

Question

In this exercise, why does the paragraph display on the page but the title “My Coding Journey” does not?

Answer

The site <title> does not display on the page because this information is contained within the document’s <head>. Unlike the body element, the <head> element contains metadata which will not be displayed by the browser. You will learn more about the head and title elements in lesson 2 so stay tuned!


FAQ: Learn HTML Elements - Intro to HTML - The Body
#4

Use of the h and /h tags took me by surprise and I had to look them using Goggle. Apparently, there can be many headlines, such as h1, h2, h3, etc. and I assume that the coder has to number each according to its importance as I doubt if the headlines would sort themselves.

This is a big improvement over my first try. I think I'm getting the idea of coding.

.

I hope this is 100% right.


#5

Read up on essay outlines and consider that an analogy to a document outline. There is no sort order for headings, only hierarchy or as you deduced, importance.


#6

Is there any difference between <p> and <body>? Cause when I used both only content inside the opening and closing tags was displayed to the screen.


#7

Tags do not appear on the screen, only what content they surround. The markup is for the browser (and a reader or user agent) to read and interpret.

A very big difference. <body></body> is the main content container, one of only two direct children of the <html></html> root element, the other being the <head></head>.

Paragraphs are text containers and their element tags indicate this. We could never write,.

<p><body></body></p>

since BODY is the main container, and cannot be written anywhere else except in the the HTML element.

<html>
  <head>
  </head>
  <body>
    <p></p>
  </body>
</html>

#8

Thanks for your prompt reply, it was very helpful1