← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 430 · 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 heading shows the BIGGEST text: <h1>, <h6>, <h2> or <h5>? (a) <h6> (b) <h2> (c) <h1> (d) <h5>
  2. 2.📋 Which list tag goes inside ul or ol? (a) <ul> (b) <li> (c) <ol>
  3. 3.🌐 Which one shows line numbers? (a) a web browser (b) a code editor (c) a web server
  4. 4.📋 Does this list show bullets or numbers?
    <ul>
      <li>Jamun</li>
      <li>Banana</li>
      <li>Papaya</li>
    </ul>
    (a) numbers (b) bullets
  5. 5.📋 Which list tag is an ordered list? (a) <ol> (b) <ul> (c) <li>
  6. 6.True or false: <ul> is an ordered list. (a) False (b) True
  7. 7.🖼️ Which attribute of <img> is read by screen readers? (a) src (b) width (c) alt (d) height
  8. 8.🔍 Which line is missing its closing tag?
    line 1: <h3>Rain today</h3>
    line 2: <u>The red kite
    line 3: <h2>My pets</h2>
    (a) line 2 (b) line 3 (c) line 1
  9. 9.Which of these is true of a web server? (a) stores a website’s files (b) saves our .html files (c) colours code to help us (d) opens web pages for us
  10. 10.🔠 Which heading shows the BIGGEST text: <h6>, <h2>, <h1> or <h3>? (a) <h2> (b) <h3> (c) <h6> (d) <h1>
  11. 11.🔗 Which code links to about.html? (a) <a href="about.html"> (b) <a alt="about.html"> (c) <a src="about.html"> (d) <link about.html>
  12. 12.💬 How does an HTML comment start? (a) # (b) /* (c) <!-- (d) //
  13. 13.📄 Where does the text of <title> appear? (a) in a big heading (b) nowhere (c) on the browser tab (d) at the bottom
  14. 14.🔗 Where does this link open?
    <a href="contact.html">Maths fun</a>
    (a) in a new tab (b) in the same tab
  15. 15.Which of these goes in the head? (a) <p> (b) <style> (c) <ul> (d) <table>
  16. 16.Which of these goes in the body? (a) <h1> (b) <title> (c) <meta charset="utf-8"> (d) <link rel="stylesheet">
  17. 17.📄 What is the first line of an HTML5 page? (a) <!DOCTYPE html> (b) <head> (c) <body> (d) <html>
  18. 18.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>My Hobbies</title>
    </head>
    <body>
      <h1>Match report</h1>
      <p>Try this poha.</p>
    </body>
    </html>
    (a) My Hobbies (b) Match report (c) body (d) Try this poha.
  19. 19.Which of these is an opening tag? (a) </p> (b) <li> (c) </h1> (d) </title>
  20. 20.📋 Does this list show bullets or numbers?
    <ul>
      <li>Mango</li>
      <li>Banana</li>
    </ul>
    (a) numbers (b) bullets
  21. 21.📋 Does this list show bullets or numbers?
    <ol>
      <li>Litchi</li>
      <li>Mango</li>
      <li>Jamun</li>
    </ol>
    (a) bullets (b) numbers
  22. 22.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="map.png" alt="Map of India" width="50">
    (a) Map of India (b) width (c) Birthday cake (d) map.png
  23. 23.📝 On how many lines does the browser show this paragraph?
    <p>Roses are red<br>Kites fly high<br>Birds sing</p>
  24. 24.🔍 Which is the odd one out? (a) colours code to help us (b) shows line numbers (c) answers page requests (d) is where we type code
  25. 25.💬 How does an HTML comment end? (a) */ (b) >> (c) // (d) -->
  26. 26.Which of these goes in the head? (a) <ul> (b) <link rel="stylesheet"> (c) <h1> (d) <table>
  27. 27.🏷️ Is </title> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  28. 28.True or false: HTML on its own can make bullet lists. (a) True (b) False
  29. 29.📄 Which part holds everything you see on the page? (a) the title (b) the doctype (c) the head (d) the body
  30. 30.🔠 Which tag is used for the main title on a page? (a) <p> (b) <br> (c) <h1> (d) <h6>
  31. 31.Which of these is true of a code editor? (a) saves our .html files (b) has an address bar (c) stores a website’s files (d) answers page requests
  32. 32.🔗 Which words do you click on?
    <a href="games.html">Play games</a>
    (a) href (b) About us (c) Play games (d) games.html
  33. 33.🔍 Which line is missing its closing tag?
    line 1: <small>Good morning!</small>
    line 2: <em>My pets</em>
    line 3: <p>My best friend
    (a) line 2 (b) line 3 (c) line 1
  34. 34.🖼️ Which picture file does the browser load?
    <img src="tiger.jpg" alt="A tiger asleep" width="350">
    (a) tiger.jpg (b) A tiger asleep (c) kite.png (d) map.png
  35. 35.📝 How many paragraphs does this code make?
    <p>Hello, world!</p>
    <p>I love mangoes.</p>
    <p>Rain today</p>
    <p>Hello, world!</p>
    <p>Cricket is fun.</p>
    <p>The red kite</p>
  36. 36.🏷️ Which is the closing tag for <h1>? (a) </h1> (b) <h1/> (c) <\h1> (d) <h1>
  37. 37.📋 What number does the browser show next to “Banana”?
    <ol start="9">
      <li>Jamun</li>
      <li>Banana</li>
      <li>Grapes</li>
    </ol>
  38. 38.🌐 Which one saves our .html files? (a) a web server (b) a code editor (c) a web browser
  39. 39.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>My Hobbies</title>
    </head>
    <body>
      <h1>My drawings</h1>
      <p>Thanks for visiting.</p>
    </body>
    </html>
    (a) Thanks for visiting. (b) body (c) My Hobbies (d) My drawings
  40. 40.🔢 In a basic web page file, which comes first: “</body>” or “<body>”? (a) </body> (b) <body>

Answer key

  1. <h1>
  2. <li>
  3. a code editor
  4. bullets
  5. <ol>
  6. False
  7. alt
  8. line 2
  9. stores a website’s files
  10. <h1>
  11. <a href="about.html">
  12. <!--
  13. on the browser tab
  14. in the same tab
  15. <style>
  16. <h1>
  17. <!DOCTYPE html>
  18. Match report
  19. <li>
  20. bullets
  21. numbers
  22. Map of India
  23. 3
  24. answers page requests
  25. -->
  26. <link rel="stylesheet">
  27. a closing tag
  28. True
  29. the body
  30. <h1>
  31. saves our .html files
  32. Play games
  33. line 3
  34. tiger.jpg
  35. 6
  36. </h1>
  37. 10
  38. a code editor
  39. My drawings
  40. <body>

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