Declare the Doctype of an HTML Document 1

Tell us what’s happening:
dont seem to understand this

Your code so far


<!DOCTYPE html>
<html>
<!--"h1"-->
</html>

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.181 Safari/537.36.

Link to the challenge:
https://learn.freecodecamp.org/responsive-web-design/basic-html-and-html5/declare-the-doctype-of-an-html-document

which wrap around an h1 element.

You don’t have an <h1> element.

thanks but can you show me where to fix it have tried and seem not to get it

An h1 tag looks like

<h1>The  text you want in your header</h1>

. You need one inside your html element.

here is my code which step am i missing

<h1>A cat</h1>
<!DOCTYPE html>
<html><!-- h1 --></html>

I’ve edited your post for readability. When you enter a code block into the forum, precede it with a line of three backticks and follow it with a line of three backticks to make easier to read. See this post to find the backtick on your keyboard. The “preformatted text” tool in the editor (</>) will also add backticks around text.

markdown_Forums

Your html element isn’t wrapped around your h1 element. There is a comment in the provided example code that tells you exactly where to put your html.

1 Like

I can’t understand what I’m missing… Can anyone enlighten me, please? Here’s the code.

<!DOCTYPE html>
<html>
    <h1>text</h1>
</html>

I also tried this:


<!DOCTYPE html>
<html>
    <!--
        <h1>text</h1>
          -->
</html>