← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 85 · 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 does this code make?
    <p>I love mangoes.</p>
    <p>My best friend</p>
    <h2>Rain today</h2>
    <p>My best friend</p>
    <p>My pets</p>
    <p>Cricket is fun.</p>
  2. 2.💬 Which text will NOT show on the page?
    <p>Hello, world!</p>
    <p>My pets</p>
    <!-- <p>Good morning!</p> -->
    (a) Good morning! (b) Hello, world! (c) My pets
  3. 3.True or false: in <img>, src names the picture file. (a) True (b) False
  4. 4.🔗 Which attribute holds the address of a link? (a) id (b) href (c) alt (d) src
  5. 5.Which of these goes in the body? (a) <ul> (b) <style> (c) <meta charset="utf-8"> (d) <title>
  6. 6.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="dog.jpg" alt="A happy dog" width="350">
    (a) width (b) dog.jpg (c) The full moon (d) A happy dog
  7. 7.🔗 Which address opens when you click this link?
    <a href="news.html">About us</a>
    (a) quiz.html (b) games.html (c) news.html (d) About us
  8. 8.💬 How many paragraphs show on the page?
    <p>My best friend</p>
    <!-- <p>Our school trip</p> -->
    <p>The red kite</p>
    <!-- <p>I love mangoes.</p> -->
    <p>My pets</p>
  9. 9.🔠 How many headings are in this code?
    <h1>Our school trip</h1>
    <h4>My best friend</h4>
    <p>Fun facts</p>
  10. 10.True or false: <li> shows bullet points. (a) False (b) True
  11. 11.🔠 Which heading shows the BIGGEST text: <h5>, <h6>, <h2> or <h4>? (a) <h6> (b) <h5> (c) <h2> (d) <h4>
  12. 12.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the body (b) in the head
  13. 13.🖼️ Does <img> need a closing tag? (a) Yes (b) No
  14. 14.🔠 How many headings are in this code?
    <h1>My best friend</h1>
    <p>My best friend</p>
    <p>Rain today</p>
    <p>I love mangoes.</p>
    <h2>My pets</h2>
  15. 15.Which of these is true of a code editor? (a) sends pages over the net (b) has an address bar (c) shows pages from the web (d) colours code to help us
  16. 16.🔍 One closing tag is missing. Which one?
    <b>Our school trip</b>
    <p>Hello, world!
    <em>I love mangoes.</em>
    (a) </h1> (b) </p> (c) </b> (d) </em>
  17. 17.🏷️ Is <body> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  18. 18.🔗 Which words do you click on?
    <a href="games.html">About us</a>
    (a) Contact us (b) games.html (c) About us (d) href
  19. 19.💬 How many paragraphs show on the page?
    <p>I love mangoes.</p>
    <!-- <p>The red kite</p> -->
    <!-- <p>Our school trip</p> -->
    <p>Cricket is fun.</p>
  20. 20.🔗 Which address opens when you click this link?
    <a href="quiz.html">Art corner</a>
    (a) about.html (b) games.html (c) Art corner (d) quiz.html
  21. 21.📋 Which list suits a shopping list in any order? (a) <br> (b) <hr> (c) <ol> (d) <ul>
  22. 22.💬 How many paragraphs show on the page?
    <p>I love mangoes.</p>
    <p>Our school trip</p>
    <!-- <p>Rain today</p> -->
  23. 23.💬 Which text will NOT show on the page?
    <p>Good morning!</p>
    <p>I love mangoes.</p>
    <!-- <p>Our school trip</p> -->
    <p>Cricket is fun.</p>
    (a) Our school trip (b) Good morning! (c) I love mangoes. (d) Cricket is fun.
  24. 24.💬 Does the browser show comments on the page? (a) Yes (b) No
  25. 25.💬 Which text will NOT show on the page?
    <!-- <p>Hello, world!</p> -->
    <p>Our school trip</p>
    <p>My best friend</p>
    (a) My best friend (b) Our school trip (c) Hello, world!
  26. 26.📋 Which list tag goes inside ul or ol? (a) <li> (b) <ul> (c) <ol>
  27. 27.💬 How many paragraphs show on the page?
    <!-- <p>Our school trip</p> -->
    <p>Good morning!</p>
    <p>My pets</p>
  28. 28.💬 Which text will NOT show on the page?
    <p>My pets</p>
    <p>I love mangoes.</p>
    <p>Our school trip</p>
    <!-- <p>My best friend</p> -->
    (a) Our school trip (b) I love mangoes. (c) My best friend (d) My pets
  29. 29.📄 Where does the text of <title> appear? (a) at the bottom (b) nowhere (c) in a big heading (d) on the browser tab
  30. 30.🔠 Which tag is the least important heading? (a) <p> (b) <h3> (c) <h1> (d) <h6>
  31. 31.💬 Which text will NOT show on the page?
    <!-- <p>Cricket is fun.</p> -->
    <p>I love mangoes.</p>
    <p>Fun facts</p>
    (a) Cricket is fun. (b) Fun facts (c) I love mangoes.
  32. 32.Which of these is true of a web server? (a) hosts websites online (b) colours code to help us (c) turns HTML into a page (d) shows pages from the web
  33. 33.💬 How many paragraphs show on the page?
    <p>My pets</p>
    <p>Cricket is fun.</p>
    <!-- <p>I love mangoes.</p> -->
  34. 34.📝 On how many lines does the browser show this paragraph?
    <p>Sky is blue<br>Birds sing</p>
  35. 35.Which of these is an empty tag? (a) <br> (b) <h1> (c) <p> (d) <title>
  36. 36.💬 How does an HTML comment end? (a) // (b) >> (c) --> (d) */
  37. 37.📄 Where does <style> go: in the head or in the body? (a) in the head (b) in the body
  38. 38.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as a new line (b) as one space (c) as a dot (d) as 5 spaces
  39. 39.🔗 Which words do you click on?
    <a href="https://example.com">Play games</a>
    (a) https://example.com (b) href (c) Play games (d) About us
  40. 40.True or false: <meta> has a closing tag. (a) True (b) False

Answer key

  1. 5
  2. Good morning!
  3. True
  4. href
  5. <ul>
  6. A happy dog
  7. news.html
  8. 3
  9. 2
  10. False
  11. <h2>
  12. in the head
  13. No
  14. 2
  15. colours code to help us
  16. </p>
  17. an opening tag
  18. About us
  19. 2
  20. quiz.html
  21. <ul>
  22. 2
  23. Our school trip
  24. No
  25. Hello, world!
  26. <li>
  27. 2
  28. My best friend
  29. on the browser tab
  30. <h6>
  31. Cricket is fun.
  32. hosts websites online
  33. 2
  34. 2
  35. <br>
  36. -->
  37. in the head
  38. as one space
  39. Play games
  40. False

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