Need help with 2.4


#1

<!DOCTYPE html>
<html>
    <head>
    <body>
    <h1>my website</h1>
     <h1>
        <P>Hello this is my website</p>
        <p>Why am I making a website</p>
        <p>WHY ARENT YOU</p>
        <body>
    <title>AWESOME WEBSITE</title>
        </body>
    </head>
</html>

This is my code ive done what it tells me ive done wrong what am i missing?


#3

We can't see your code they way you posted it. In order for us to see it properly, you need to highlight the code, and click the </> in your format menu. This tells the website that you are posting preformated code. Otherwise it will just render your html into the post. Please try again, and we can help you.


#4

@hleighton, you want to help unknown_user? I made the code visible

@unknown_user3102, for next time, use one of the two following options to make your code/indent is visible:

select your code and press ctrl + shift + c (or cmd + shift + c if you use a mac)

if this instructions are unclear, you can also insert 3 backticks before and after your code, like so:

```
<p>visible</p>
```

the backtick is located above the tab key on your keyboard


#5

Okay, you are closing your tags in the wrong places.

The <head> tag should only include the title and then we close it. Like so:

<head>
     <title></title>
</head>

After that, we can start our <body> section.

Now, you opened and closed your body correctly, but you added an unneccesary <body> tag after your paragraphs. This is also where we can include our <h1> headings. Let's package everythign like this:

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

Your final code should look like this:

<!DOCTYPE html>
<html>
	<head>
		<title>AWESOME WEBSITE</title>
	</head>
	<body>
		<h1>my website</h1>
		<p>Hello this is my website</p>
		<p>Why am I making a website</p>
		<p>WHY ARENT YOU</p>
	</body>
</html>

#6

Nice answer, just one small detail in this line:

<P>Hello this is my website</p>

a uppercase paragraph opening tag doesn't match a lower case paragraph closing tag


#7

Thanks, I had copied portions of the poster's code to save time, and missed that little guy! :blush:


#9

well, in html basic you learned the correct doctype declaration is <!DOCTYPE html>

make sure all your paragraph opening and closing tags are lowercase, a lowercase opening tag doesn't match a uppercase paragraph closing tag

for next time, use one of the two following options to make your code/indent is visible:

select your code and press ctrl + shift + c (or cmd + shift + c if you use a mac)

if this instructions are unclear, you can also insert 3 backticks before and after your code, like so:

```
<p>visible</p>
```

the backtick is located above the tab key on your keyboard