← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 46 · 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.💬 How many paragraphs show on the page?
    <p>Cricket is fun.</p>
    <!-- <p>Fun facts</p> -->
    <p>The red kite</p>
  2. 2.💬 Which text will NOT show on the page?
    <p>Cricket is fun.</p>
    <p>Fun facts</p>
    <!-- <p>Our school trip</p> -->
    (a) Cricket is fun. (b) Our school trip (c) Fun facts
  3. 3.📋 How many items does this list show?
    <ol>
      <li>Banana</li>
      <li>Papaya</li>
    </ol>
  4. 4.🔠 How many heading levels does HTML have? (a) 4 (b) 10 (c) 6 (d) 3
  5. 5.🔗 Which words do you click on?
    <a href="https://example.com">About us</a>
    (a) https://example.com (b) About us (c) href (d) Contact us
  6. 6.🏷️ Is <b> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  7. 7.📄 Where does <h1> go: in the head or in the body? (a) in the body (b) in the head
  8. 8.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
  9. 9.📄 Where does <a> go: in the head or in the body? (a) in the head (b) in the body
  10. 10.🌐 Which one hosts websites online? (a) a web browser (b) a code editor (c) a web server
  11. 11.True or false: <ol> shows 1, 2, 3 numbers. (a) False (b) True
  12. 12.🔍 Which line is missing its closing tag?
    line 1: <i>Rain today</i>
    line 2: <b>Our school trip</b>
    line 3: <u>The red kite
    (a) line 2 (b) line 3 (c) line 1
  13. 13.Which of these has a closing tag? (a) <img> (b) <meta> (c) <br> (d) <h1>
  14. 14.🔤 In “HTML”, what does the L stand for? (a) Laptop (b) Link (c) Line (d) Language
  15. 15.🔠 Are headings shown in bold by default? (a) No (b) Yes
  16. 16.Which of these is true of a web browser? (a) shows line numbers (b) has an address bar (c) saves our .html files (d) answers page requests
  17. 17.📝 What does <hr> draw? (a) a picture (b) a link (c) a line across the page (d) a table
  18. 18.💬 How many paragraphs show on the page?
    <p>Hello, world!</p>
    <p>My pets</p>
    <!-- <p>Rain today</p> -->
    <p>The red kite</p>
    <!-- <p>Cricket is fun.</p> -->
  19. 19.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="dog.jpg" alt="A happy dog" width="100">
    (a) width (b) dog.jpg (c) The full moon (d) A happy dog
  20. 20.Which of these goes in the head? (a) <ul> (b) <meta charset="utf-8"> (c) <p> (d) <a>
  21. 21.🔠 Which heading shows the BIGGEST text: <h4>, <h1>, <h2> or <h3>? (a) <h3> (b) <h1> (c) <h2> (d) <h4>
  22. 22.📄 Where does <style> go: in the head or in the body? (a) in the head (b) in the body
  23. 23.True or false: <h1> goes in the head. (a) False (b) True
  24. 24.🔗 Which address opens when you click this link?
    <a href="https://example.com">About us</a>
    (a) maths.html (b) About us (c) art.html (d) https://example.com
  25. 25.🔗 Which address opens when you click this link?
    <a href="about.html">About us</a>
    (a) https://example.com (b) contact.html (c) About us (d) about.html
  26. 26.🌐 Which one stores a website’s files? (a) a web browser (b) a code editor (c) a web server
  27. 27.🔠 How many headings are in this code?
    <h1>Good morning!</h1>
    <h3>Our school trip</h3>
    <p>Rain today</p>
    <h4>I love mangoes.</h4>
    <h2>Hello, world!</h2>
  28. 28.🔠 Which heading shows the BIGGEST text: <h5>, <h6>, <h2> or <h3>? (a) <h5> (b) <h6> (c) <h2> (d) <h3>
  29. 29.🔠 Which heading shows the SMALLEST text: <h2>, <h3>, <h1> or <h6>? (a) <h3> (b) <h2> (c) <h1> (d) <h6>
  30. 30.🖼️ Which tag puts a picture on a page? (a) <pic> (b) <a> (c) <img> (d) <p>
  31. 31.True or false: in <img>, alt names the picture file. (a) False (b) True
  32. 32.True or false: in <img>, alt shows if the image fails. (a) False (b) True
  33. 33.💬 Which text will NOT show on the page?
    <p>I love mangoes.</p>
    <p>Fun facts</p>
    <!-- <p>Hello, world!</p> -->
    (a) Hello, world! (b) Fun facts (c) I love mangoes.
  34. 34.🔠 Which heading shows the SMALLEST text: <h2>, <h3>, <h4> or <h6>? (a) <h4> (b) <h3> (c) <h6> (d) <h2>
  35. 35.🏷️ What does a closing tag have that an opening tag does not? (a) a hash # (b) a dot . (c) a slash / (d) a dollar $
  36. 36.True or false: in <img>, width shows if the image fails. (a) True (b) False
  37. 37.📋 What number does the browser show next to “Mango”?
    <ol start="4">
      <li>Banana</li>
      <li>Mango</li>
      <li>Guava</li>
    </ol>
  38. 38.💬 How does an HTML comment start? (a) // (b) <!-- (c) /* (d) #
  39. 39.📝 What do we need to write HTML? (a) a microphone (b) a paintbrush (c) a printer (d) a plain text editor
  40. 40.🔠 Which heading shows the SMALLEST text: <h5>, <h4>, <h6> or <h1>? (a) <h4> (b) <h1> (c) <h6> (d) <h5>

Answer key

  1. 2
  2. Our school trip
  3. 2
  4. 6
  5. About us
  6. an opening tag
  7. in the body
  8. Yes
  9. in the body
  10. a web server
  11. True
  12. line 3
  13. <h1>
  14. Language
  15. Yes
  16. has an address bar
  17. a line across the page
  18. 3
  19. A happy dog
  20. <meta charset="utf-8">
  21. <h1>
  22. in the head
  23. False
  24. https://example.com
  25. about.html
  26. a web server
  27. 4
  28. <h2>
  29. <h6>
  30. <img>
  31. False
  32. True
  33. Hello, world!
  34. <h6>
  35. a slash /
  36. False
  37. 5
  38. <!--
  39. a plain text editor
  40. <h6>

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