← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 50 · 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>My best friend</p> -->
    <p>Cricket is fun.</p>
    <p>I love mangoes.</p>
    <p>Good morning!</p>
    (a) Cricket is fun. (b) Good morning! (c) I love mangoes. (d) My best friend
  2. 2.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as a new line (b) as one space (c) as 5 spaces (d) as a dot
  3. 3.True or false: <ul> goes in the body. (a) True (b) False
  4. 4.💬 How does an HTML comment start? (a) # (b) <!-- (c) /* (d) //
  5. 5.📝 Does <br> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  6. 6.🏷️ Every HTML tag starts with which sign? (a) < (b) [ (c) { (d) (
  7. 7.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="bus.jpg" alt="Our school bus" width="300">
    (a) width (b) An old fort (c) Our school bus (d) bus.jpg
  8. 8.📄 Can HTML on its own add pictures to a page? (a) No (b) Yes
  9. 9.📝 What does <br> do? (a) makes text bold (b) makes a list (c) starts a new line (d) adds a picture
  10. 10.🔠 Which heading shows the SMALLEST text: <h3>, <h4>, <h5> or <h1>? (a) <h5> (b) <h3> (c) <h4> (d) <h1>
  11. 11.Which of these is a closing tag? (a) <body> (b) <p> (c) </li> (d) <b>
  12. 12.🔠 Which heading shows the BIGGEST text: <h2>, <h5>, <h4> or <h6>? (a) <h6> (b) <h5> (c) <h4> (d) <h2>
  13. 13.📋 Does this list show bullets or numbers?
    <ol>
      <li>Jamun</li>
      <li>Litchi</li>
    </ol>
    (a) bullets (b) numbers
  14. 14.True or false: HTML on its own can add pictures to a page. (a) False (b) True
  15. 15.🔠 How many headings are in this code?
    <h1>I love mangoes.</h1>
    <h2>My pets</h2>
    <p>My best friend</p>
    <p>Hello, world!</p>
  16. 16.🖼️ How many pixels wide is the picture drawn?
    <img src="fort.jpg" alt="An old fort" width="100">
  17. 17.📋 What number does the browser show next to “Banana”?
    <ol start="3">
      <li>Grapes</li>
      <li>Banana</li>
      <li>Orange</li>
    </ol>
  18. 18.🧱 HTML gives a web page its ___. (a) structure (b) sound (c) speed (d) colours
  19. 19.📄 What is the first line of an HTML5 page? (a) <head> (b) <html> (c) <!DOCTYPE html> (d) <body>
  20. 20.🖼️ Which attribute of <img> tells which image to load? (a) height (b) src (c) alt (d) width
  21. 21.📝 What does <hr> draw? (a) a picture (b) a line across the page (c) a table (d) a link
  22. 22.True or false: a code editor saves our .html files. (a) True (b) False
  23. 23.🏷️ Which is the closing tag for <h1>? (a) <h1> (b) <\h1> (c) <h1/> (d) </h1>
  24. 24.📋 Does this list show bullets or numbers?
    <ul>
      <li>Litchi</li>
      <li>Banana</li>
    </ul>
    (a) bullets (b) numbers
  25. 25.📋 Which list tag lists things in any order? (a) <ul> (b) <li> (c) <ol>
  26. 26.🔗 Which tag makes a clickable link? (a) <link> (b) <p> (c) <a> (d) <img>
  27. 27.💬 Which text will NOT show on the page?
    <p>My best friend</p>
    <p>Rain today</p>
    <p>Fun facts</p>
    <!-- <p>My pets</p> -->
    (a) Rain today (b) My pets (c) My best friend (d) Fun facts
  28. 28.📋 How many items does this list show?
    <ul>
      <li>Orange</li>
      <li>Mango</li>
      <li>Banana</li>
      <li>Jamun</li>
      <li>Papaya</li>
      <li>Guava</li>
    </ul>
  29. 29.📋 Which list tag shows bullet points? (a) <li> (b) <ul> (c) <ol>
  30. 30.True or false: a code editor sends pages over the net. (a) False (b) True
  31. 31.📋 What number does the browser show next to “Mango”?
    <ol>
      <li>Banana</li>
      <li>Jamun</li>
      <li>Mango</li>
    </ol>
  32. 32.💬 Which text will NOT show on the page?
    <p>Rain today</p>
    <p>The red kite</p>
    <!-- <p>My pets</p> -->
    (a) The red kite (b) Rain today (c) My pets
  33. 33.🔠 How many heading levels does HTML have? (a) 4 (b) 3 (c) 10 (d) 6
  34. 34.🔠 How many headings are in this code?
    <h1>Fun facts</h1>
    <p>My best friend</p>
    <p>Good morning!</p>
  35. 35.🔠 Which tag is the least important heading? (a) <h1> (b) <h6> (c) <h3> (d) <p>
  36. 36.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
  37. 37.💬 How many paragraphs show on the page?
    <!-- <p>I love mangoes.</p> -->
    <p>Our school trip</p>
    <p>My best friend</p>
  38. 38.🔠 Which heading shows the SMALLEST text: <h1>, <h2>, <h5> or <h3>? (a) <h1> (b) <h5> (c) <h3> (d) <h2>
  39. 39.💬 How many paragraphs show on the page?
    <p>Fun facts</p>
    <p>Hello, world!</p>
    <p>Good morning!</p>
    <!-- <p>Cricket is fun.</p> -->
    <p>My best friend</p>
  40. 40.🏷️ Which is the closing tag for <small>? (a) <small/> (b) <small> (c) <\small> (d) </small>

Answer key

  1. My best friend
  2. as one space
  3. True
  4. <!--
  5. an empty tag
  6. <
  7. Our school bus
  8. Yes
  9. starts a new line
  10. <h5>
  11. </li>
  12. <h2>
  13. numbers
  14. True
  15. 2
  16. 100
  17. 4
  18. structure
  19. <!DOCTYPE html>
  20. src
  21. a line across the page
  22. True
  23. </h1>
  24. bullets
  25. <ul>
  26. <a>
  27. My pets
  28. 6
  29. <ul>
  30. False
  31. 3
  32. My pets
  33. 6
  34. 1
  35. <h6>
  36. Yes
  37. 2
  38. <h5>
  39. 4
  40. </small>

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