← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 719 · 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.🔍 One closing tag is missing. Which one?
    <u>I love mangoes.</u>
    <small>The red kite
    <i>My best friend</i>
    (a) </u> (b) </p> (c) </i> (d) </small>
  2. 2.🔗 Which attribute holds the address of a link? (a) src (b) alt (c) id (d) href
  3. 3.📋 Does this list show bullets or numbers?
    <ol>
      <li>Banana</li>
      <li>Litchi</li>
    </ol>
    (a) numbers (b) bullets
  4. 4.🔗 Which code links to about.html? (a) <a href="about.html"> (b) <link about.html> (c) <a src="about.html"> (d) <a alt="about.html">
  5. 5.🔠 Which heading shows the SMALLEST text: <h3>, <h1>, <h4> or <h2>? (a) <h3> (b) <h4> (c) <h2> (d) <h1>
  6. 6.🏷️ Which is the closing tag for <strong>? (a) <\strong> (b) <strong> (c) </strong> (d) <strong/>
  7. 7.🔢 In a basic web page file, which comes first: “<body>” or “<!DOCTYPE html>”? (a) <body> (b) <!DOCTYPE html>
  8. 8.💬 Which text will NOT show on the page?
    <p>Cricket is fun.</p>
    <p>My best friend</p>
    <!-- <p>The red kite</p> -->
    <p>My pets</p>
    (a) My best friend (b) My pets (c) The red kite (d) Cricket is fun.
  9. 9.📋 What number does the browser show next to “Mango”?
    <ol>
      <li>Papaya</li>
      <li>Orange</li>
      <li>Mango</li>
    </ol>
  10. 10.🔗 Where does this link open?
    <a href="maths.html" target="_blank">Contact us</a>
    (a) in a new tab (b) in the same tab
  11. 11.💬 Why do coders write comments? (a) to add colour (b) to show pictures (c) to leave notes (d) to make links
  12. 12.🔠 How many headings are in this code?
    <h1>The red kite</h1>
    <h4>My best friend</h4>
    <h3>Good morning!</h3>
  13. 13.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="fort.jpg" alt="An old fort" width="300">
    (a) fort.jpg (b) An old fort (c) width (d) A tiger asleep
  14. 14.Which of these goes in the head? (a) <img> (b) <table> (c) <h1> (d) <link rel="stylesheet">
  15. 15.💬 How many paragraphs show on the page?
    <p>Rain today</p>
    <!-- <p>Good morning!</p> -->
    <!-- <p>Our school trip</p> -->
    <p>Cricket is fun.</p>
  16. 16.📋 How many items does this list show?
    <ol>
      <li>Papaya</li>
      <li>Mango</li>
    </ol>
  17. 17.📋 Does this list show bullets or numbers?
    <ul>
      <li>Banana</li>
      <li>Litchi</li>
      <li>Jamun</li>
    </ul>
    (a) bullets (b) numbers
  18. 18.🔍 One closing tag is missing. Which one?
    <h1>The red kite</h1>
    <p>My pets</p>
    <em>Fun facts
    (a) </em> (b) </p> (c) </h1> (d) </h3>
  19. 19.🔠 Which tag is the least important heading? (a) <h3> (b) <h1> (c) <h6> (d) <p>
  20. 20.True or false: a web browser answers page requests. (a) False (b) True
  21. 21.🔍 Which line is missing its closing tag?
    line 1: <strong>Good morning!</strong>
    line 2: <small>My best friend</small>
    line 3: <i>Our school trip
    (a) line 3 (b) line 1 (c) line 2
  22. 22.True or false: HTML on its own can make a form. (a) True (b) False
  23. 23.🔠 How many headings are in this code?
    <h1>Rain today</h1>
    <p>Hello, world!</p>
    <h3>My pets</h3>
    <p>Our school trip</p>
    <h4>Fun facts</h4>
  24. 24.Which of these is true of a web server? (a) stores a website’s files (b) opens web pages for us (c) colours code to help us (d) saves our .html files
  25. 25.🔠 How many headings are in this code?
    <h1>Fun facts</h1>
    <p>Fun facts</p>
    <p>Hello, world!</p>
    <h4>I love mangoes.</h4>
  26. 26.📝 What does <br> do? (a) adds a picture (b) makes text bold (c) starts a new line (d) makes a list
  27. 27.🖼️ Which tag puts a picture on a page? (a) <p> (b) <img> (c) <pic> (d) <a>
  28. 28.🖼️ Does <img> need a closing tag? (a) No (b) Yes
  29. 29.💬 Which text will NOT show on the page?
    <p>Rain today</p>
    <p>Fun facts</p>
    <!-- <p>Hello, world!</p> -->
    <p>Our school trip</p>
    (a) Our school trip (b) Fun facts (c) Hello, world! (d) Rain today
  30. 30.🖼️ Which picture file does the browser load?
    <img src="fort.jpg" alt="An old fort" width="300">
    (a) fort.jpg (b) An old fort (c) kite.png (d) tiger.jpg
  31. 31.🔠 Which heading shows the BIGGEST text: <h3>, <h1>, <h2> or <h4>? (a) <h4> (b) <h3> (c) <h2> (d) <h1>
  32. 32.💬 How many paragraphs show on the page?
    <!-- <p>My best friend</p> -->
    <p>Hello, world!</p>
    <p>The red kite</p>
  33. 33.💬 Which text will NOT show on the page?
    <p>My pets</p>
    <!-- <p>Hello, world!</p> -->
    <p>I love mangoes.</p>
    <p>Rain today</p>
    (a) My pets (b) I love mangoes. (c) Rain today (d) Hello, world!
  34. 34.🖼️ Which picture file does the browser load?
    <img src="moon.png" alt="The full moon" width="50">
    (a) fort.jpg (b) moon.png (c) bus.jpg (d) The full moon
  35. 35.📋 What number does the browser show next to “Orange”?
    <ol>
      <li>Grapes</li>
      <li>Jamun</li>
      <li>Orange</li>
    </ol>
  36. 36.🔢 In a basic web page file, which comes LAST? (a) <head> (b) <!DOCTYPE html> (c) </html> (d) <html>
  37. 37.💬 How many paragraphs show on the page?
    <!-- <p>Hello, world!</p> -->
    <p>Good morning!</p>
    <!-- <p>Fun facts</p> -->
  38. 38.🔗 Which address opens when you click this link?
    <a href="contact.html">Contact us</a>
    (a) contact.html (b) maths.html (c) https://example.com (d) Contact us
  39. 39.💬 How does an HTML comment end? (a) // (b) --> (c) */ (d) >>
  40. 40.🖼️ Which picture file does the browser load?
    <img src="fort.jpg" alt="An old fort" width="250">
    (a) fort.jpg (b) An old fort (c) kite.png (d) tiger.jpg

Answer key

  1. </small>
  2. href
  3. numbers
  4. <a href="about.html">
  5. <h4>
  6. </strong>
  7. <!DOCTYPE html>
  8. The red kite
  9. 3
  10. in a new tab
  11. to leave notes
  12. 3
  13. An old fort
  14. <link rel="stylesheet">
  15. 2
  16. 2
  17. bullets
  18. </em>
  19. <h6>
  20. False
  21. line 3
  22. True
  23. 3
  24. stores a website’s files
  25. 2
  26. starts a new line
  27. <img>
  28. No
  29. Hello, world!
  30. fort.jpg
  31. <h1>
  32. 2
  33. Hello, world!
  34. moon.png
  35. 3
  36. </html>
  37. 1
  38. contact.html
  39. -->
  40. fort.jpg

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