What's wrong with my code?


#1

https://www.codecademy.com/courses/web-beginner-en-y2Yjd/1/4?curriculum_id=50579fb998b470000202dc8b

My error message is "Oops, try again. It looks like your second

  • 's font-size is 16px instead of 12px."


    <!DOCTYPE html>
    <html>
    	<head>
    		<title>Loving the font changes</title>
    	</head>
    	<body>
    		<h1 style="font-family: Arial">Big title</h1>
    		 <ol>
    		 	<li style="font-family:Arial"; font-size: 16px>This item is big Arial.</li>
                <li style="font-family:Verdana"; font-size: 12px>This item is medium Verdana.
    		 	<li style="font-family:Impact"; font-size: 10px>This item is small Impact.</li>
    		 </ol>
    	</body>
    </html>


  • #2

    style is an attribute, which runs from the first till second quotation mark:

    style="font-family:Arial"

    if you want to add another property + value, you should use a semi-colon to separate the property's, but still before the second quotation mark:

    style="font-family:Arial; color: red"

    #3

    thanks, but my problem was the font size. in my code I'm pretty sure I have the correct size but it still gives me the same error code "My error message is "Oops, try again. It looks like your second

    's font-size is 16px instead of 12px."


    #4

    well, i showed you what you did wrong in one of your lists, but you made this mistake in all your lists, so you will have to apply this changes to all your lists


    #5

    Thanks, I changed it. But the problem was the order of my attributes. Font size needs to come before font family.


    #6

    the order doesn't matter, as long as you get the quotation marks (") right