Can someone explain this to me? (html)


#1

Hello everyone
I can’t seem to understand what I’m doing wrong with this code:

<!DOCTYPE html>
<html>
  <head>
    <title>Brown Bears</title>
  </head>
  <body>
    <h1>The Brown Bear</h1>
    <div> 
    id='introduction'
     
    <h2>About Brown Bears</h2>
    <h3>Species</h3>
    <h3>Features</h3>
    </div>
    <h2>Habitat</h2>
    <h3>Countries with Large Brown Bear Populations</h3>
    <h3>Countries with Small Brown Bear Populations</h3>
    <h2>Media</h2>
  </body>
</html>

I thought that I was adding the

in the proper spots along with the id, but that appears to be incorrect.
Thanks.


#2

id is an attribute, so should be inside the <div> tag.

<element attr="value">

#3

Hello kullboys12.
I guess that you are at lesson 7/16 of “Elements and Structure” lesson.
You have to replace the code below The Brown Bear “h1” heading.

<div> 
    id='introduction'

for

<div id="introduction">

note that the name and the value of the attribute must be placed inside the opening tag

Good luck and keep going, this is a very good course. :+1:


#4

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.