← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 721 · 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 one sends pages over the net? (a) a web server (b) a web browser (c) a code editor
  2. 2.True or false: <ol> lists things in any order. (a) True (b) False
  3. 3.🖼️ Which attribute of <img> sets how tall it is? (a) alt (b) width (c) height (d) src
  4. 4.🏷️ Is <p> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  5. 5.🔗 Which words do you click on?
    <a href="games.html">Maths fun</a>
    (a) games.html (b) href (c) Maths fun (d) Art corner
  6. 6.🔠 Which heading shows the SMALLEST text: <h5>, <h6>, <h2> or <h1>? (a) <h5> (b) <h6> (c) <h1> (d) <h2>
  7. 7.🔗 Which attribute holds the address of a link? (a) id (b) alt (c) href (d) src
  8. 8.🔍 Which line is missing its closing tag?
    line 1: <u>Our school trip</u>
    line 2: <b>Good morning!</b>
    line 3: <small>I love mangoes.
    (a) line 1 (b) line 3 (c) line 2
  9. 9.🔠 How many headings are in this code?
    <h1>Good morning!</h1>
    <p>Fun facts</p>
    <p>Our school trip</p>
  10. 10.💬 Why do coders write comments? (a) to add colour (b) to show pictures (c) to leave notes (d) to make links
  11. 11.🔠 How many headings are in this code?
    <h1>Our school trip</h1>
    <h2>My best friend</h2>
    <h2>Rain today</h2>
  12. 12.📝 Does <ul> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  13. 13.💬 How does an HTML comment end? (a) */ (b) >> (c) // (d) -->
  14. 14.🔠 Which heading shows the BIGGEST text: <h4>, <h2>, <h3> or <h6>? (a) <h6> (b) <h3> (c) <h4> (d) <h2>
  15. 15.🔠 How many <h1> headings should a page usually have? (a) 1 (b) 3 (c) 10 (d) 6
  16. 16.📋 How many items does this list show?
    <ul>
      <li>Guava</li>
      <li>Banana</li>
      <li>Papaya</li>
      <li>Mango</li>
      <li>Grapes</li>
      <li>Litchi</li>
    </ul>
  17. 17.🔍 Which line is missing its closing tag?
    line 1: <small>Hello, world!</small>
    line 2: <em>I love mangoes.
    line 3: <i>Fun facts</i>
    (a) line 1 (b) line 3 (c) line 2
  18. 18.💬 Which text will NOT show on the page?
    <p>My pets</p>
    <p>Cricket is fun.</p>
    <!-- <p>Fun facts</p> -->
    <p>Rain today</p>
    (a) My pets (b) Cricket is fun. (c) Fun facts (d) Rain today
  19. 19.🔢 In a basic web page file, which comes first: “<body>” or “<head>”? (a) <head> (b) <body>
  20. 20.🏷️ Is </li> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  21. 21.💬 Which text will NOT show on the page?
    <p>Good morning!</p>
    <p>Fun facts</p>
    <!-- <p>Our school trip</p> -->
    (a) Fun facts (b) Our school trip (c) Good morning!
  22. 22.📋 Which tag goes around each item of a list? (a) <ul> (b) <ol> (c) <p> (d) <li>
  23. 23.📄 Can HTML on its own make links to pages? (a) Yes (b) No
  24. 24.True or false: a web server hosts websites online. (a) False (b) True
  25. 25.📝 On how many lines does the browser show this paragraph?
    <p>Roses are red<br>Stars shine<br>Rivers flow<br>Kites fly high<br>Sky is blue</p>
  26. 26.Which of these is an empty tag? (a) <h1> (b) <ul> (c) <b> (d) <img>
  27. 27.🔤 In “HTML”, what does the L stand for? (a) Link (b) Line (c) Laptop (d) Language
  28. 28.🔠 How many headings are in this code?
    <h1>Cricket is fun.</h1>
    <p>Fun facts</p>
    <p>My pets</p>
  29. 29.Which of these goes in the body? (a) <title> (b) <table> (c) <meta charset="utf-8"> (d) <link rel="stylesheet">
  30. 30.📋 Which list tag shows 1, 2, 3 numbers? (a) <ul> (b) <li> (c) <ol>
  31. 31.🔗 Which address opens when you click this link?
    <a href="contact.html">Maths fun</a>
    (a) maths.html (b) Maths fun (c) https://example.com (d) contact.html
  32. 32.🔍 Which is the odd one out? (a) shows line numbers (b) saves our .html files (c) hosts websites online (d) is where we type code
  33. 33.True or false: a web browser turns HTML into a page. (a) False (b) True
  34. 34.🌐 Which one hosts websites online? (a) a web browser (b) a code editor (c) a web server
  35. 35.🖼️ Which attribute of <img> sets how wide it is? (a) width (b) src (c) alt (d) height
  36. 36.🏷️ Is </h1> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  37. 37.📄 Can HTML on its own make a form? (a) Yes (b) No
  38. 38.🔍 One closing tag is missing. Which one?
    <em>Our school trip
    <h3>Hello, world!</h3>
    <h2>I love mangoes.</h2>
    (a) </h3> (b) </u> (c) </h2> (d) </em>
  39. 39.💬 How many paragraphs show on the page?
    <!-- <p>Cricket is fun.</p> -->
    <!-- <p>My best friend</p> -->
    <p>Good morning!</p>
  40. 40.🔗 Which words do you click on?
    <a href="https://example.com">About us</a>
    (a) About us (b) href (c) https://example.com (d) Contact us

Answer key

  1. a web server
  2. False
  3. height
  4. an opening tag
  5. Maths fun
  6. <h6>
  7. href
  8. line 3
  9. 1
  10. to leave notes
  11. 3
  12. has a closing tag
  13. -->
  14. <h2>
  15. 1
  16. 6
  17. line 2
  18. Fun facts
  19. <head>
  20. a closing tag
  21. Our school trip
  22. <li>
  23. Yes
  24. True
  25. 5
  26. <img>
  27. Language
  28. 1
  29. <table>
  30. <ol>
  31. contact.html
  32. hosts websites online
  33. True
  34. a web server
  35. width
  36. a closing tag
  37. Yes
  38. </em>
  39. 1
  40. About us

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