← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 466 · 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>The red kite</p>
    <p>I love mangoes.</p>
    <p>My pets</p>
    <!-- <p>Good morning!</p> -->
  2. 2.🌐 Which one is where we type code? (a) a web server (b) a code editor (c) a web browser
  3. 3.📄 Where does <a> go: in the head or in the body? (a) in the head (b) in the body
  4. 4.True or false: a web server saves our .html files. (a) True (b) False
  5. 5.🔠 How many headings are in this code?
    <h1>Our school trip</h1>
    <p>Hello, world!</p>
    <p>Good morning!</p>
    <h3>My best friend</h3>
    <h4>The red kite</h4>
  6. 6.📋 Which list shows the steps of a recipe best? (a) <hr> (b) <ol> (c) <br> (d) <ul>
  7. 7.True or false: HTML on its own cannot run a game loop. (a) True (b) False
  8. 8.💬 Which text will NOT show on the page?
    <!-- <p>The red kite</p> -->
    <p>Rain today</p>
    <p>I love mangoes.</p>
    (a) I love mangoes. (b) The red kite (c) Rain today
  9. 9.🔠 Are headings shown in bold by default? (a) Yes (b) No
  10. 10.🔠 How many heading levels does HTML have? (a) 10 (b) 6 (c) 4 (d) 3
  11. 11.🔍 Which line is missing its closing tag?
    line 1: <h1>Rain today
    line 2: <em>Fun facts</em>
    line 3: <h3>I love mangoes.</h3>
    (a) line 2 (b) line 3 (c) line 1
  12. 12.💬 How many paragraphs show on the page?
    <!-- <p>Hello, world!</p> -->
    <!-- <p>The red kite</p> -->
    <p>Rain today</p>
    <!-- <p>Our school trip</p> -->
    <!-- <p>I love mangoes.</p> -->
  13. 13.True or false: <li> is an unordered list. (a) False (b) True
  14. 14.💬 How many paragraphs show on the page?
    <!-- <p>Cricket is fun.</p> -->
    <p>I love mangoes.</p>
    <p>Hello, world!</p>
    <p>My pets</p>
  15. 15.🖼️ How many pixels wide is the picture drawn?
    <img src="fort.jpg" alt="An old fort" width="400">
  16. 16.🔍 One closing tag is missing. Which one?
    <small>I love mangoes.</small>
    <i>Good morning!</i>
    <em>Our school trip
    (a) </i> (b) </small> (c) </em> (d) </u>
  17. 17.📋 Which list tag lists things in any order? (a) <ul> (b) <li> (c) <ol>
  18. 18.🔠 Which tag is the least important heading? (a) <p> (b) <h6> (c) <h3> (d) <h1>
  19. 19.📋 Does this list show bullets or numbers?
    <ol>
      <li>Jamun</li>
      <li>Guava</li>
      <li>Grapes</li>
    </ol>
    (a) bullets (b) numbers
  20. 20.True or false: HTML on its own can make links to pages. (a) True (b) False
  21. 21.Which of these is a closing tag? (a) <h1> (b) </li> (c) <p> (d) <body>
  22. 22.🏷️ What does a closing tag have that an opening tag does not? (a) a dollar $ (b) a dot . (c) a slash / (d) a hash #
  23. 23.📄 Can HTML on its own count button clicks? (a) No (b) Yes
  24. 24.📄 Where does <ul> go: in the head or in the body? (a) in the body (b) in the head
  25. 25.📋 Which list tag shows bullet points? (a) <ul> (b) <li> (c) <ol>
  26. 26.📋 What number does the browser show next to “Grapes”?
    <ol>
      <li>Banana</li>
      <li>Grapes</li>
      <li>Guava</li>
      <li>Litchi</li>
    </ol>
  27. 27.🖼️ Which attribute of <img> shows if the image fails? (a) width (b) alt (c) src (d) height
  28. 28.🖼️ Which picture file does the browser load?
    <img src="dog.jpg" alt="A happy dog" width="350">
    (a) A happy dog (b) moon.png (c) bus.jpg (d) dog.jpg
  29. 29.🔗 Which address opens when you click this link?
    <a href="contact.html">Maths fun</a>
    (a) https://example.com (b) maths.html (c) Maths fun (d) contact.html
  30. 30.🔗 Which address opens when you click this link?
    <a href="news.html">About us</a>
    (a) quiz.html (b) About us (c) games.html (d) news.html
  31. 31.Which of these has a closing tag? (a) <b> (b) <img> (c) <hr> (d) <br>
  32. 32.🖼️ Which attribute of <img> sets how wide it is? (a) height (b) width (c) src (d) alt
  33. 33.Which of these is true of a code editor? (a) answers page requests (b) sends pages over the net (c) hosts websites online (d) shows line numbers
  34. 34.Which of these has a closing tag? (a) <hr> (b) <br> (c) <li> (d) <img>
  35. 35.💬 Which text will NOT show on the page?
    <!-- <p>Rain today</p> -->
    <p>Hello, world!</p>
    <p>Our school trip</p>
    (a) Hello, world! (b) Rain today (c) Our school trip
  36. 36.🏷️ Is </p> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  37. 37.📝 Does <br> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  38. 38.True or false: a web browser has an address bar. (a) True (b) False
  39. 39.📝 On how many lines does the browser show this paragraph?
    <p>Rivers flow<br>Roses are red<br>Birds sing</p>
  40. 40.True or false: HTML on its own cannot show paragraphs. (a) False (b) True

Answer key

  1. 3
  2. a code editor
  3. in the body
  4. False
  5. 3
  6. <ol>
  7. True
  8. The red kite
  9. Yes
  10. 6
  11. line 1
  12. 1
  13. False
  14. 3
  15. 400
  16. </em>
  17. <ul>
  18. <h6>
  19. numbers
  20. True
  21. </li>
  22. a slash /
  23. No
  24. in the body
  25. <ul>
  26. 2
  27. alt
  28. dog.jpg
  29. contact.html
  30. news.html
  31. <b>
  32. width
  33. shows line numbers
  34. <li>
  35. Rain today
  36. a closing tag
  37. an empty tag
  38. True
  39. 3
  40. False

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