This forum is now read-only. Please use our new forums at discuss.codecademy.com.

HTML Basics Forum

View Course » View Exercise

33 points
Picture
Submitted by
Keanu Adams
over 2 years ago

Make sure you use your <h2></h2> tags.

I keep retrying this excercise, with the same end result, can anyone point out a problem in my code?

<!DOCTYPE html>

<head>
    <title>
    <h1>
     Coding 
    </h1>

    <h2>
    <title>
    Hello
    </title>
    </h2>
</head>
<body>
<h3>
    <p> 
    I'm Keanu    
    </p>
    </h3>
    <h4>
    <p>
    How are you?
    </p>
    </h4>

        <h5>
        <p>
          I'm doing well  
        </p>    
        </h5>

       <h6>
      <p>
      Goodbye    
      </p>     
       </h6>



</body>

3 votes

permalink

<h1> till <h6> are never between the head tags, always between the body tags.

you cant nest a paragraph tag inside a header (<h6> for example tag)

2455 points
593d545c83696644420003b7_64554016
Submitted by
stetim94
over 2 years ago

1 Comment

5907fa2e58212277b80000b1_403915627 Thomas Gerot over 2 years ago

Correct but for future reference, you can nest a p tag in a header tag. Some do it and modify it with their CSS


0 votes

permalink

@corey, this:
<h1> This is the content of the first heading tag </h1> <p> This is the content of the first paragraph </p> <- this is correct nesting
<h3> <p> This is the content of the second paragraph </p> </h3> <- this isn't

see the difference? headers and paragraph can never be nested inside each other

2455 points
593d545c83696644420003b7_64554016
Submitted by
stetim94
over 2 years ago


-3 votes

permalink

Headings & Paragraphs

This is the content of the first heading tag


This is the content of the first paragraph



This is the content of the second paragraph




This is the content of the third paragraph

370 points
53f6604a80ff337a52000964_203946649
Submitted by
Corey D
over 2 years ago

1 Comment

53f6604a80ff337a52000964_203946649 Corey D over 2 years ago

Headings & Paragraphs

This is the content of the first heading tag


This is the content of the first paragraph



This is the content of the second paragraph




This is the content of the third paragraph