← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 529 · 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 big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>My Hobbies</title>
    </head>
    <body>
      <h1>Easy snacks</h1>
      <p>Mars is red.</p>
    </body>
    </html>
    (a) body (b) Easy snacks (c) Mars is red. (d) My Hobbies
  2. 2.💬 Does the browser show comments on the page? (a) No (b) Yes
  3. 3.True or false: <li> has a closing tag. (a) False (b) True
  4. 4.True or false: a web browser has an address bar. (a) False (b) True
  5. 5.🔍 Which line is missing its closing tag?
    line 1: <i>Fun facts
    line 2: <p>Our school trip</p>
    line 3: <small>I love mangoes.</small>
    (a) line 3 (b) line 2 (c) line 1
  6. 6.🔠 Which heading shows the BIGGEST text: <h2>, <h3>, <h4> or <h6>? (a) <h3> (b) <h2> (c) <h4> (d) <h6>
  7. 7.💬 How many paragraphs show on the page?
    <p>My pets</p>
    <!-- <p>Fun facts</p> -->
    <!-- <p>I love mangoes.</p> -->
    <p>Hello, world!</p>
  8. 8.🔍 Which line is missing its closing tag?
    line 1: <strong>Fun facts</strong>
    line 2: <p>Our school trip
    line 3: <small>My pets</small>
    (a) line 1 (b) line 2 (c) line 3
  9. 9.🔠 Which heading shows the BIGGEST text: <h4>, <h6>, <h2> or <h3>? (a) <h4> (b) <h2> (c) <h6> (d) <h3>
  10. 10.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
  11. 11.🖼️ How many pixels wide is the picture drawn?
    <img src="dog.jpg" alt="A happy dog" width="300">
  12. 12.🔗 Where does this link open?
    <a href="https://example.com">About us</a>
    (a) in a new tab (b) in the same tab
  13. 13.Which of these is true of a web browser? (a) saves our .html files (b) colours code to help us (c) has an address bar (d) hosts websites online
  14. 14.True or false: HTML on its own can add up two numbers. (a) True (b) False
  15. 15.🔗 Which address opens when you click this link?
    <a href="news.html">Play games</a>
    (a) games.html (b) quiz.html (c) news.html (d) Play games
  16. 16.🖼️ Why do we add alt text to an image? (a) to make it bigger (b) to colour it (c) to load it faster (d) to describe the image
  17. 17.True or false: in <img>, src names the picture file. (a) False (b) True
  18. 18.🔗 Which words do you click on?
    <a href="art.html">Take the quiz</a>
    (a) href (b) Take the quiz (c) art.html (d) Play games
  19. 19.🔢 In a basic web page file, which comes FIRST? (a) </html> (b) <html> (c) <body> (d) <!DOCTYPE html>
  20. 20.🔗 What does HyperText mean? (a) secret text (b) text with links (c) very big text (d) text in colour
  21. 21.🔗 Which code links to about.html? (a) <a href="about.html"> (b) <a alt="about.html"> (c) <a src="about.html"> (d) <link about.html>
  22. 22.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Space Facts</title>
    </head>
    <body>
      <h1>Welcome!</h1>
      <p>Thanks for visiting.</p>
    </body>
    </html>
    (a) Space Facts (b) body (c) Thanks for visiting. (d) Welcome!
  23. 23.🖼️ Which attribute of <img> sets how wide it is? (a) height (b) src (c) width (d) alt
  24. 24.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Space Facts</title>
    </head>
    <body>
      <h1>All about me</h1>
      <p>Thanks for visiting.</p>
    </body>
    </html>
    (a) index.html (b) Space Facts (c) All about me (d) Thanks for visiting.
  25. 25.🔗 Which tag makes a clickable link? (a) <p> (b) <img> (c) <a> (d) <link>
  26. 26.🏷️ Which is the closing tag for <h1>? (a) <h1/> (b) <h1> (c) </h1> (d) <\h1>
  27. 27.🔠 How many <h1> headings should a page usually have? (a) 6 (b) 3 (c) 10 (d) 1
  28. 28.🔢 In a basic web page file, which comes first: “<!DOCTYPE html>” or “<body>”? (a) <body> (b) <!DOCTYPE html>
  29. 29.🖼️ Does <img> need a closing tag? (a) Yes (b) No
  30. 30.📋 Which list shows the steps of a recipe best? (a) <hr> (b) <ol> (c) <br> (d) <ul>
  31. 31.📋 Which list tag goes inside ul or ol? (a) <li> (b) <ul> (c) <ol>
  32. 32.🖼️ Which attribute of <img> sets how tall it is? (a) alt (b) src (c) height (d) width
  33. 33.Which of these goes in the body? (a) <meta charset="utf-8"> (b) <style> (c) <title> (d) <ul>
  34. 34.💬 How does an HTML comment start? (a) <!-- (b) // (c) # (d) /*
  35. 35.🔗 Where does this link open?
    <a href="quiz.html">School news</a>
    (a) in a new tab (b) in the same tab
  36. 36.Which of these is true of a web server? (a) is where we type code (b) hosts websites online (c) colours code to help us (d) shows line numbers
  37. 37.🔗 Which words do you click on?
    <a href="about.html">Take the quiz</a>
    (a) Play games (b) href (c) about.html (d) Take the quiz
  38. 38.🖼️ How many pixels wide is the picture drawn?
    <img src="cake.jpg" alt="Birthday cake" width="200">
  39. 39.📋 Which list tag is an ordered list? (a) <ul> (b) <li> (c) <ol>
  40. 40.🏷️ Is </title> an opening tag or a closing tag? (a) a closing tag (b) an opening tag

Answer key

  1. Easy snacks
  2. No
  3. True
  4. True
  5. line 1
  6. <h2>
  7. 2
  8. line 2
  9. <h2>
  10. Yes
  11. 300
  12. in the same tab
  13. has an address bar
  14. False
  15. news.html
  16. to describe the image
  17. True
  18. Take the quiz
  19. <!DOCTYPE html>
  20. text with links
  21. <a href="about.html">
  22. Welcome!
  23. width
  24. Space Facts
  25. <a>
  26. </h1>
  27. 1
  28. <!DOCTYPE html>
  29. No
  30. <ol>
  31. <li>
  32. height
  33. <ul>
  34. <!--
  35. in the same tab
  36. hosts websites online
  37. Take the quiz
  38. 200
  39. <ol>
  40. a closing tag

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