← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 266 · 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 headings are in this code?
    <h1>The red kite</h1>
    <h2>Good morning!</h2>
    <h3>I love mangoes.</h3>
    <p>Hello, world!</p>
  2. 2.🌐 Which one has an address bar? (a) a code editor (b) a web server (c) a web browser
  3. 3.🖼️ Why do we add alt text to an image? (a) to describe the image (b) to load it faster (c) to colour it (d) to make it bigger
  4. 4.💬 Which text will NOT show on the page?
    <p>I love mangoes.</p>
    <p>The red kite</p>
    <!-- <p>Good morning!</p> -->
    (a) The red kite (b) I love mangoes. (c) Good morning!
  5. 5.💬 Which text will NOT show on the page?
    <p>I love mangoes.</p>
    <p>Fun facts</p>
    <!-- <p>Rain today</p> -->
    (a) I love mangoes. (b) Rain today (c) Fun facts
  6. 6.🖼️ Which picture file does the browser load?
    <img src="cake.jpg" alt="Birthday cake" width="200">
    (a) cake.jpg (b) Birthday cake (c) moon.png (d) dog.jpg
  7. 7.📋 Which list tag goes inside ul or ol? (a) <li> (b) <ol> (c) <ul>
  8. 8.🔤 In “HTML”, what do the letters HT stand for? (a) HyperText (b) Hot Tags (c) High Tech (d) Home Text
  9. 9.💬 Which text will NOT show on the page?
    <!-- <p>Hello, world!</p> -->
    <p>I love mangoes.</p>
    <p>Rain today</p>
    (a) Hello, world! (b) Rain today (c) I love mangoes.
  10. 10.🔠 Which heading shows the SMALLEST text: <h2>, <h5>, <h1> or <h3>? (a) <h3> (b) <h1> (c) <h2> (d) <h5>
  11. 11.🖼️ Which attribute of <img> describes the picture? (a) width (b) src (c) alt (d) height
  12. 12.💬 Which text will NOT show on the page?
    <p>Hello, world!</p>
    <p>Our school trip</p>
    <!-- <p>Fun facts</p> -->
    <p>I love mangoes.</p>
    (a) Hello, world! (b) Fun facts (c) I love mangoes. (d) Our school trip
  13. 13.True or false: a web server shows line numbers. (a) False (b) True
  14. 14.Which of these goes in the head? (a) <meta charset="utf-8"> (b) <ul> (c) <h1> (d) <img>
  15. 15.🖼️ Does <img> need a closing tag? (a) No (b) Yes
  16. 16.🔠 How many heading levels does HTML have? (a) 3 (b) 6 (c) 4 (d) 10
  17. 17.True or false: in <img>, alt describes the picture. (a) True (b) False
  18. 18.🔤 In “HTML”, what does the M stand for? (a) Machine (b) Markup (c) Modern (d) Mouse
  19. 19.True or false: <ul> is an empty tag. (a) True (b) False
  20. 20.📋 Does this list show bullets or numbers?
    <ol>
      <li>Mango</li>
      <li>Banana</li>
    </ol>
    (a) bullets (b) numbers
  21. 21.📝 Does <b> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  22. 22.🖼️ How many pixels wide is the picture drawn?
    <img src="fort.jpg" alt="An old fort" width="50">
  23. 23.💬 How does an HTML comment start? (a) <!-- (b) # (c) /* (d) //
  24. 24.🏷️ Which is the closing tag for <h3>? (a) </h3> (b) <h3/> (c) <\h3> (d) <h3>
  25. 25.🌐 Which one turns HTML into a page? (a) a web browser (b) a code editor (c) a web server
  26. 26.🔍 Which line is missing its closing tag?
    line 1: <h3>My best friend
    line 2: <b>Fun facts</b>
    line 3: <h2>My pets</h2>
    (a) line 3 (b) line 2 (c) line 1
  27. 27.🔍 Which is the odd one out? (a) opens web pages for us (b) turns HTML into a page (c) shows pages from the web (d) colours code to help us
  28. 28.Which of these has a closing tag? (a) <input> (b) <img> (c) <hr> (d) <p>
  29. 29.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
  30. 30.💬 How does an HTML comment end? (a) >> (b) // (c) --> (d) */
  31. 31.🖼️ Which attribute of <img> names the picture file? (a) height (b) alt (c) width (d) src
  32. 32.📛 In <a href="x.html">, what is href? (a) a closing tag (b) an attribute (c) an element name (d) a comment
  33. 33.🔗 Which address opens when you click this link?
    <a href="art.html">Visit the site</a>
    (a) Visit the site (b) quiz.html (c) news.html (d) art.html
  34. 34.📝 On how many lines does the browser show this paragraph?
    <p>Rivers flow<br>Roses are red<br>Birds sing<br>Kites fly high</p>
  35. 35.🔗 Which address opens when you click this link?
    <a href="maths.html">About us</a>
    (a) About us (b) maths.html (c) news.html (d) art.html
  36. 36.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Riya’s Recipes</title>
    </head>
    <body>
      <h1>Match report</h1>
      <p>We won by 5 runs.</p>
    </body>
    </html>
    (a) Match report (b) We won by 5 runs. (c) index.html (d) Riya’s Recipes
  37. 37.True or false: <ul> shows bullet points. (a) True (b) False
  38. 38.True or false: <ol> lists steps in order. (a) True (b) False
  39. 39.🔠 Which heading shows the BIGGEST text: <h6>, <h4>, <h1> or <h3>? (a) <h3> (b) <h4> (c) <h6> (d) <h1>
  40. 40.True or false: <ol> is an unordered list. (a) True (b) False

Answer key

  1. 3
  2. a web browser
  3. to describe the image
  4. Good morning!
  5. Rain today
  6. cake.jpg
  7. <li>
  8. HyperText
  9. Hello, world!
  10. <h5>
  11. alt
  12. Fun facts
  13. False
  14. <meta charset="utf-8">
  15. No
  16. 6
  17. True
  18. Markup
  19. False
  20. numbers
  21. has a closing tag
  22. 50
  23. <!--
  24. </h3>
  25. a web browser
  26. line 1
  27. colours code to help us
  28. <p>
  29. Yes
  30. -->
  31. src
  32. an attribute
  33. art.html
  34. 4
  35. maths.html
  36. Riya’s Recipes
  37. True
  38. True
  39. <h1>
  40. False

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