← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 396 · 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 text will NOT show on the page?
    <p>Fun facts</p>
    <p>My best friend</p>
    <!-- <p>I love mangoes.</p> -->
    <p>Rain today</p>
    (a) I love mangoes. (b) My best friend (c) Fun facts (d) Rain today
  2. 2.💬 How many paragraphs show on the page?
    <!-- <p>The red kite</p> -->
    <p>Our school trip</p>
    <!-- <p>My pets</p> -->
    <p>My best friend</p>
    <!-- <p>Cricket is fun.</p> -->
  3. 3.🖼️ Which picture file does the browser load?
    <img src="cake.jpg" alt="Birthday cake" width="150">
    (a) cake.jpg (b) dog.jpg (c) Birthday cake (d) moon.png
  4. 4.🖼️ Which picture file does the browser load?
    <img src="dog.jpg" alt="A happy dog" width="150">
    (a) A happy dog (b) bus.jpg (c) dog.jpg (d) moon.png
  5. 5.🔠 Which heading shows the BIGGEST text: <h4>, <h5>, <h3> or <h2>? (a) <h3> (b) <h2> (c) <h5> (d) <h4>
  6. 6.📋 How many items does this list show?
    <ol>
      <li>Litchi</li>
      <li>Grapes</li>
    </ol>
  7. 7.📋 Which list suits a shopping list in any order? (a) <ol> (b) <hr> (c) <ul> (d) <br>
  8. 8.True or false: in <img>, width is read by screen readers. (a) False (b) True
  9. 9.True or false: <link rel="stylesheet"> goes in the head. (a) False (b) True
  10. 10.📝 What does <hr> draw? (a) a table (b) a link (c) a picture (d) a line across the page
  11. 11.💬 Which text will NOT show on the page?
    <p>My best friend</p>
    <p>Fun facts</p>
    <!-- <p>My pets</p> -->
    <p>Hello, world!</p>
    (a) Hello, world! (b) Fun facts (c) My best friend (d) My pets
  12. 12.🔍 One closing tag is missing. Which one?
    <i>Cricket is fun.</i>
    <em>I love mangoes.</em>
    <p>My best friend
    (a) </i> (b) </em> (c) </u> (d) </p>
  13. 13.🔠 How many headings are in this code?
    <h1>I love mangoes.</h1>
    <p>Our school trip</p>
    <p>My best friend</p>
  14. 14.Which of these is true of a web server? (a) stores a website’s files (b) saves our .html files (c) shows pages from the web (d) turns HTML into a page
  15. 15.💬 Which text will NOT show on the page?
    <!-- <p>I love mangoes.</p> -->
    <p>Cricket is fun.</p>
    <p>Rain today</p>
    <p>My best friend</p>
    (a) My best friend (b) Cricket is fun. (c) Rain today (d) I love mangoes.
  16. 16.🔍 Which line is missing its closing tag?
    line 1: <u>The red kite</u>
    line 2: <p>Hello, world!
    line 3: <i>Cricket is fun.</i>
    (a) line 2 (b) line 3 (c) line 1
  17. 17.📋 Does this list show bullets or numbers?
    <ol>
      <li>Banana</li>
      <li>Jamun</li>
      <li>Mango</li>
    </ol>
    (a) numbers (b) bullets
  18. 18.🧩 An opening tag + content + a closing tag together make an ___. (a) attribute (b) address (c) element (d) editor
  19. 19.💾 A web page file usually ends with which extension? (a) .png (b) .txt (c) .mp3 (d) .html
  20. 20.True or false: a code editor opens web pages for us. (a) True (b) False
  21. 21.📄 Where does <img> go: in the head or in the body? (a) in the head (b) in the body
  22. 22.🔍 One closing tag is missing. Which one?
    <b>Our school trip
    <em>Fun facts</em>
    <h3>Hello, world!</h3>
    (a) </strong> (b) </em> (c) </h3> (d) </b>
  23. 23.📋 Which list tag goes inside ul or ol? (a) <li> (b) <ol> (c) <ul>
  24. 24.🔍 Which is the odd one out? (a) shows pages from the web (b) has an address bar (c) saves our .html files (d) opens web pages for us
  25. 25.🔗 Where does this link open?
    <a href="contact.html">Visit the site</a>
    (a) in a new tab (b) in the same tab
  26. 26.Which of these is true of a web server? (a) answers page requests (b) shows pages from the web (c) shows line numbers (d) turns HTML into a page
  27. 27.💬 How many paragraphs show on the page?
    <!-- <p>My pets</p> -->
    <!-- <p>I love mangoes.</p> -->
    <p>Hello, world!</p>
    <!-- <p>Good morning!</p> -->
    <!-- <p>Cricket is fun.</p> -->
  28. 28.🖼️ Why do we add alt text to an image? (a) to describe the image (b) to make it bigger (c) to colour it (d) to load it faster
  29. 29.True or false: <meta> is an empty tag. (a) False (b) True
  30. 30.🏷️ Is <li> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  31. 31.📝 On how many lines does the browser show this paragraph?
    <p>Stars shine<br>Roses are red<br>Sky is blue<br>Rivers flow<br>Kites fly high</p>
  32. 32.True or false: <br> has a closing tag. (a) True (b) False
  33. 33.📝 On how many lines does the browser show this paragraph?
    <p>Roses are red<br>Stars shine<br>Birds sing<br>Sky is blue</p>
  34. 34.📝 What does <p> make? (a) a link (b) a paragraph (c) a table (d) a picture
  35. 35.🔗 Which address opens when you click this link?
    <a href="news.html">Play games</a>
    (a) Play games (b) games.html (c) news.html (d) quiz.html
  36. 36.📄 Where does <a> go: in the head or in the body? (a) in the head (b) in the body
  37. 37.🔠 Which heading shows the SMALLEST text: <h1>, <h5>, <h3> or <h6>? (a) <h3> (b) <h6> (c) <h1> (d) <h5>
  38. 38.True or false: <ol> lists things in any order. (a) False (b) True
  39. 39.💬 How many paragraphs show on the page?
    <!-- <p>Fun facts</p> -->
    <!-- <p>The red kite</p> -->
    <!-- <p>Hello, world!</p> -->
    <p>Good morning!</p>
    <!-- <p>My pets</p> -->
  40. 40.📝 On how many lines does the browser show this paragraph?
    <p>Rivers flow<br>Roses are red<br>Birds sing<br>Kites fly high<br>Stars shine</p>

Answer key

  1. I love mangoes.
  2. 2
  3. cake.jpg
  4. dog.jpg
  5. <h2>
  6. 2
  7. <ul>
  8. False
  9. True
  10. a line across the page
  11. My pets
  12. </p>
  13. 1
  14. stores a website’s files
  15. I love mangoes.
  16. line 2
  17. numbers
  18. element
  19. .html
  20. False
  21. in the body
  22. </b>
  23. <li>
  24. saves our .html files
  25. in the same tab
  26. answers page requests
  27. 1
  28. to describe the image
  29. True
  30. an opening tag
  31. 5
  32. False
  33. 4
  34. a paragraph
  35. news.html
  36. in the body
  37. <h6>
  38. False
  39. 1
  40. 5

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