← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 163 · 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 text bold (c) adds a picture (d) makes a list
  2. 2.🔍 Which is the odd one out? (a) is where we type code (b) saves our .html files (c) answers page requests (d) colours code to help us
  3. 3.💬 Which text will NOT show on the page?
    <!-- <p>Our school trip</p> -->
    <p>Cricket is fun.</p>
    <p>My pets</p>
    <p>Hello, world!</p>
    (a) Cricket is fun. (b) My pets (c) Hello, world! (d) Our school trip
  4. 4.True or false: HTML on its own cannot make bullet lists. (a) False (b) True
  5. 5.🔗 Which address opens when you click this link?
    <a href="art.html">About us</a>
    (a) news.html (b) About us (c) art.html (d) quiz.html
  6. 6.🖼️ Which picture file does the browser load?
    <img src="bus.jpg" alt="Our school bus" width="400">
    (a) bus.jpg (b) tiger.jpg (c) Our school bus (d) fort.jpg
  7. 7.True or false: a web browser opens web pages for us. (a) False (b) True
  8. 8.🖼️ Which attribute of <img> names the picture file? (a) alt (b) src (c) height (d) width
  9. 9.🔍 Which line is missing its closing tag?
    line 1: <i>My pets</i>
    line 2: <h2>The red kite
    line 3: <p>Rain today</p>
    (a) line 1 (b) line 3 (c) line 2
  10. 10.🔠 How many headings are in this code?
    <h1>Rain today</h1>
    <h2>I love mangoes.</h2>
    <p>Hello, world!</p>
    <p>I love mangoes.</p>
  11. 11.Which of these goes in the body? (a) <link rel="stylesheet"> (b) <title> (c) <p> (d) <meta charset="utf-8">
  12. 12.🏷️ Is </body> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  13. 13.Which of these goes in the head? (a) <title> (b) <h1> (c) <a> (d) <ul>
  14. 14.📝 How many paragraphs does this code make?
    <p>Good morning!</p>
    <p>My pets</p>
    <p>The red kite</p>
    <h2>I love mangoes.</h2>
  15. 15.🔍 One closing tag is missing. Which one?
    <strong>Hello, world!</strong>
    <h1>My best friend
    <i>Good morning!</i>
    (a) </strong> (b) </h1> (c) </i> (d) </h2>
  16. 16.💬 Which text will NOT show on the page?
    <p>Hello, world!</p>
    <p>Cricket is fun.</p>
    <!-- <p>My best friend</p> -->
    (a) Cricket is fun. (b) My best friend (c) Hello, world!
  17. 17.Which of these is an empty tag? (a) <ul> (b) <b> (c) <li> (d) <meta>
  18. 18.📝 On how many lines does the browser show this paragraph?
    <p>Birds sing<br>Kites fly high</p>
  19. 19.🏷️ Is <title> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  20. 20.💬 Which text will NOT show on the page?
    <p>My pets</p>
    <p>The red kite</p>
    <p>Rain today</p>
    <!-- <p>I love mangoes.</p> -->
    (a) I love mangoes. (b) The red kite (c) My pets (d) Rain today
  21. 21.📄 Where does <img> go: in the head or in the body? (a) in the head (b) in the body
  22. 22.Which of these goes in the body? (a) <title> (b) <meta charset="utf-8"> (c) <link rel="stylesheet"> (d) <h1>
  23. 23.💬 How many paragraphs show on the page?
    <p>The red kite</p>
    <!-- <p>My pets</p> -->
    <p>Rain today</p>
    <p>I love mangoes.</p>
    <!-- <p>My best friend</p> -->
  24. 24.📋 What number does the browser show next to “Litchi”?
    <ol start="2">
      <li>Jamun</li>
      <li>Guava</li>
      <li>Grapes</li>
      <li>Mango</li>
      <li>Papaya</li>
      <li>Litchi</li>
    </ol>
  25. 25.True or false: <li> has a closing tag. (a) False (b) True
  26. 26.🔍 One closing tag is missing. Which one?
    <p>Rain today
    <h1>Cricket is fun.</h1>
    <h2>My pets</h2>
    (a) </small> (b) </p> (c) </h2> (d) </h1>
  27. 27.True or false: a web browser hosts websites online. (a) True (b) False
  28. 28.🔠 How many heading levels does HTML have? (a) 10 (b) 3 (c) 4 (d) 6
  29. 29.True or false: <li> is an empty tag. (a) False (b) True
  30. 30.🖼️ Which picture file does the browser load?
    <img src="bus.jpg" alt="Our school bus" width="100">
    (a) Our school bus (b) tiger.jpg (c) bus.jpg (d) fort.jpg
  31. 31.Which of these goes in the head? (a) <table> (b) <a> (c) <h1> (d) <meta charset="utf-8">
  32. 32.📋 Which list tag lists things in any order? (a) <li> (b) <ul> (c) <ol>
  33. 33.💬 How does an HTML comment end? (a) */ (b) >> (c) // (d) -->
  34. 34.🌐 Which one shows pages from the web? (a) a web browser (b) a code editor (c) a web server
  35. 35.True or false: <ol> lists steps in order. (a) False (b) True
  36. 36.🔠 Which tag is used for the main title on a page? (a) <p> (b) <h1> (c) <br> (d) <h6>
  37. 37.💬 How many paragraphs show on the page?
    <!-- <p>Rain today</p> -->
    <!-- <p>Hello, world!</p> -->
    <!-- <p>My pets</p> -->
    <p>I love mangoes.</p>
    <p>Our school trip</p>
  38. 38.🔗 Which address opens when you click this link?
    <a href="https://example.com">Maths fun</a>
    (a) art.html (b) https://example.com (c) Maths fun (d) maths.html
  39. 39.Which of these is true of a web browser? (a) opens web pages for us (b) answers page requests (c) colours code to help us (d) shows line numbers
  40. 40.Which of these goes in the head? (a) <ul> (b) <img> (c) <style> (d) <table>

Answer key

  1. starts a new line
  2. answers page requests
  3. Our school trip
  4. False
  5. art.html
  6. bus.jpg
  7. True
  8. src
  9. line 2
  10. 2
  11. <p>
  12. a closing tag
  13. <title>
  14. 3
  15. </h1>
  16. My best friend
  17. <meta>
  18. 2
  19. an opening tag
  20. I love mangoes.
  21. in the body
  22. <h1>
  23. 3
  24. 7
  25. True
  26. </p>
  27. False
  28. 6
  29. False
  30. bus.jpg
  31. <meta charset="utf-8">
  32. <ul>
  33. -->
  34. a web browser
  35. True
  36. <h1>
  37. 2
  38. https://example.com
  39. opens web pages for us
  40. <style>

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