← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 111 · 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.📄 What is the first line of an HTML5 page? (a) <!DOCTYPE html> (b) <body> (c) <head> (d) <html>
  2. 2.🔠 Which tag is used for the main title on a page? (a) <h1> (b) <p> (c) <h6> (d) <br>
  3. 3.📝 How many paragraphs does this code make?
    <p>I love mangoes.</p>
    <p>I love mangoes.</p>
    <p>Good morning!</p>
  4. 4.📝 Does <p> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  5. 5.True or false: HTML on its own can pick a random number. (a) False (b) True
  6. 6.📋 How many items does this list show?
    <ol>
      <li>Mango</li>
      <li>Jamun</li>
      <li>Guava</li>
    </ol>
  7. 7.🔠 Which heading shows the SMALLEST text: <h1>, <h6>, <h5> or <h3>? (a) <h5> (b) <h3> (c) <h6> (d) <h1>
  8. 8.📄 Where does <table> go: in the head or in the body? (a) in the body (b) in the head
  9. 9.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
  10. 10.📋 Which list suits a shopping list in any order? (a) <hr> (b) <br> (c) <ol> (d) <ul>
  11. 11.🔗 Which words do you click on?
    <a href="about.html">Play games</a>
    (a) Play games (b) href (c) About us (d) about.html
  12. 12.🏷️ What does a closing tag have that an opening tag does not? (a) a dollar $ (b) a hash # (c) a slash / (d) a dot .
  13. 13.🔗 Which attribute holds the address of a link? (a) href (b) id (c) alt (d) src
  14. 14.📝 How many paragraphs does this code make?
    <p>The red kite</p>
    <h2>Rain today</h2>
    <p>My pets</p>
  15. 15.True or false: <li> has a closing tag. (a) True (b) False
  16. 16.🔗 Which address opens when you click this link?
    <a href="contact.html">School news</a>
    (a) https://example.com (b) School news (c) maths.html (d) contact.html
  17. 17.🖼️ Does <img> need a closing tag? (a) No (b) Yes
  18. 18.💬 Which text will NOT show on the page?
    <!-- <p>Rain today</p> -->
    <p>My pets</p>
    <p>Hello, world!</p>
    (a) My pets (b) Rain today (c) Hello, world!
  19. 19.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the body (b) in the head
  20. 20.🔠 How many headings are in this code?
    <h1>Our school trip</h1>
    <p>The red kite</p>
    <p>Rain today</p>
    <h3>My pets</h3>
  21. 21.🌐 Which one colours code to help us? (a) a web server (b) a web browser (c) a code editor
  22. 22.Which of these is an opening tag? (a) </p> (b) <li> (c) </body> (d) </li>
  23. 23.📝 What does <br> do? (a) makes a list (b) adds a picture (c) makes text bold (d) starts a new line
  24. 24.💬 How many paragraphs show on the page?
    <p>Rain today</p>
    <!-- <p>Fun facts</p> -->
    <p>Our school trip</p>
    <!-- <p>The red kite</p> -->
    <p>Hello, world!</p>
  25. 25.🔗 Which tag makes a clickable link? (a) <p> (b) <img> (c) <link> (d) <a>
  26. 26.🔠 How many headings are in this code?
    <h1>Cricket is fun.</h1>
    <h2>My pets</h2>
    <p>Fun facts</p>
    <h4>Our school trip</h4>
    <p>Good morning!</p>
  27. 27.🌍 Which program shows a web page to us? (a) a paint program (b) a music player (c) a calculator (d) a web browser
  28. 28.🔗 Which words do you click on?
    <a href="news.html">Take the quiz</a>
    (a) news.html (b) Take the quiz (c) Play games (d) href
  29. 29.Which of these goes in the head? (a) <a> (b) <link rel="stylesheet"> (c) <table> (d) <h1>
  30. 30.🔠 Which heading shows the BIGGEST text: <h1>, <h4>, <h6> or <h3>? (a) <h6> (b) <h4> (c) <h3> (d) <h1>
  31. 31.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as 5 spaces (b) as a dot (c) as a new line (d) as one space
  32. 32.💬 How does an HTML comment end? (a) */ (b) --> (c) // (d) >>
  33. 33.🔠 How many headings are in this code?
    <h1>The red kite</h1>
    <h4>My pets</h4>
    <h2>My pets</h2>
    <p>Fun facts</p>
  34. 34.🔗 Which words do you click on?
    <a href="contact.html">Take the quiz</a>
    (a) href (b) Play games (c) Take the quiz (d) contact.html
  35. 35.🔗 Where does this link open?
    <a href="news.html" target="_blank">Visit the site</a>
    (a) in a new tab (b) in the same tab
  36. 36.🔤 In “HTML”, what does the L stand for? (a) Laptop (b) Line (c) Language (d) Link
  37. 37.📄 Can HTML on its own add pictures to a page? (a) Yes (b) No
  38. 38.🔗 Where does this link open?
    <a href="art.html" target="_blank">Play games</a>
    (a) in the same tab (b) in a new tab
  39. 39.💬 Which text will NOT show on the page?
    <p>Hello, world!</p>
    <p>The red kite</p>
    <!-- <p>My best friend</p> -->
    <p>Cricket is fun.</p>
    (a) Cricket is fun. (b) My best friend (c) The red kite (d) Hello, world!
  40. 40.🔠 Which heading shows the BIGGEST text: <h4>, <h1>, <h5> or <h3>? (a) <h1> (b) <h3> (c) <h4> (d) <h5>

Answer key

  1. <!DOCTYPE html>
  2. <h1>
  3. 3
  4. has a closing tag
  5. False
  6. 3
  7. <h6>
  8. in the body
  9. Yes
  10. <ul>
  11. Play games
  12. a slash /
  13. href
  14. 2
  15. True
  16. contact.html
  17. No
  18. Rain today
  19. in the head
  20. 2
  21. a code editor
  22. <li>
  23. starts a new line
  24. 3
  25. <a>
  26. 3
  27. a web browser
  28. Take the quiz
  29. <link rel="stylesheet">
  30. <h1>
  31. as one space
  32. -->
  33. 3
  34. Take the quiz
  35. in a new tab
  36. Language
  37. Yes
  38. in a new tab
  39. My best friend
  40. <h1>

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