What is the relationship of the `h1` and `p` elements in regards to the `form`?

I still making confusion on how the elements are related…
In this exercise … https://www.codecademy.com/courses/learn-html/lessons/html-forms/exercises/creating-form?action=resume_content_item
We had to add a h1 element under form and add p under h1 like this:
form action="/practice.html" method=“post”
p> Davie’s Food Menu</p
My question is… Is h1 and p siblings and child of form? or is p child of h1 and grandchild of form ???

Note the example above doesn’t have the right open and close tags because it modifies my text :upside_down_face:

I still don’t understand how it works … Thanks

I believe from what you’ve described that <h1> and <p> are siblings, and are children of your <form> element. To format your code so that it will display properly in the forum, go to a blank line, click on the </> button in the menu bar above where you type. You will see this:

Paste your code in the space indicated, and we will see it with its original formatting and special characters preserved.


hello @midlindner … thanks for the tip … now I know how to use a piece of code to display between my text… Haha… got love learn this things! :smile:
Appreciate your help!


What is the button to which you refer? I see no buttons anywhere, and always just type all of the code myself. I’d love a shortcut, as I have seen in some of the videos.

1 Like

Above the text box that you type in, there should be a few icons to format your response (including B and I – bold and italics). The 6th icon is the </> which will let you input your code! Hope this helps!


Even I had difficulty in understanding it, thanks @aranishanker for clarifying further. :slightly_smiling_face:

1 Like

I do not see these icons above my textbox. Any chance you can take a screenshot to show me?



It is not a fool question! :wink:

Thank youuuu

h1 and p are child of form.


h1 is child of form, p is child of h1, so it is grandchild of form.

Hopefully my understanding of parent, child, grandchild is correct