Why is it that the ordered part of the code won't number correctly?


#1

I was able to pass in this lesson, but I noticed that the ordered lists only used 1 to number. Is there something wrong with my coding?

<!DOCTYPE html>
<html>
	<head>
		<title>Marshanah</title>
	</head>
	<body>
	<img src="http://www1.pictures.zimbio.com/mp/-oObFXnDf3yx.jpg"/>
	<p>I am an 18 year old African-American girl from Illinois.</p>
	<ol>
	    <li>Interests</li>
	        <ul>
	            <li>Fiction books</li>
	            <li>Writing</li>
	            <li>Anime/Manga</li>
	            <li>Superhero movies</li>
	        </ul>
	</ol>
	        <ol>
	            <li>Jobs</li>
	                <ul>
	                    <li>I've haven't done paid work yet</li>
	                    <li>Student</li>
	                    <li>Daughter</li>
	                    <li>Friend</li>
	                </ul>
	        </ol>
	                <ol>
	                    <li>Favorite Quotes</li>
	                        <ul>
	                            <li>"I am an invisible man. No, I am not a spook like those who haunted Edgar Allan Poe. Nor am I one of your Hollywood movie ectoplasms. I am a man of flesh and bones, fiber and liquids - and I might even be said to possess a mind. I am invisible, simply because people refuse to see me." - from Ralph Ellison's 'Invisible Man'</li>
	                            <li>"Deep into the darkness peering, long I stood there, wondering, fearing
Doubting, dreaming dreams no mortals ever dared to dream before;" - from 'Nevermore' (Edgar Allan Poe) </li>
	                            <li>"Life's but a walking shadow, a poor player, That struts and frets his hour upon the stage, And then is heard no more." - from Macbeth (William Shakespeare)</li>
	                            <li>"Coal-black is better than another hue, In that it scorns to bear another hue;
For all the water in the ocean can never turn the swan's black legs to white,although she lave them hourly in the flood." - from 'Titus Andronicus' (William Shakespeare)</li>
                        </ul>
                </ol>
                        <ol>
                            <li>Where I've Lived</li>
                                <ul>
                                    <li>Illinois</li>
                                    <li>Texas</li>
                                    <li>Nowhere Else</li>
                                    <li>I'm currently in IL</li>
                                </ul>
                        </ol>             
	</body>
</html>

I don't know how to show the coding; when I pasted the code, it came out like this...


#3

@jibblyj, i formatted the code for you. Now you can help :smile:


#4

You mean like this?


  1. some text


  • some text

  • some text

  • some text


That's because in each list, you only have one list item (li) that is a direct child of the ordered list (ol), whereas the rest are indirect children of the ordered lists, but direct children of the unordered lists, which means that they will have the characteristics of items in those types of lists:

<ol>
    <li>some text</li> <!-- Numbered -->
    <ul>
        <li>some text</li> <!-- Not numbered -->
        <li>some text</li> <!-- Not numbered -->
        <li>some text</li> <!-- Not numbered -->
    </ul>
</ol>