← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 273 · 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.📋 Does this list show bullets or numbers?
    <ol>
      <li>Grapes</li>
      <li>Banana</li>
    </ol>
    (a) numbers (b) bullets
  2. 2.🖼️ How many pixels wide is the picture drawn?
    <img src="moon.png" alt="The full moon" width="350">
  3. 3.📝 On how many lines does the browser show this paragraph?
    <p>Roses are red<br>Stars shine</p>
  4. 4.💬 Which text will NOT show on the page?
    <p>Fun facts</p>
    <p>Rain today</p>
    <p>I love mangoes.</p>
    <!-- <p>Cricket is fun.</p> -->
    (a) Rain today (b) Cricket is fun. (c) Fun facts (d) I love mangoes.
  5. 5.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>My Hobbies</title>
    </head>
    <body>
      <h1>My drawings</h1>
      <p>Try this poha.</p>
    </body>
    </html>
    (a) index.html (b) Try this poha. (c) My Hobbies (d) My drawings
  6. 6.🔢 In a basic web page file, which comes LAST? (a) <!DOCTYPE html> (b) </html> (c) <head> (d) </body>
  7. 7.🔠 How many headings are in this code?
    <h1>Rain today</h1>
    <h4>The red kite</h4>
    <p>Rain today</p>
    <h4>Rain today</h4>
  8. 8.💬 How many paragraphs show on the page?
    <!-- <p>My pets</p> -->
    <!-- <p>Rain today</p> -->
    <p>Cricket is fun.</p>
  9. 9.🔗 Which words do you click on?
    <a href="art.html">About us</a>
    (a) Contact us (b) href (c) art.html (d) About us
  10. 10.📝 On how many lines does the browser show this paragraph?
    <p>Roses are red<br>Sky is blue</p>
  11. 11.🖼️ Which picture file does the browser load?
    <img src="cake.jpg" alt="Birthday cake" width="100">
    (a) cake.jpg (b) Birthday cake (c) moon.png (d) dog.jpg
  12. 12.🔠 Which heading shows the BIGGEST text: <h4>, <h5>, <h1> or <h6>? (a) <h1> (b) <h4> (c) <h6> (d) <h5>
  13. 13.True or false: <li> goes inside ul or ol. (a) True (b) False
  14. 14.🔗 Which words do you click on?
    <a href="news.html">Take the quiz</a>
    (a) Play games (b) news.html (c) href (d) Take the quiz
  15. 15.📋 Which list tag lists things in any order? (a) <ul> (b) <ol> (c) <li>
  16. 16.True or false: in <img>, src names the picture file. (a) False (b) True
  17. 17.📝 Does <title> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  18. 18.💬 Which text will NOT show on the page?
    <p>My best friend</p>
    <p>My pets</p>
    <!-- <p>Rain today</p> -->
    <p>Hello, world!</p>
    (a) My best friend (b) My pets (c) Rain today (d) Hello, world!
  19. 19.🔍 One closing tag is missing. Which one?
    <u>Hello, world!
    <h1>Fun facts</h1>
    <b>Cricket is fun.</b>
    (a) </p> (b) </h1> (c) </b> (d) </u>
  20. 20.🔗 Where does this link open?
    <a href="maths.html" target="_blank">Art corner</a>
    (a) in a new tab (b) in the same tab
  21. 21.🖼️ How many pixels wide is the picture drawn?
    <img src="bus.jpg" alt="Our school bus" width="350">
  22. 22.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Space Facts</title>
    </head>
    <body>
      <h1>Easy snacks</h1>
      <p>Here is my best one.</p>
    </body>
    </html>
    (a) Here is my best one. (b) Easy snacks (c) Space Facts (d) index.html
  23. 23.Which of these is an empty tag? (a) <meta> (b) <li> (c) <ul> (d) <h1>
  24. 24.Which of these has a closing tag? (a) <br> (b) <meta> (c) <input> (d) <p>
  25. 25.💬 How many paragraphs show on the page?
    <!-- <p>Good morning!</p> -->
    <p>I love mangoes.</p>
    <p>The red kite</p>
  26. 26.📝 What does <hr> draw? (a) a picture (b) a line across the page (c) a table (d) a link
  27. 27.🔗 Which code links to about.html? (a) <a alt="about.html"> (b) <a src="about.html"> (c) <link about.html> (d) <a href="about.html">
  28. 28.🔠 Which heading shows the BIGGEST text: <h5>, <h2>, <h6> or <h1>? (a) <h2> (b) <h6> (c) <h5> (d) <h1>
  29. 29.🔗 What does HyperText mean? (a) text with links (b) very big text (c) secret text (d) text in colour
  30. 30.📋 What number does the browser show next to “Orange”?
    <ol>
      <li>Jamun</li>
      <li>Mango</li>
      <li>Guava</li>
      <li>Litchi</li>
      <li>Orange</li>
      <li>Banana</li>
    </ol>
  31. 31.🔠 How many headings are in this code?
    <h1>Hello, world!</h1>
    <p>Our school trip</p>
    <p>Our school trip</p>
    <h2>I love mangoes.</h2>
  32. 32.📝 How many paragraphs does this code make?
    <p>Good morning!</p>
    <h2>My best friend</h2>
    <p>I love mangoes.</p>
  33. 33.📝 How many paragraphs does this code make?
    <p>Our school trip</p>
    <h2>My pets</h2>
    <h2>I love mangoes.</h2>
  34. 34.🔍 One closing tag is missing. Which one?
    <small>Hello, world!
    <em>I love mangoes.</em>
    <i>Cricket is fun.</i>
    (a) </strong> (b) </small> (c) </i> (d) </em>
  35. 35.True or false: HTML on its own cannot make tables. (a) True (b) False
  36. 36.📄 Can HTML on its own show paragraphs? (a) Yes (b) No
  37. 37.🔗 Which address opens when you click this link?
    <a href="art.html">About us</a>
    (a) news.html (b) quiz.html (c) art.html (d) About us
  38. 38.🖼️ Which tag puts a picture on a page? (a) <pic> (b) <p> (c) <a> (d) <img>
  39. 39.🔗 What does target="_blank" do to a link? (a) makes it bold (b) makes it blank (c) hides the link (d) opens it in a new tab
  40. 40.💬 Why do coders write comments? (a) to make links (b) to show pictures (c) to leave notes (d) to add colour

Answer key

  1. numbers
  2. 350
  3. 2
  4. Cricket is fun.
  5. My Hobbies
  6. </html>
  7. 3
  8. 1
  9. About us
  10. 2
  11. cake.jpg
  12. <h1>
  13. True
  14. Take the quiz
  15. <ul>
  16. True
  17. has a closing tag
  18. Rain today
  19. </u>
  20. in a new tab
  21. 350
  22. Space Facts
  23. <meta>
  24. <p>
  25. 2
  26. a line across the page
  27. <a href="about.html">
  28. <h1>
  29. text with links
  30. 5
  31. 2
  32. 2
  33. 1
  34. </small>
  35. False
  36. Yes
  37. art.html
  38. <img>
  39. opens it in a new tab
  40. to leave notes

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