HTML and CSS Quiz


Try the HTML and CSS quiz from the HTML book, or check your answers!

  1. What HTML tag makes a link?


    A. <a>
    B. <tr>
    C. <img />
    D. <br />

  2. What HTML tag makes a new line?
    A. <a>
    B. <tr>
    C. <img />
    D. <br />

  3. What HTML tag do you put things in if you want them to appear on the page?
    A. <html>
    B. <head>
    C. <body>
    D. <p>

  4. What tag attribute can you put CSS code into?
    A. title
    B. height
    C. style
    D. width

  5. What tag do you use to put a title on a table?
    A. <tr>
    B. <caption>
    C. <th>
    D. <title>

  6. What CSS property makes the colour of the page change?
    A. font-color
    B. font-size
    C. color
    D. background-color

  7. Give an example of a boolean attribute.
    A. autoplay
    B. height
    C. style
    D. title

  8. What is wrong with the code <body>Hello<body/>?
    A. it should be </body>Hello<body>
    B. it should be </body>Hello</body>
    C. it should be <body>Hello</body>
    D. it should be <body>Hello<body>

  9. What CSS property makes text go bold?
    A. font-size
    B. text-decoration
    C. bold
    D. font-weight

  10. What attribute of the img tag displays things on the page if the picture cannot be?
    A. src
    B. alt
    C. style
    D. height

  11. What type of file ends in a three letter code of .mp4?
    A. video
    B. sound
    C. picture
    D. HTML

  12. What tag adds comments to your HTML code?
    A. <title>
    B. <!-->
    C. <caption>
    D. <comment>

  13. What two other tags do li tags need to work?
    A. <ul> or <h1>
    B. <h1> or <ol>
    C. <h1> or <p>
    D. <ul> or <ol>

  14. What is an example of a CSS event?
    A. start
    B. stop
    C. hover
    D. play

  15. What should every CSS declaration end with?
    A. ;
    B. a closing tag
    C. =
    D. "

  16. What is CSS code called if it starts with a ., e.g. .glow?
    A. inline
    B. class
    C. external
    D. value

  17. What is a CSS inline style?
    A. CSS code in a style attribute
    B. CSS code in a style tag
    C. CSS code in an external css file
    D. HTML code

  18. What CSS code is an example of a function?
    A. text-shadow
    B. background-image
    C. radial-gradient
    D. a:hover

  19. Which part of this CSS code is called the selector by experts? tr { color:red; }
    A. tr
    B. color
    C. red
    D. all of the code

  20. What is wrong with the code <br>?
    A. nothing
    B. it should be </br>
    C. it should be <br \>
    D. it should be <br />

Go Berserk Book

Buy Now to buy for
£11.99 US$17.99 €13.99 (not incl. P&P)
for 1 or 2 books
Buy more and save!
Email sales@go-berserk.com
for 3 books or more.



Go Berserk CSS Book

Buy Now to buy for a special price of
£8.99 US$13.99 €11.99 (not incl. P&P)
for 1 or 2 books
Buy more and save!
Email sales@go-berserk.com
for 3 books or more.