How Much Do You Know About HTML And CSS? Trivia Quiz

31 Questions

Settings
Please wait...
HTML Quizzes & Trivia

Cascading Style Sheets is a style sheet language used for describing the presentation of a document written in a markup language like HTML. Over the past week, we have been able to cover HTML and CSS in great detail and as promised there is a perfect quiz to test your understanding on the topic. So give it a try and see how well you understood them.


Questions and Answers
  • 1. 
    What does HTML stand for?  
    • A. 

      Hyper Text Markup Language

    • B. 

      Home Tool Markup Language

    • C. 

      Hyperlinks and Text Markup Language

  • 2. 
    Who is making the Web standards?  
    • A. 

      Mozilla

    • B. 

      Microsoft

    • C. 

      The World Wide Web Consortium

  • 3. 
    Choose the correct HTML tag for the largest heading  
    • A. 

      Head

    • B. 

      H1

    • C. 

      H6

    • D. 

      Heading

  • 4. 
    • A. 

      break /

    • B. 

      br /br

    • C. 

      lb /

    • D. 

      br /

    • E. 

      br/

  • 5. 
    Choose the correct HTML tag to make a text bold  
    • A. 

      bold

    • B. 

      b

    • C. 

      bb

  • 6. 
    Choose the correct HTML tag to make a text italic  
    • A. 

      Italic

    • B. 

      I

    • C. 

      It

  • 7. 
    What is the correct HTML for creating a hyperlink?
    • A. 

      A url="http://www.w3schools.com">W3Schools.com

    • B. 

      A href="http://www.w3schools.com">W3Schools

    • C. 

      A>http://www.w3schools.com

    • D. 

      A name="http://www.w3schools.com">W3Schools.com

  • 8. 
  • 9. 
    How can you open a link in a new browser window?  
    • A. 

      A href="url" target="_blank"

    • B. 

      A href="url" new

    • C. 

      A href="url" target="new"

    • D. 

      A href="url" target=_window"

  • 10. 
    How can you make a list that lists the items with numbers?  
    • A. 

      Ol

    • B. 

      Dl

    • C. 

      Ul

    • D. 

      List

  • 11. 
    How can you make a list that lists the items with bullets?  
    • A. 

      Dl

    • B. 

      Ol

    • C. 

      Ul

    • D. 

      List

  • 12. 
    What is the correct HTML for inserting an image?
    • A. 

      Img alt="MyImage" image.gif /img

    • B. 

      Image src="image.gif" alt="MyImage"

    • C. 

      Img src="image.gif" alt="MyImage"

    • D. 

      Img href="image.gif" alt="MyImage"

  • 13. 
    • A. 

      Ol

    • B. 

      Ul

    • C. 

      Dl

    • D. 

      Lists have to have numbers or bullets

  • 14. 
    • A. 

      Home.html

    • B. 

      Index.html

    • C. 

      Anything you want it to be.html

    • D. 

      The name of your website.html

  • 15. 
    The is doctype mandatory.
    • A. 

      True

    • B. 

      False

  • 16. 
    What does CSS stand for?
    • A. 

      Creative Style Sheets

    • B. 

      Colorful Style Sheets

    • C. 

      Computer Style Sheets

    • D. 

      Cascading Style Sheets

  • 17. 
    What is the correct HTML for referring to an external style sheet?  
    • A. 

      Stylesheetmystyle.css/stylesheet /

    • B. 

      Link rel="stylesheet" type="text/css" href="mystyle.css"

    • C. 

      Style src="mystyle.css" /

  • 18. 
    Which is the correct CSS syntax?  
    • A. 

      Body:color=black

    • B. 

      {body;color:black}

    • C. 

      {body:color=black(body}

    • D. 

      Body {color: black}

  • 19. 
    How do you insert a comment in a CSS file?  
    • A. 

      ' this is a comment

    • B. 

      /* this is a comment */

    • C. 

      // this is a comment

    • D. 

      // this is a comment //

  • 20. 
    Which property is used to change the background color?  
    • A. 

      Bgcolor:

    • B. 

      Background-color:

    • C. 

      Color:

  • 21. 
    How do you add a background color for all elements?  
    • A. 

      H1 {background-color:#FFFFFF}

    • B. 

      H1.all {background-color:#FFFFFF}

    • C. 

      All.h1 {background-color:#FFFFFF}

  • 22. 
    How do you change the text color of an element?  
    • A. 

      Color:

    • B. 

      Text-color=

    • C. 

      Text-color:

    • D. 

      Fgcolor:

  • 23. 
    Which CSS property controls the text size?
    • A. 

      Font-style

    • B. 

      Text-style

    • C. 

      text-size text-size

    • D. 

      Font-size

  • 24. 
    What is the correct CSS syntax for making all the elements bold?
    • A. 

      P {font-weight:bold}

    • B. 

      P style="text-size:bold"

    • C. 

      P {text-size:bold}

    • D. 

      P style="font-size:bold">

  • 25. 
    How do you display hyperlinks without an underline?  
    • A. 

      A {text-decoration:none}

    • B. 

      A {text-decoration:no underline}

    • C. 

      A {decoration:no underline}

    • D. 

      A {underline:none}

  • 26. 
    How do you change the font of an element?  
    • A. 

      Font-family:

    • B. 

      F:

    • C. 

      Font=

  • 27. 
    How do you make the text bold in CSS?  
    • A. 

      Font-weight:bold

    • B. 

      Style:bold

    • C. 

      Font:b

  • 28. 
    How do you change the left margin of an element?
    • A. 

      Margin-left:

    • B. 

      Text-indent:

    • C. 

      Margin:

    • D. 

      Indent:

  • 29. 
    To define the space between the element's border and content, you use the padding property, you are allowed to use negative values?
    • A. 

      True

    • B. 

      False

  • 30. 
    How do you make a list that lists its items with squares?  
    • A. 

      Type: square

    • B. 

      List-type: square

    • C. 

      Type: 2

    • D. 

      List-style-type: square

  • 31. 
    Where in an HTML document is the correct place to refer to an external style sheet?
    • A. 

      In the head section

    • B. 

      At the end of the document

    • C. 

      At the top of the document

    • D. 

      In the body section