← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 571 · 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 tag is the least important heading? (a) <p> (b) <h3> (c) <h6> (d) <h1>
  2. 2.🔗 Which address opens when you click this link?
    <a href="quiz.html">School news</a>
    (a) quiz.html (b) about.html (c) School news (d) games.html
  3. 3.💬 Does the browser show comments on the page? (a) No (b) Yes
  4. 4.🔗 Where does this link open?
    <a href="about.html">About us</a>
    (a) in a new tab (b) in the same tab
  5. 5.Which of these has a closing tag? (a) <br> (b) <img> (c) <title> (d) <hr>
  6. 6.📝 On how many lines does the browser show this paragraph?
    <p>Rivers flow<br>Sky is blue</p>
  7. 7.🔍 Which line is missing its closing tag?
    line 1: <h3>Our school trip
    line 2: <p>My pets</p>
    line 3: <h2>Fun facts</h2>
    (a) line 3 (b) line 2 (c) line 1
  8. 8.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Riya’s Recipes</title>
    </head>
    <body>
      <h1>All about me</h1>
      <p>Try this poha.</p>
    </body>
    </html>
    (a) Try this poha. (b) body (c) Riya’s Recipes (d) All about me
  9. 9.🖼️ Which attribute of <img> sets how tall it is? (a) height (b) alt (c) src (d) width
  10. 10.True or false: <li> lists things in any order. (a) True (b) False
  11. 11.True or false: a code editor has an address bar. (a) True (b) False
  12. 12.🏷️ Which is the closing tag for <h2>? (a) <h2/> (b) </h2> (c) <\h2> (d) <h2>
  13. 13.Which of these is a closing tag? (a) <p> (b) <b> (c) <body> (d) </b>
  14. 14.True or false: in <img>, width shows if the image fails. (a) False (b) True
  15. 15.💬 Which text will NOT show on the page?
    <p>Cricket is fun.</p>
    <!-- <p>Fun facts</p> -->
    <p>My best friend</p>
    (a) My best friend (b) Cricket is fun. (c) Fun facts
  16. 16.🏷️ Is <h1> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  17. 17.True or false: <p> goes in the head. (a) True (b) False
  18. 18.Which of these is true of a web server? (a) saves our .html files (b) shows line numbers (c) sends pages over the net (d) colours code to help us
  19. 19.🔗 Which words do you click on?
    <a href="quiz.html">Visit the site</a>
    (a) Maths fun (b) quiz.html (c) href (d) Visit the site
  20. 20.💬 How many paragraphs show on the page?
    <p>My pets</p>
    <!-- <p>Hello, world!</p> -->
    <!-- <p>My best friend</p> -->
    <p>I love mangoes.</p>
    <p>Cricket is fun.</p>
  21. 21.🏷️ Is <li> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  22. 22.🔗 Which address opens when you click this link?
    <a href="quiz.html">Maths fun</a>
    (a) Maths fun (b) games.html (c) quiz.html (d) about.html
  23. 23.🏷️ Every HTML tag starts with which sign? (a) [ (b) { (c) ( (d) <
  24. 24.📄 Where does <style> go: in the head or in the body? (a) in the head (b) in the body
  25. 25.🖼️ Which attribute of <img> tells which image to load? (a) width (b) height (c) src (d) alt
  26. 26.🌐 Which one is where we type code? (a) a code editor (b) a web browser (c) a web server
  27. 27.💬 How many paragraphs show on the page?
    <p>Our school trip</p>
    <p>The red kite</p>
    <p>Rain today</p>
    <!-- <p>I love mangoes.</p> -->
    <p>My pets</p>
  28. 28.🔗 Which attribute holds the address of a link? (a) src (b) id (c) href (d) alt
  29. 29.📋 What number does the browser show next to “Guava”?
    <ol start="9">
      <li>Grapes</li>
      <li>Papaya</li>
      <li>Guava</li>
      <li>Orange</li>
    </ol>
  30. 30.True or false: a web server opens web pages for us. (a) False (b) True
  31. 31.True or false: in <img>, src tells which image to load. (a) True (b) False
  32. 32.📋 Which list shows the steps of a recipe best? (a) <ul> (b) <ol> (c) <br> (d) <hr>
  33. 33.💬 How does an HTML comment end? (a) // (b) */ (c) --> (d) >>
  34. 34.🔍 Which line is missing its closing tag?
    line 1: <strong>Good morning!
    line 2: <b>Fun facts</b>
    line 3: <h1>My pets</h1>
    (a) line 2 (b) line 3 (c) line 1
  35. 35.🔍 One closing tag is missing. Which one?
    <h3>Fun facts</h3>
    <p>Rain today</p>
    <i>My best friend
    (a) </h3> (b) </p> (c) </h2> (d) </i>
  36. 36.📋 Which tag goes around each item of a list? (a) <ol> (b) <p> (c) <li> (d) <ul>
  37. 37.💬 How many paragraphs show on the page?
    <p>I love mangoes.</p>
    <p>Cricket is fun.</p>
    <p>Rain today</p>
    <p>Our school trip</p>
    <!-- <p>Good morning!</p> -->
  38. 38.📋 Does this list show bullets or numbers?
    <ul>
      <li>Litchi</li>
      <li>Guava</li>
      <li>Grapes</li>
    </ul>
    (a) numbers (b) bullets
  39. 39.🖼️ Which picture file does the browser load?
    <img src="bus.jpg" alt="Our school bus" width="250">
    (a) fort.jpg (b) bus.jpg (c) Our school bus (d) tiger.jpg
  40. 40.🔢 In a basic web page file, which comes FIRST? (a) <html> (b) <body> (c) <!DOCTYPE html> (d) </html>

Answer key

  1. <h6>
  2. quiz.html
  3. No
  4. in the same tab
  5. <title>
  6. 2
  7. line 1
  8. All about me
  9. height
  10. False
  11. False
  12. </h2>
  13. </b>
  14. False
  15. Fun facts
  16. an opening tag
  17. False
  18. sends pages over the net
  19. Visit the site
  20. 3
  21. an opening tag
  22. quiz.html
  23. <
  24. in the head
  25. src
  26. a code editor
  27. 4
  28. href
  29. 11
  30. False
  31. True
  32. <ol>
  33. -->
  34. line 1
  35. </i>
  36. <li>
  37. 4
  38. bullets
  39. bus.jpg
  40. <!DOCTYPE html>

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