← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 610 · 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 heading shows the BIGGEST text: <h4>, <h1>, <h6> or <h2>? (a) <h4> (b) <h2> (c) <h6> (d) <h1>
  2. 2.🔢 In a basic web page file, which comes first: “</head>” or “<head>”? (a) </head> (b) <head>
  3. 3.💬 Which text will NOT show on the page?
    <p>My best friend</p>
    <p>The red kite</p>
    <!-- <p>Rain today</p> -->
    <p>I love mangoes.</p>
    (a) I love mangoes. (b) My best friend (c) The red kite (d) Rain today
  4. 4.💬 How many paragraphs show on the page?
    <p>The red kite</p>
    <p>Fun facts</p>
    <!-- <p>I love mangoes.</p> -->
    <p>Cricket is fun.</p>
    <p>My pets</p>
  5. 5.🔠 Which tag is used for the main title on a page? (a) <h1> (b) <h6> (c) <p> (d) <br>
  6. 6.📛 In <a href="x.html">, what is href? (a) an attribute (b) a comment (c) a closing tag (d) an element name
  7. 7.📋 How many items does this list show?
    <ol>
      <li>Guava</li>
      <li>Litchi</li>
      <li>Jamun</li>
      <li>Papaya</li>
      <li>Banana</li>
      <li>Orange</li>
    </ol>
  8. 8.🔠 How many headings are in this code?
    <h1>I love mangoes.</h1>
    <p>Cricket is fun.</p>
    <h2>Fun facts</h2>
  9. 9.📝 What does <hr> draw? (a) a table (b) a link (c) a line across the page (d) a picture
  10. 10.🔠 Which heading shows the SMALLEST text: <h2>, <h3>, <h5> or <h6>? (a) <h3> (b) <h5> (c) <h2> (d) <h6>
  11. 11.📋 Which list tag is an unordered list? (a) <ol> (b) <li> (c) <ul>
  12. 12.🖼️ Which tag puts a picture on a page? (a) <img> (b) <pic> (c) <p> (d) <a>
  13. 13.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="bus.jpg" alt="Our school bus" width="150">
    (a) Our school bus (b) width (c) bus.jpg (d) An old fort
  14. 14.🔗 Which words do you click on?
    <a href="quiz.html">Play games</a>
    (a) href (b) quiz.html (c) About us (d) Play games
  15. 15.🔗 Which words do you click on?
    <a href="maths.html">Art corner</a>
    (a) Art corner (b) href (c) School news (d) maths.html
  16. 16.True or false: in <img>, alt describes the picture. (a) False (b) True
  17. 17.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>My Hobbies</title>
    </head>
    <body>
      <h1>Welcome!</h1>
      <p>Thanks for visiting.</p>
    </body>
    </html>
    (a) Thanks for visiting. (b) body (c) Welcome! (d) My Hobbies
  18. 18.True or false: <p> is an empty tag. (a) False (b) True
  19. 19.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as 5 spaces (b) as a new line (c) as one space (d) as a dot
  20. 20.🌐 Which one opens web pages for us? (a) a web server (b) a code editor (c) a web browser
  21. 21.💬 How many paragraphs show on the page?
    <!-- <p>Hello, world!</p> -->
    <p>Our school trip</p>
    <p>Cricket is fun.</p>
  22. 22.🔗 Which address opens when you click this link?
    <a href="games.html">About us</a>
    (a) contact.html (b) games.html (c) about.html (d) About us
  23. 23.Which of these is a closing tag? (a) </title> (b) <p> (c) <b> (d) <title>
  24. 24.Which of these is true of a web browser? (a) stores a website’s files (b) colours code to help us (c) shows line numbers (d) opens web pages for us
  25. 25.🔠 Which heading shows the SMALLEST text: <h4>, <h5>, <h3> or <h6>? (a) <h3> (b) <h5> (c) <h6> (d) <h4>
  26. 26.🏷️ What does a closing tag have that an opening tag does not? (a) a hash # (b) a dot . (c) a dollar $ (d) a slash /
  27. 27.🖼️ Which picture file does the browser load?
    <img src="dog.jpg" alt="A happy dog" width="150">
    (a) bus.jpg (b) A happy dog (c) dog.jpg (d) moon.png
  28. 28.📄 Can HTML on its own pick a random number? (a) No (b) Yes
  29. 29.💬 Does the browser show comments on the page? (a) No (b) Yes
  30. 30.🔠 Which heading shows the BIGGEST text: <h2>, <h3>, <h4> or <h1>? (a) <h4> (b) <h2> (c) <h1> (d) <h3>
  31. 31.🔗 Which address opens when you click this link?
    <a href="maths.html">About us</a>
    (a) art.html (b) maths.html (c) news.html (d) About us
  32. 32.🌐 Which one saves our .html files? (a) a web browser (b) a code editor (c) a web server
  33. 33.🔗 Which attribute holds the address of a link? (a) href (b) alt (c) id (d) src
  34. 34.📋 Does this list show bullets or numbers?
    <ul>
      <li>Banana</li>
      <li>Orange</li>
      <li>Litchi</li>
    </ul>
    (a) bullets (b) numbers
  35. 35.📋 Which list tag goes inside ul or ol? (a) <li> (b) <ul> (c) <ol>
  36. 36.📋 Which list suits a shopping list in any order? (a) <br> (b) <ol> (c) <ul> (d) <hr>
  37. 37.🔠 How many headings are in this code?
    <h1>Rain today</h1>
    <h4>I love mangoes.</h4>
    <h3>Cricket is fun.</h3>
  38. 38.🔠 How many headings are in this code?
    <h1>My pets</h1>
    <h3>I love mangoes.</h3>
    <h2>Good morning!</h2>
    <h4>Hello, world!</h4>
    <p>Good morning!</p>
  39. 39.📄 Where does <meta charset="utf-8"> go: in the head or in the body? (a) in the body (b) in the head
  40. 40.🔠 Which heading shows the BIGGEST text: <h3>, <h5>, <h1> or <h4>? (a) <h3> (b) <h4> (c) <h5> (d) <h1>

Answer key

  1. <h1>
  2. <head>
  3. Rain today
  4. 4
  5. <h1>
  6. an attribute
  7. 6
  8. 2
  9. a line across the page
  10. <h6>
  11. <ul>
  12. <img>
  13. Our school bus
  14. Play games
  15. Art corner
  16. True
  17. Welcome!
  18. False
  19. as one space
  20. a web browser
  21. 2
  22. games.html
  23. </title>
  24. opens web pages for us
  25. <h6>
  26. a slash /
  27. dog.jpg
  28. No
  29. No
  30. <h1>
  31. maths.html
  32. a code editor
  33. href
  34. bullets
  35. <li>
  36. <ul>
  37. 3
  38. 4
  39. in the head
  40. <h1>

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