← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 764 · 40 questions
TalentJR

Code tip (Read the code like a browser): Find the topic of the question: tags, headings, lists, links, images, structure or comments. Read the code line by line, the way a browser would. Count carefully: tags opened and closed, items, lines, paragraphs.

NameDateTime takenScore ___ / 40
  1. 1.📝 What does <br> do? (a) starts a new line (b) makes a list (c) adds a picture (d) makes text bold
  2. 2.🏷️ Is </li> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  3. 3.🔠 Which heading shows the SMALLEST text: <h3>, <h5>, <h4> or <h2>? (a) <h4> (b) <h3> (c) <h2> (d) <h5>
  4. 4.🔢 In a basic web page file, which comes LAST? (a) <body> (b) <head> (c) <html> (d) </html>
  5. 5.Which of these is true of a code editor? (a) opens web pages for us (b) stores a website’s files (c) shows line numbers (d) hosts websites online
  6. 6.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="cake.jpg" alt="Birthday cake" width="250">
    (a) A happy dog (b) width (c) Birthday cake (d) cake.jpg
  7. 7.🔗 Which words do you click on?
    <a href="contact.html">Maths fun</a>
    (a) contact.html (b) href (c) Maths fun (d) Art corner
  8. 8.📋 How many items does this list show?
    <ol>
      <li>Papaya</li>
      <li>Banana</li>
    </ol>
  9. 9.True or false: <img> has a closing tag. (a) False (b) True
  10. 10.Which of these is true of a web browser? (a) hosts websites online (b) sends pages over the net (c) colours code to help us (d) opens web pages for us
  11. 11.🔠 How many headings are in this code?
    <h1>Cricket is fun.</h1>
    <p>Our school trip</p>
    <h3>My pets</h3>
    <p>Our school trip</p>
    <p>My pets</p>
  12. 12.📝 Does <p> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  13. 13.🏷️ Every HTML tag starts with which sign? (a) { (b) [ (c) < (d) (
  14. 14.True or false: <ol> is one item of a list. (a) True (b) False
  15. 15.🔠 Which heading shows the BIGGEST text: <h5>, <h4>, <h6> or <h1>? (a) <h5> (b) <h6> (c) <h1> (d) <h4>
  16. 16.🔗 Which tag makes a clickable link? (a) <img> (b) <link> (c) <a> (d) <p>
  17. 17.🔠 Which heading shows the SMALLEST text: <h6>, <h1>, <h5> or <h4>? (a) <h5> (b) <h4> (c) <h6> (d) <h1>
  18. 18.Which of these is true of a web server? (a) saves our .html files (b) turns HTML into a page (c) hosts websites online (d) shows pages from the web
  19. 19.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="moon.png" alt="The full moon" width="350">
    (a) moon.png (b) width (c) The full moon (d) Our school bus
  20. 20.📝 How many paragraphs does this code make?
    <p>Cricket is fun.</p>
    <p>My best friend</p>
    <h2>I love mangoes.</h2>
    <p>I love mangoes.</p>
    <h2>Hello, world!</h2>
    <p>Rain today</p>
  21. 21.🔢 In a basic web page file, which comes first: “<body>” or “</head>”? (a) <body> (b) </head>
  22. 22.🔗 What does target="_blank" do to a link? (a) hides the link (b) makes it blank (c) opens it in a new tab (d) makes it bold
  23. 23.Which of these is true of a web server? (a) shows line numbers (b) is where we type code (c) answers page requests (d) has an address bar
  24. 24.True or false: <img> goes in the head. (a) True (b) False
  25. 25.🔠 How many headings are in this code?
    <h1>Cricket is fun.</h1>
    <h3>Good morning!</h3>
    <p>Our school trip</p>
  26. 26.🔍 Which is the odd one out? (a) is where we type code (b) shows line numbers (c) saves our .html files (d) sends pages over the net
  27. 27.True or false: <title> has a closing tag. (a) False (b) True
  28. 28.🔠 Which heading shows the SMALLEST text: <h2>, <h1>, <h6> or <h5>? (a) <h2> (b) <h5> (c) <h1> (d) <h6>
  29. 29.True or false: in <img>, width sets how tall it is. (a) True (b) False
  30. 30.🏷️ Which is the closing tag for <p>? (a) <p> (b) <p/> (c) <\p> (d) </p>
  31. 31.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
  32. 32.🔠 How many <h1> headings should a page usually have? (a) 6 (b) 3 (c) 10 (d) 1
  33. 33.📋 Which tag goes around each item of a list? (a) <p> (b) <ol> (c) <ul> (d) <li>
  34. 34.🔍 One closing tag is missing. Which one?
    <i>Good morning!</i>
    <h2>Hello, world!
    <h3>Cricket is fun.</h3>
    (a) </b> (b) </h3> (c) </i> (d) </h2>
  35. 35.📋 How many items does this list show?
    <ul>
      <li>Mango</li>
      <li>Papaya</li>
      <li>Grapes</li>
      <li>Litchi</li>
      <li>Orange</li>
    </ul>
  36. 36.🔠 Which heading shows the BIGGEST text: <h1>, <h5>, <h4> or <h2>? (a) <h5> (b) <h2> (c) <h1> (d) <h4>
  37. 37.🔗 Which address opens when you click this link?
    <a href="maths.html">Maths fun</a>
    (a) Maths fun (b) news.html (c) art.html (d) maths.html
  38. 38.🖼️ Which picture file does the browser load?
    <img src="kite.png" alt="A red kite" width="250">
    (a) cake.jpg (b) kite.png (c) map.png (d) A red kite
  39. 39.💬 Which text will NOT show on the page?
    <p>Good morning!</p>
    <p>The red kite</p>
    <!-- <p>Our school trip</p> -->
    <p>My pets</p>
    (a) Good morning! (b) Our school trip (c) The red kite (d) My pets
  40. 40.True or false: <link rel="stylesheet"> goes in the head. (a) False (b) True

Answer key

  1. starts a new line
  2. a closing tag
  3. <h5>
  4. </html>
  5. shows line numbers
  6. Birthday cake
  7. Maths fun
  8. 2
  9. False
  10. opens web pages for us
  11. 2
  12. has a closing tag
  13. <
  14. False
  15. <h1>
  16. <a>
  17. <h6>
  18. hosts websites online
  19. The full moon
  20. 4
  21. </head>
  22. opens it in a new tab
  23. answers page requests
  24. False
  25. 2
  26. sends pages over the net
  27. True
  28. <h6>
  29. False
  30. </p>
  31. Yes
  32. 1
  33. <li>
  34. </h2>
  35. 5
  36. <h1>
  37. maths.html
  38. kite.png
  39. Our school trip
  40. True

Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids