← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 868 · 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>Good morning!</p>
    <p>Hello, world!</p>
    <p>Cricket is fun.</p>
    <!-- <p>The red kite</p> -->
    (a) Good morning! (b) Hello, world! (c) Cricket is fun. (d) The red kite
  2. 2.🔠 How many headings are in this code?
    <h1>Rain today</h1>
    <h4>Rain today</h4>
    <p>The red kite</p>
  3. 3.🔠 Which heading shows the BIGGEST text: <h4>, <h2>, <h5> or <h1>? (a) <h2> (b) <h5> (c) <h4> (d) <h1>
  4. 4.📋 Which list suits a shopping list in any order? (a) <ol> (b) <hr> (c) <ul> (d) <br>
  5. 5.📝 On how many lines does the browser show this paragraph?
    <p>Roses are red<br>Kites fly high</p>
  6. 6.🔍 One closing tag is missing. Which one?
    <p>My pets</p>
    <strong>The red kite
    <h1>My best friend</h1>
    (a) </h1> (b) </p> (c) </strong> (d) </h2>
  7. 7.🔍 One closing tag is missing. Which one?
    <h1>Fun facts
    <h2>Good morning!</h2>
    <small>My pets</small>
    (a) </h1> (b) </small> (c) </b> (d) </h2>
  8. 8.True or false: <title> has a closing tag. (a) True (b) False
  9. 9.🔠 How many headings are in this code?
    <h1>My best friend</h1>
    <h2>Good morning!</h2>
    <h4>Our school trip</h4>
    <p>The red kite</p>
    <p>My best friend</p>
  10. 10.🔗 Which tag makes a clickable link? (a) <p> (b) <img> (c) <link> (d) <a>
  11. 11.Which of these is true of a web browser? (a) opens web pages for us (b) saves our .html files (c) shows line numbers (d) sends pages over the net
  12. 12.🖼️ How many pixels wide is the picture drawn?
    <img src="kite.png" alt="A red kite" width="350">
  13. 13.🔗 Which code links to about.html? (a) <a src="about.html"> (b) <link about.html> (c) <a alt="about.html"> (d) <a href="about.html">
  14. 14.True or false: a web browser turns HTML into a page. (a) True (b) False
  15. 15.🔠 Which heading shows the BIGGEST text: <h2>, <h1>, <h3> or <h4>? (a) <h1> (b) <h4> (c) <h2> (d) <h3>
  16. 16.🔠 Which heading shows the BIGGEST text: <h3>, <h4>, <h6> or <h1>? (a) <h3> (b) <h4> (c) <h6> (d) <h1>
  17. 17.📝 Does <br> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  18. 18.Which of these is a closing tag? (a) <b> (b) <h1> (c) </p> (d) <p>
  19. 19.🔍 Which line is missing its closing tag?
    line 1: <b>Good morning!</b>
    line 2: <i>Rain today</i>
    line 3: <h3>Our school trip
    (a) line 3 (b) line 1 (c) line 2
  20. 20.🔠 Which heading shows the BIGGEST text: <h4>, <h2>, <h3> or <h1>? (a) <h1> (b) <h4> (c) <h2> (d) <h3>
  21. 21.Which of these is true of a web browser? (a) is where we type code (b) turns HTML into a page (c) sends pages over the net (d) colours code to help us
  22. 22.💬 Which text will NOT show on the page?
    <!-- <p>Our school trip</p> -->
    <p>The red kite</p>
    <p>Cricket is fun.</p>
    (a) Our school trip (b) Cricket is fun. (c) The red kite
  23. 23.Which of these has a closing tag? (a) <input> (b) <br> (c) <li> (d) <meta>
  24. 24.💬 Which text will NOT show on the page?
    <!-- <p>Rain today</p> -->
    <p>Hello, world!</p>
    <p>The red kite</p>
    <p>My best friend</p>
    (a) The red kite (b) My best friend (c) Hello, world! (d) Rain today
  25. 25.🔠 Which heading shows the SMALLEST text: <h4>, <h6>, <h1> or <h5>? (a) <h5> (b) <h1> (c) <h4> (d) <h6>
  26. 26.🔍 One closing tag is missing. Which one?
    <h3>My pets</h3>
    <small>My best friend</small>
    <u>Fun facts
    (a) </h3> (b) </u> (c) </em> (d) </small>
  27. 27.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="tiger.jpg" alt="A tiger asleep" width="50">
    (a) A red kite (b) width (c) tiger.jpg (d) A tiger asleep
  28. 28.📄 Where does the text of <title> appear? (a) at the bottom (b) in a big heading (c) on the browser tab (d) nowhere
  29. 29.True or false: a web server sends pages over the net. (a) False (b) True
  30. 30.🔠 Which heading shows the BIGGEST text: <h5>, <h2>, <h1> or <h3>? (a) <h1> (b) <h3> (c) <h5> (d) <h2>
  31. 31.🔠 How many headings are in this code?
    <h1>I love mangoes.</h1>
    <h3>Cricket is fun.</h3>
    <p>Rain today</p>
  32. 32.🏷️ Is </b> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  33. 33.🖼️ Which attribute of <img> shows if the image fails? (a) width (b) height (c) alt (d) src
  34. 34.📝 How many paragraphs does this code make?
    <p>Our school trip</p>
    <p>I love mangoes.</p>
    <p>The red kite</p>
    <p>Our school trip</p>
    <p>Good morning!</p>
  35. 35.🖼️ Which tag puts a picture on a page? (a) <a> (b) <pic> (c) <img> (d) <p>
  36. 36.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Space Facts</title>
    </head>
    <body>
      <h1>Planets</h1>
      <p>Mars is red.</p>
    </body>
    </html>
    (a) Mars is red. (b) Planets (c) index.html (d) Space Facts
  37. 37.True or false: in <img>, src is read by screen readers. (a) True (b) False
  38. 38.🏷️ Is <h1> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  39. 39.💬 Which text will NOT show on the page?
    <p>Good morning!</p>
    <p>Cricket is fun.</p>
    <p>I love mangoes.</p>
    <!-- <p>Our school trip</p> -->
    (a) Cricket is fun. (b) I love mangoes. (c) Our school trip (d) Good morning!
  40. 40.🔗 Which address opens when you click this link?
    <a href="art.html">Art corner</a>
    (a) quiz.html (b) Art corner (c) news.html (d) art.html

Answer key

  1. The red kite
  2. 2
  3. <h1>
  4. <ul>
  5. 2
  6. </strong>
  7. </h1>
  8. True
  9. 3
  10. <a>
  11. opens web pages for us
  12. 350
  13. <a href="about.html">
  14. True
  15. <h1>
  16. <h1>
  17. an empty tag
  18. </p>
  19. line 3
  20. <h1>
  21. turns HTML into a page
  22. Our school trip
  23. <li>
  24. Rain today
  25. <h6>
  26. </u>
  27. A tiger asleep
  28. on the browser tab
  29. True
  30. <h1>
  31. 2
  32. a closing tag
  33. alt
  34. 5
  35. <img>
  36. Space Facts
  37. False
  38. an opening tag
  39. Our school trip
  40. art.html

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