<h2>CatPhotoApp</h2>
<p>Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>
<main>
<p>Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere
rip the couch sleep in the sink fluffy fur catnip scratched.</p>
</main>
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.132 Safari/537.36.
i watched the video and have everything right but its saying the main element should have two paragraph elements as children. i dont understand what that means.
You don’t have everything right. Look at the hint.
EDIT: now I know why this question is asked every day. The video is wrong, everyone is copying the video.
Create a second p element after the existing p element with the following kitty ipsum text: Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.
Wrap the paragraphs with an opening and closing main tag.
When you nest HTML elements inside one another think of that nesting like a family tree. The outer elements are ascendants and inner (nested) elements are their descendants.
Example:
<html>
<head>
<title>This is HTML</title>
</head>
<body>
<h1>This is an HTML Header Level 1<h1>
</body>
<html>
The above HTML can also be visualized/thought of as a tree structure, like so:
html
|
+---+----+
| |
head body
| |
title h1
So, we can talk about the html above by saying:
the html element is the parent of both the head element and the body element
the head element and the body element are siblings
the head element and the body element are both children of the html element
the head element is the parent of the title element
the title element is the child of the head element
the body element is the parent of the h1 element
the h1 element is the child of the body element
These definitions are all based on a tree data structure which is the data structure used by the internal representation of HTML in a browser. You’ll learn more about this when you start learning JavaScript, but if you want a quick high-level overview you can skim the Document Object Model Wikipedia page.
So when the instructions say “the main element should have two paragraph elements as children” it just means that you should have two paragraph elements that are nested inside the main element.
i don’t know why i can’t figure this out… i know the concept but i’m still lost i understand the tree graph but i can’t put it together. please help i want to fully understand this so i can tackle this.
in the code you have two paragraphes right?!
the old one and the new, you have to right the tag <main> above the both the old and the new one.
don’t forget to close each paragraph </p> for both pragraphs and </main> for the main tag