← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 125 · 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 heading levels does HTML have? (a) 4 (b) 10 (c) 6 (d) 3
  2. 2.🌐 Which one shows pages from the web? (a) a web server (b) a code editor (c) a web browser
  3. 3.🔗 What does HyperText mean? (a) text with links (b) secret text (c) very big text (d) text in colour
  4. 4.📄 Where does <p> go: in the head or in the body? (a) in the head (b) in the body
  5. 5.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Class 7 Blog</title>
    </head>
    <body>
      <h1>All about me</h1>
      <p>Mars is red.</p>
    </body>
    </html>
    (a) Class 7 Blog (b) Mars is red. (c) All about me (d) index.html
  6. 6.📋 What number does the browser show next to “Jamun”?
    <ol start="5">
      <li>Litchi</li>
      <li>Mango</li>
      <li>Papaya</li>
      <li>Jamun</li>
      <li>Banana</li>
    </ol>
  7. 7.🔗 Where does this link open?
    <a href="maths.html">Play games</a>
    (a) in a new tab (b) in the same tab
  8. 8.Which of these has a closing tag? (a) <meta> (b) <img> (c) <li> (d) <input>
  9. 9.🏷️ Is <h1> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  10. 10.🔠 Which heading shows the BIGGEST text: <h4>, <h2>, <h1> or <h6>? (a) <h4> (b) <h6> (c) <h1> (d) <h2>
  11. 11.💬 How does an HTML comment start? (a) // (b) <!-- (c) /* (d) #
  12. 12.Which of these is true of a web server? (a) shows line numbers (b) answers page requests (c) shows pages from the web (d) opens web pages for us
  13. 13.🖼️ Which picture file does the browser load?
    <img src="fort.jpg" alt="An old fort" width="50">
    (a) tiger.jpg (b) kite.png (c) An old fort (d) fort.jpg
  14. 14.🔠 How many <h1> headings should a page usually have? (a) 1 (b) 6 (c) 10 (d) 3
  15. 15.Which of these has a closing tag? (a) <br> (b) <img> (c) <meta> (d) <h1>
  16. 16.True or false: in <img>, height shows if the image fails. (a) False (b) True
  17. 17.🌐 Which one shows line numbers? (a) a web server (b) a web browser (c) a code editor
  18. 18.🔠 Are headings shown in bold by default? (a) No (b) Yes
  19. 19.True or false: <meta> has a closing tag. (a) True (b) False
  20. 20.🖼️ Which picture file does the browser load?
    <img src="dog.jpg" alt="A happy dog" width="50">
    (a) bus.jpg (b) A happy dog (c) dog.jpg (d) moon.png
  21. 21.🔠 How many headings are in this code?
    <h1>Hello, world!</h1>
    <p>Our school trip</p>
    <p>Rain today</p>
    <p>Hello, world!</p>
    <h2>Rain today</h2>
  22. 22.💬 Which text will NOT show on the page?
    <p>My pets</p>
    <p>Cricket is fun.</p>
    <!-- <p>Rain today</p> -->
    (a) Cricket is fun. (b) Rain today (c) My pets
  23. 23.📋 How many items does this list show?
    <ol>
      <li>Orange</li>
      <li>Guava</li>
    </ol>
  24. 24.📛 In <a href="x.html">, what is href? (a) a closing tag (b) an attribute (c) an element name (d) a comment
  25. 25.🏷️ Which is the closing tag for <i>? (a) <i> (b) <i/> (c) <\i> (d) </i>
  26. 26.📝 How many paragraphs does this code make?
    <p>The red kite</p>
    <p>I love mangoes.</p>
    <p>Hello, world!</p>
    <h2>Fun facts</h2>
    <h2>Hello, world!</h2>
    <p>Good morning!</p>
  27. 27.🖼️ Which attribute of <img> names the picture file? (a) alt (b) height (c) src (d) width
  28. 28.🔠 Which heading shows the BIGGEST text: <h5>, <h2>, <h3> or <h1>? (a) <h1> (b) <h2> (c) <h5> (d) <h3>
  29. 29.🔍 Which line is missing its closing tag?
    line 1: <h1>Fun facts
    line 2: <h3>Good morning!</h3>
    line 3: <i>Hello, world!</i>
    (a) line 3 (b) line 2 (c) line 1
  30. 30.🌐 Which one is where we type code? (a) a web browser (b) a code editor (c) a web server
  31. 31.Which of these is an opening tag? (a) </b> (b) </title> (c) <title> (d) </h1>
  32. 32.🖼️ Which picture file does the browser load?
    <img src="kite.png" alt="A red kite" width="150">
    (a) A red kite (b) kite.png (c) map.png (d) cake.jpg
  33. 33.📝 Does <img> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  34. 34.🖼️ Which attribute of <img> tells which image to load? (a) width (b) height (c) src (d) alt
  35. 35.True or false: HTML on its own cannot add pictures to a page. (a) False (b) True
  36. 36.True or false: <li> is an empty tag. (a) False (b) True
  37. 37.🔗 Which address opens when you click this link?
    <a href="games.html">Contact us</a>
    (a) Contact us (b) games.html (c) about.html (d) contact.html
  38. 38.True or false: in <img>, height tells which image to load. (a) True (b) False
  39. 39.📝 Does <input> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  40. 40.🏷️ Is <p> an opening tag or a closing tag? (a) an opening tag (b) a closing tag

Answer key

  1. 6
  2. a web browser
  3. text with links
  4. in the body
  5. Class 7 Blog
  6. 8
  7. in the same tab
  8. <li>
  9. an opening tag
  10. <h1>
  11. <!--
  12. answers page requests
  13. fort.jpg
  14. 1
  15. <h1>
  16. False
  17. a code editor
  18. Yes
  19. False
  20. dog.jpg
  21. 2
  22. Rain today
  23. 2
  24. an attribute
  25. </i>
  26. 4
  27. src
  28. <h1>
  29. line 1
  30. a code editor
  31. <title>
  32. kite.png
  33. an empty tag
  34. src
  35. False
  36. False
  37. games.html
  38. False
  39. an empty tag
  40. an opening tag

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