← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 289 · 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 words do you click on?
    <a href="games.html">School news</a>
    (a) href (b) Take the quiz (c) School news (d) games.html
  2. 2.📄 What is the first line of an HTML5 page? (a) <body> (b) <html> (c) <!DOCTYPE html> (d) <head>
  3. 3.📄 Can HTML on its own make tables? (a) No (b) Yes
  4. 4.True or false: in <img>, height sets how wide it is. (a) False (b) True
  5. 5.🏷️ Is </p> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  6. 6.📝 What does <p> make? (a) a picture (b) a table (c) a paragraph (d) a link
  7. 7.📋 How many items does this list show?
    <ul>
      <li>Guava</li>
      <li>Mango</li>
      <li>Grapes</li>
      <li>Jamun</li>
      <li>Papaya</li>
      <li>Litchi</li>
    </ul>
  8. 8.📋 What number does the browser show next to “Papaya”?
    <ol start="5">
      <li>Grapes</li>
      <li>Jamun</li>
      <li>Papaya</li>
    </ol>
  9. 9.True or false: HTML on its own cannot make a form. (a) False (b) True
  10. 10.🔗 Where does this link open?
    <a href="art.html" target="_blank">Play games</a>
    (a) in a new tab (b) in the same tab
  11. 11.🧩 An opening tag + content + a closing tag together make an ___. (a) element (b) editor (c) address (d) attribute
  12. 12.🔍 Which line is missing its closing tag?
    line 1: <em>Rain today</em>
    line 2: <strong>Hello, world!
    line 3: <b>Our school trip</b>
    (a) line 1 (b) line 3 (c) line 2
  13. 13.💬 How many paragraphs show on the page?
    <!-- <p>I love mangoes.</p> -->
    <p>My pets</p>
    <!-- <p>Our school trip</p> -->
    <!-- <p>My best friend</p> -->
    <!-- <p>Fun facts</p> -->
  14. 14.🔍 Which is the odd one out? (a) stores a website’s files (b) answers page requests (c) turns HTML into a page (d) sends pages over the net
  15. 15.🔗 Which words do you click on?
    <a href="https://example.com">About us</a>
    (a) About us (b) href (c) Contact us (d) https://example.com
  16. 16.🖼️ Which attribute of <img> describes the picture? (a) width (b) alt (c) height (d) src
  17. 17.📝 Does <h1> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  18. 18.🔠 Which heading shows the BIGGEST text: <h6>, <h2>, <h5> or <h1>? (a) <h6> (b) <h2> (c) <h5> (d) <h1>
  19. 19.📝 How many paragraphs does this code make?
    <p>My pets</p>
    <h2>My best friend</h2>
    <h2>Rain today</h2>
    <h2>Hello, world!</h2>
    <p>Our school trip</p>
  20. 20.🔠 Which tag is the least important heading? (a) <h3> (b) <h6> (c) <p> (d) <h1>
  21. 21.Which of these has a closing tag? (a) <br> (b) <img> (c) <title> (d) <input>
  22. 22.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>My Hobbies</title>
    </head>
    <body>
      <h1>My drawings</h1>
      <p>Mars is red.</p>
    </body>
    </html>
    (a) Mars is red. (b) index.html (c) My Hobbies (d) My drawings
  23. 23.📋 Which list tag shows bullet points? (a) <li> (b) <ul> (c) <ol>
  24. 24.🔗 Which words do you click on?
    <a href="news.html">About us</a>
    (a) href (b) About us (c) news.html (d) Contact us
  25. 25.💬 Which text will NOT show on the page?
    <p>Fun facts</p>
    <!-- <p>Cricket is fun.</p> -->
    <p>Rain today</p>
    <p>My pets</p>
    (a) Fun facts (b) Cricket is fun. (c) My pets (d) Rain today
  26. 26.🏷️ Which is the closing tag for <h2>? (a) <\h2> (b) <h2> (c) </h2> (d) <h2/>
  27. 27.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Cricket Club</title>
    </head>
    <body>
      <h1>Welcome!</h1>
      <p>Try this poha.</p>
    </body>
    </html>
    (a) Welcome! (b) Try this poha. (c) Cricket Club (d) index.html
  28. 28.🔠 Which heading shows the SMALLEST text: <h5>, <h4>, <h1> or <h2>? (a) <h5> (b) <h1> (c) <h4> (d) <h2>
  29. 29.🖼️ Which picture file does the browser load?
    <img src="cake.jpg" alt="Birthday cake" width="400">
    (a) cake.jpg (b) Birthday cake (c) dog.jpg (d) moon.png
  30. 30.📋 Does this list show bullets or numbers?
    <ol>
      <li>Grapes</li>
      <li>Litchi</li>
    </ol>
    (a) numbers (b) bullets
  31. 31.🔗 Where does this link open?
    <a href="art.html" target="_blank">Take the quiz</a>
    (a) in a new tab (b) in the same tab
  32. 32.🔗 Which words do you click on?
    <a href="https://example.com">Contact us</a>
    (a) https://example.com (b) href (c) Visit the site (d) Contact us
  33. 33.Which of these is true of a web server? (a) saves our .html files (b) sends pages over the net (c) turns HTML into a page (d) shows pages from the web
  34. 34.🏷️ Is <h1> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  35. 35.📝 How many paragraphs does this code make?
    <p>My pets</p>
    <p>Hello, world!</p>
    <p>My pets</p>
    <p>My best friend</p>
  36. 36.📋 What number does the browser show next to “Orange”?
    <ol>
      <li>Banana</li>
      <li>Mango</li>
      <li>Orange</li>
      <li>Guava</li>
      <li>Papaya</li>
    </ol>
  37. 37.Which of these is an opening tag? (a) </body> (b) </p> (c) <li> (d) </h1>
  38. 38.🖼️ Does <img> need a closing tag? (a) No (b) Yes
  39. 39.🔍 One closing tag is missing. Which one?
    <small>Cricket is fun.
    <u>Fun facts</u>
    <p>My pets</p>
    (a) </p> (b) </small> (c) </b> (d) </u>
  40. 40.🔠 How many headings are in this code?
    <h1>Hello, world!</h1>
    <p>My pets</p>
    <h2>Fun facts</h2>

Answer key

  1. School news
  2. <!DOCTYPE html>
  3. Yes
  4. False
  5. a closing tag
  6. a paragraph
  7. 6
  8. 7
  9. False
  10. in a new tab
  11. element
  12. line 2
  13. 1
  14. turns HTML into a page
  15. About us
  16. alt
  17. has a closing tag
  18. <h1>
  19. 2
  20. <h6>
  21. <title>
  22. My Hobbies
  23. <ul>
  24. About us
  25. Cricket is fun.
  26. </h2>
  27. Cricket Club
  28. <h5>
  29. cake.jpg
  30. numbers
  31. in a new tab
  32. Contact us
  33. sends pages over the net
  34. an opening tag
  35. 4
  36. 3
  37. <li>
  38. No
  39. </small>
  40. 2

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