Question

I need help in identifying the problem with my Codecademy html. I can't move forward because I can't seem to figure out what's really wrong.

Here's the html:

<!DOCTYPE html>
<html>
  <head>
    <title>My Webpage</title>
  </head>

  <body>
    <p>This is my first paragraph</p>
    <p>This is my second paragraph</p>
  </body>
</html>

And here's what is brought to my attention for correcting my "error":

Oops, try again. Make sure you write something between each set of <p></p> tags!

Was it helpful?

Solution

You need to declare the document type with <!DOCTYPE html> at the top of your code, and then you need an opening <html> tage, without it, the browser just reads it as jibberish.

Correct code

<!DOCTYPE html>
<html>
  <body>
   <p>This is my first paragraph</p>
   <p>This is my second paragraph</p>
  </body>
</html>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top