4.<li> tags


#1

The course tells me that I need to surround list items with <li> tags. However I learned from a different source that you do not need 2 <li> per list item but one. It would look something like this:

<ol>
<li>Thing one
<li>Thing two
<li>Thing three
</ol>

rather than:

<ol>
<li>Thing one</li>
<li>Thing two</li>
<li>Thing three</li>
</ol>

I think this may work both ways just because maybe html automatically ends tags when you make only one tag on the line? I don't know if that's why but I just want a confirmation on why this works both ways. Thanks!
~Bob Bricks


#2

html5 allows for certain tags that they don't need a closing tag (like list)

you can read up on the latest html5 standards and recommendations

this course is from before the release of html5


#3

Thanks! Also, should the course work on HTML5 or not because my code works when I don't add an end tag to <li>.


#4

html5 code will work, the exercise instructions just don't always follow the latest standards and recommendations (which can change rapid)


#5

Got it. Thanks!:slight_smile:


#6

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