← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 280 · 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 words do you click on?
    <a href="contact.html">Maths fun</a>
    (a) href (b) contact.html (c) Maths fun (d) Art corner
  2. 2.🔠 How many headings are in this code?
    <h1>Our school trip</h1>
    <h3>Our school trip</h3>
    <h2>Our school trip</h2>
  3. 3.💬 How many paragraphs show on the page?
    <!-- <p>Good morning!</p> -->
    <!-- <p>Rain today</p> -->
    <p>Hello, world!</p>
    <!-- <p>I love mangoes.</p> -->
  4. 4.📋 Which list tag shows bullet points? (a) <li> (b) <ol> (c) <ul>
  5. 5.🔠 Which tag is used for the main title on a page? (a) <p> (b) <h6> (c) <h1> (d) <br>
  6. 6.🔗 Which address opens when you click this link?
    <a href="art.html">Play games</a>
    (a) quiz.html (b) Play games (c) news.html (d) art.html
  7. 7.True or false: in <img>, src tells which image to load. (a) False (b) True
  8. 8.💬 How many paragraphs show on the page?
    <p>I love mangoes.</p>
    <!-- <p>Good morning!</p> -->
    <p>My best friend</p>
    <p>Rain today</p>
  9. 9.📋 Does this list show bullets or numbers?
    <ol>
      <li>Mango</li>
      <li>Papaya</li>
      <li>Litchi</li>
    </ol>
    (a) bullets (b) numbers
  10. 10.🖼️ Which picture file does the browser load?
    <img src="cake.jpg" alt="Birthday cake" width="300">
    (a) Birthday cake (b) cake.jpg (c) moon.png (d) dog.jpg
  11. 11.📋 How many items does this list show?
    <ol>
      <li>Jamun</li>
      <li>Litchi</li>
      <li>Guava</li>
      <li>Papaya</li>
      <li>Grapes</li>
      <li>Mango</li>
    </ol>
  12. 12.📋 Which list tag is an unordered list? (a) <ol> (b) <ul> (c) <li>
  13. 13.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
  14. 14.🔠 Which heading shows the SMALLEST text: <h6>, <h5>, <h3> or <h2>? (a) <h3> (b) <h5> (c) <h2> (d) <h6>
  15. 15.🏷️ Is <li> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  16. 16.🔢 In a basic web page file, which comes LAST? (a) </html> (b) </head> (c) <body> (d) <html>
  17. 17.📋 Does this list show bullets or numbers?
    <ul>
      <li>Banana</li>
      <li>Grapes</li>
    </ul>
    (a) numbers (b) bullets
  18. 18.🔗 Where does this link open?
    <a href="https://example.com" target="_blank">Maths fun</a>
    (a) in the same tab (b) in a new tab
  19. 19.💬 How many paragraphs show on the page?
    <!-- <p>The red kite</p> -->
    <p>Rain today</p>
    <p>Fun facts</p>
    <!-- <p>Our school trip</p> -->
    <p>Hello, world!</p>
  20. 20.True or false: <ol> is an ordered list. (a) False (b) True
  21. 21.🔠 How many headings are in this code?
    <h1>The red kite</h1>
    <p>Hello, world!</p>
    <h3>Hello, world!</h3>
  22. 22.True or false: <ul> shows bullet points. (a) True (b) False
  23. 23.🔍 Which is the odd one out? (a) hosts websites online (b) sends pages over the net (c) stores a website’s files (d) turns HTML into a page
  24. 24.Which of these is true of a web browser? (a) stores a website’s files (b) shows pages from the web (c) saves our .html files (d) hosts websites online
  25. 25.🔍 Which is the odd one out? (a) has an address bar (b) opens web pages for us (c) hosts websites online (d) shows pages from the web
  26. 26.🔠 Which heading shows the SMALLEST text: <h1>, <h6>, <h3> or <h4>? (a) <h1> (b) <h6> (c) <h4> (d) <h3>
  27. 27.🔠 How many headings are in this code?
    <h1>Cricket is fun.</h1>
    <p>Hello, world!</p>
    <p>My pets</p>
  28. 28.💬 How many paragraphs show on the page?
    <p>I love mangoes.</p>
    <p>Good morning!</p>
    <!-- <p>My pets</p> -->
  29. 29.True or false: <li> goes inside ul or ol. (a) True (b) False
  30. 30.📋 Does this list show bullets or numbers?
    <ol>
      <li>Orange</li>
      <li>Jamun</li>
    </ol>
    (a) numbers (b) bullets
  31. 31.💬 How many paragraphs show on the page?
    <p>Cricket is fun.</p>
    <p>Good morning!</p>
    <!-- <p>Our school trip</p> -->
    <p>Fun facts</p>
    <p>My pets</p>
  32. 32.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Class 7 Blog</title>
    </head>
    <body>
      <h1>My drawings</h1>
      <p>Mars is red.</p>
    </body>
    </html>
    (a) body (b) Mars is red. (c) My drawings (d) Class 7 Blog
  33. 33.📋 What number does the browser show next to “Mango”?
    <ol start="4">
      <li>Papaya</li>
      <li>Orange</li>
      <li>Litchi</li>
      <li>Guava</li>
      <li>Mango</li>
      <li>Grapes</li>
    </ol>
  34. 34.📝 Does <li> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  35. 35.📝 How many paragraphs does this code make?
    <p>Rain today</p>
    <p>Rain today</p>
    <p>Rain today</p>
    <h2>My best friend</h2>
  36. 36.True or false: a web browser shows line numbers. (a) True (b) False
  37. 37.🔍 Which line is missing its closing tag?
    line 1: <small>Hello, world!</small>
    line 2: <p>Fun facts
    line 3: <h2>My pets</h2>
    (a) line 1 (b) line 2 (c) line 3
  38. 38.🔍 Which line is missing its closing tag?
    line 1: <i>Cricket is fun.
    line 2: <h1>Our school trip</h1>
    line 3: <p>Good morning!</p>
    (a) line 2 (b) line 3 (c) line 1
  39. 39.📋 What number does the browser show next to “Litchi”?
    <ol start="7">
      <li>Orange</li>
      <li>Jamun</li>
      <li>Papaya</li>
      <li>Mango</li>
      <li>Litchi</li>
      <li>Grapes</li>
    </ol>
  40. 40.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Space Facts</title>
    </head>
    <body>
      <h1>Welcome!</h1>
      <p>We won by 5 runs.</p>
    </body>
    </html>
    (a) Welcome! (b) We won by 5 runs. (c) body (d) Space Facts

Answer key

  1. Maths fun
  2. 3
  3. 1
  4. <ul>
  5. <h1>
  6. art.html
  7. True
  8. 3
  9. numbers
  10. cake.jpg
  11. 6
  12. <ul>
  13. Yes
  14. <h6>
  15. an opening tag
  16. </html>
  17. bullets
  18. in a new tab
  19. 3
  20. True
  21. 2
  22. True
  23. turns HTML into a page
  24. shows pages from the web
  25. hosts websites online
  26. <h6>
  27. 1
  28. 2
  29. True
  30. numbers
  31. 4
  32. My drawings
  33. 8
  34. has a closing tag
  35. 3
  36. False
  37. line 2
  38. line 1
  39. 11
  40. Welcome!

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