FAQ: Learn HTML Elements - Intro to HTML - HTML Structure

This community-built FAQ covers the “HTML Structure” exercise in Codecademy’s lessons on HTML.

Here are the most popular community questions on this exercise:

Join the Discussion. We Want to Hear From You!

Have a new question or can answer someone else’s? Reply (reply) to an existing thread!

Agree with a comment or answer? Like (like) to up-vote the contribution!

Need broader help or resources about HTML in general? Go here!

Want to take the conversation in a totally different direction? Join our wider discussions.

Learn more about how to use this guide.

Found a bug? Report it!

Have a question about your account, billing, Pro, or Pro Intensive? Reach out to our support team!

None of the above? Find out where to ask other questions here!

Other FAQs

The following are links to additional questions that our community has asked about this exercise:

  • This list will contain other frequently asked questions that aren’t quite as popular as the ones above.
  • Currently there have not been enough questions asked and answered about this exercise to populate this FAQ section.
  • This FAQ is built and maintained by you, the Codecademy community – help yourself and other learners like you by contributing!

Not seeing your question? It may still have been asked before – try searching for it by clicking the spyglass icon (search) in the top-right of this page. Still can’t find it? Ask it below by hitting the reply button below this post (reply).

A post was split to a new topic: Should we include the html tag?

The first instruction says to “Add the paragraph below as a child of the body element.” I did this, above the

element, not within the
element. It shows that this is incorrect and that I should have done it under the
element … but then that would make my

a grandchild, not a child, of the element. In the HTML structure explanation, I thought when it was mentioned “In this example, the element is the parent of the

element. Both the

and

elements are children of the

element” that it was optional. Does this mean that this is always the case, or just in the example they gave?

Wow - what happened to my reply?

You included formatting information in your post, and the forums display them accordingly. See more information here.

A post was split to a new topic: Can I have more than one div?

What does <div> mean?

Marking up a document involves wrapping text with tags. The above is a DIVision tag for sectioning the page. In the pre-HTML5 days, we used <div></div> with special id attributes to section a page into HEADER, CONTENT, FOOTER, but we now have special elements for that purpose.

<div id="header">

</div>
<div id="content">

</div>
<div id="footer">

</div>

Sectioning helps us to organize our document by grouping related elements in a container for easy identification. Markinp up a document is akin to writing an outline of the content.

Ok, so while I was easilly able to follow the instructions, but as an experiment, I put the following code for use:
<body
Hewwo World
</body
Now, the problem here is that since the <> brackets (would be very grateful if someone tells me what they’re called in programming languages) are not yet closed, then the browser shouldn’t be able to identify it as a proper tag and shouldn’t the whole code be displayed by the browser? But here, literally nothing is being shown, I tried the same with notepad and chrome too…same results :confused: . Any help would be appreciated :}
Note: I know I am not so smart so if i am missing something very obvious please forgive me ;-;

Left and right carat. As entities they are known by, &lt; and &gt; as in less than and greater than.

Collectively, left carat + element type + right carat make up a tag.

OPENTAG    ENDTAG
 <body>    </body>

which together form an element.

Browsers are actually quite forgiving and try their best to render the document. They might recognize the incomplete tags and autocomplete. Not the sort of HTML we want facing the web, though. It should always be validated and well formed.

Oh! Thank you so much! All of that knowledge was quite helpful :slight_smile:

1 Like