Lesson 10: Font Family


After adding in the correct font-size and font-style for each

  • item I received an error that my font-size was incorrect even though it was entered correctly. I came to this forum and noticed many people having this same problem and it seemed everything others used to fix it were not working for me. So I reset the code and tried again but this time I followed the instructions exactly and listed the font-size first ; then the font-style. I am now receiving an error that reads “Oops, try again. Did you remember to change the first
  • to the font Arial?”. I am wondering if there is an issue with the second half of the first
  • line because when I set it to do font-size I get a font-size error and when I set it to do font-style I get a font-style error. Anyone else have this problem or ideas of how to overcome it?
    <!DOCTYPE html>
    		<title>Loving the font changes</title>
    		<h1 style="font-family: Arial">Big title</h1>
    		 	<li style= "font-size: 16 px" ; "font-style: Arial">This item is big Arial.</li>
    		 	<li style= "font-size: 12px"; "font-style: Verdana"  >This item is medium Verdana.</li>
    		 	<li style= "font-size: 10px" ; "font-style: Impact" >This item is small Impact.</li>
  • the style attribute ends at the second quotation mark ("), so the both property’s should be inside both quotation marks separate by a semi-colon:

    style="font-size: 12px; font-style: Verdana">

    also, the property you look for is font-family, not font-style

    Actually, it looks like it should be font-family.
    @galexy, here’s what it should look like, take note of all of the styling being in one set of quotation marks and the spacing between characters such as = and ":

    <li style="font-size: 16 px; font-family: Arial">This item is big Arial.</li>
    <li style="font-size: 12px; font-family: Verdana"  >This item is medium Verdana.</li>
    <li style="font-size: 10px; font-family: Impact" >This item is small Impact.</li>

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