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”
h1>Menu</h1
p> Davie’s Food Menu</p
</form
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:
capture_r

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

7 Likes

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!

2 Likes

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.

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!

2 Likes

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

1 Like

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


imagen

2 Likes

It is not a fool question! :wink:

1 Like