← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 343 · 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.Which of these is true of a web server? (a) saves our .html files (b) turns HTML into a page (c) shows pages from the web (d) sends pages over the net
  2. 2.True or false: <meta charset="utf-8"> goes in the head. (a) False (b) True
  3. 3.Which of these is an opening tag? (a) </li> (b) </title> (c) </h1> (d) <body>
  4. 4.🔠 Which heading shows the BIGGEST text: <h1>, <h5>, <h3> or <h2>? (a) <h3> (b) <h1> (c) <h5> (d) <h2>
  5. 5.📄 Can HTML on its own keep a high score? (a) Yes (b) No
  6. 6.💬 Why do coders write comments? (a) to show pictures (b) to make links (c) to leave notes (d) to add colour
  7. 7.🔍 Which is the odd one out? (a) turns HTML into a page (b) stores a website’s files (c) opens web pages for us (d) has an address bar
  8. 8.True or false: <link rel="stylesheet"> goes in the head. (a) True (b) False
  9. 9.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="kite.png" alt="A red kite" width="350">
    (a) width (b) kite.png (c) Map of India (d) A red kite
  10. 10.🔍 Which line is missing its closing tag?
    line 1: <h2>My pets
    line 2: <b>Rain today</b>
    line 3: <u>I love mangoes.</u>
    (a) line 1 (b) line 3 (c) line 2
  11. 11.🖼️ Which attribute of <img> shows if the image fails? (a) width (b) src (c) alt (d) height
  12. 12.🏷️ Which is the closing tag for <b>? (a) </b> (b) <b/> (c) <b> (d) <\b>
  13. 13.💬 Which text will NOT show on the page?
    <p>Good morning!</p>
    <p>Fun facts</p>
    <!-- <p>Cricket is fun.</p> -->
    (a) Fun facts (b) Good morning! (c) Cricket is fun.
  14. 14.📋 Which list shows the steps of a recipe best? (a) <br> (b) <ol> (c) <ul> (d) <hr>
  15. 15.True or false: <li> goes inside ul or ol. (a) False (b) True
  16. 16.📋 How many items does this list show?
    <ul>
      <li>Guava</li>
      <li>Mango</li>
      <li>Jamun</li>
    </ul>
  17. 17.📋 What number does the browser show next to “Grapes”?
    <ol start="5">
      <li>Jamun</li>
      <li>Banana</li>
      <li>Grapes</li>
    </ol>
  18. 18.🏷️ Is </p> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  19. 19.📋 Which tag goes around each item of a list? (a) <p> (b) <ol> (c) <ul> (d) <li>
  20. 20.Which of these is a closing tag? (a) <b> (b) <h1> (c) <title> (d) </li>
  21. 21.True or false: in <img>, alt tells which image to load. (a) True (b) False
  22. 22.💬 How many paragraphs show on the page?
    <p>I love mangoes.</p>
    <!-- <p>Fun facts</p> -->
    <!-- <p>Good morning!</p> -->
    <!-- <p>Rain today</p> -->
    <!-- <p>The red kite</p> -->
  23. 23.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="fort.jpg" alt="An old fort" width="50">
    (a) A tiger asleep (b) fort.jpg (c) width (d) An old fort
  24. 24.🔠 Which heading shows the BIGGEST text: <h4>, <h2>, <h6> or <h3>? (a) <h6> (b) <h4> (c) <h3> (d) <h2>
  25. 25.🔢 In a basic web page file, which comes first: “<!DOCTYPE html>” or “<body>”? (a) <!DOCTYPE html> (b) <body>
  26. 26.💬 How many paragraphs show on the page?
    <!-- <p>My pets</p> -->
    <!-- <p>Our school trip</p> -->
    <!-- <p>Hello, world!</p> -->
    <p>Fun facts</p>
  27. 27.📝 On how many lines does the browser show this paragraph?
    <p>Birds sing<br>Roses are red<br>Sky is blue<br>Kites fly high</p>
  28. 28.💬 How many paragraphs show on the page?
    <!-- <p>Hello, world!</p> -->
    <!-- <p>My best friend</p> -->
    <p>I love mangoes.</p>
  29. 29.Which of these is an opening tag? (a) </p> (b) </body> (c) </h1> (d) <b>
  30. 30.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Cricket Club</title>
    </head>
    <body>
      <h1>My drawings</h1>
      <p>Thanks for visiting.</p>
    </body>
    </html>
    (a) body (b) Cricket Club (c) Thanks for visiting. (d) My drawings
  31. 31.🌐 Which one shows line numbers? (a) a web server (b) a web browser (c) a code editor
  32. 32.📝 How many paragraphs does this code make?
    <p>My best friend</p>
    <p>Our school trip</p>
    <p>Our school trip</p>
  33. 33.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as 5 spaces (b) as a new line (c) as one space (d) as a dot
  34. 34.📄 Can HTML on its own make bullet lists? (a) Yes (b) No
  35. 35.💬 Which text will NOT show on the page?
    <p>My pets</p>
    <p>I love mangoes.</p>
    <p>Good morning!</p>
    <!-- <p>Rain today</p> -->
    (a) I love mangoes. (b) My pets (c) Good morning! (d) Rain today
  36. 36.📄 Where does <table> go: in the head or in the body? (a) in the body (b) in the head
  37. 37.🖼️ Does <img> need a closing tag? (a) Yes (b) No
  38. 38.📄 Where does <title> go: in the head or in the body? (a) in the head (b) in the body
  39. 39.🖼️ Which attribute of <img> describes the picture? (a) width (b) src (c) height (d) alt
  40. 40.💬 How many paragraphs show on the page?
    <p>Hello, world!</p>
    <!-- <p>Good morning!</p> -->
    <p>I love mangoes.</p>
    <p>Our school trip</p>

Answer key

  1. sends pages over the net
  2. True
  3. <body>
  4. <h1>
  5. No
  6. to leave notes
  7. stores a website’s files
  8. True
  9. A red kite
  10. line 1
  11. alt
  12. </b>
  13. Cricket is fun.
  14. <ol>
  15. True
  16. 3
  17. 7
  18. a closing tag
  19. <li>
  20. </li>
  21. False
  22. 1
  23. An old fort
  24. <h2>
  25. <!DOCTYPE html>
  26. 1
  27. 4
  28. 1
  29. <b>
  30. My drawings
  31. a code editor
  32. 3
  33. as one space
  34. Yes
  35. Rain today
  36. in the body
  37. No
  38. in the head
  39. alt
  40. 3

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