← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 796 · 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 picture file does the browser load?
    <img src="bus.jpg" alt="Our school bus" width="400">
    (a) bus.jpg (b) tiger.jpg (c) Our school bus (d) fort.jpg
  2. 2.💬 How many paragraphs show on the page?
    <p>My best friend</p>
    <!-- <p>My pets</p> -->
    <p>Hello, world!</p>
    <!-- <p>Cricket is fun.</p> -->
    <p>Rain today</p>
  3. 3.🔗 Which words do you click on?
    <a href="games.html">Contact us</a>
    (a) games.html (b) Visit the site (c) Contact us (d) href
  4. 4.True or false: <p> has a closing tag. (a) True (b) False
  5. 5.🔍 One closing tag is missing. Which one?
    <h3>My pets
    <em>The red kite</em>
    <h1>Our school trip</h1>
    (a) </h3> (b) </h1> (c) </u> (d) </em>
  6. 6.📄 What is the first line of an HTML5 page? (a) <html> (b) <body> (c) <head> (d) <!DOCTYPE html>
  7. 7.🌐 Which one answers page requests? (a) a web browser (b) a code editor (c) a web server
  8. 8.🖼️ Which attribute of <img> tells which image to load? (a) width (b) height (c) src (d) alt
  9. 9.📝 Does <h1> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  10. 10.🔗 Which code links to about.html? (a) <link about.html> (b) <a href="about.html"> (c) <a alt="about.html"> (d) <a src="about.html">
  11. 11.True or false: <meta charset="utf-8"> goes in the body. (a) True (b) False
  12. 12.🔤 In “HTML”, what does the M stand for? (a) Modern (b) Markup (c) Machine (d) Mouse
  13. 13.🔗 Which words do you click on?
    <a href="art.html">Contact us</a>
    (a) Contact us (b) Visit the site (c) href (d) art.html
  14. 14.📋 Which tag goes around each item of a list? (a) <p> (b) <ul> (c) <li> (d) <ol>
  15. 15.Which of these has a closing tag? (a) <hr> (b) <br> (c) <input> (d) <ul>
  16. 16.📋 What number does the browser show next to “Jamun”?
    <ol>
      <li>Mango</li>
      <li>Guava</li>
      <li>Jamun</li>
    </ol>
  17. 17.🏷️ Every HTML tag starts with which sign? (a) [ (b) ( (c) { (d) <
  18. 18.Which of these is a closing tag? (a) <h1> (b) <body> (c) <p> (d) </p>
  19. 19.💬 How does an HTML comment end? (a) */ (b) // (c) >> (d) -->
  20. 20.True or false: HTML on its own can run a game loop. (a) False (b) True
  21. 21.💬 How many paragraphs show on the page?
    <!-- <p>The red kite</p> -->
    <p>Fun facts</p>
    <!-- <p>Our school trip</p> -->
    <!-- <p>Rain today</p> -->
    <p>My pets</p>
  22. 22.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Space Facts</title>
    </head>
    <body>
      <h1>My drawings</h1>
      <p>Try this poha.</p>
    </body>
    </html>
    (a) My drawings (b) Try this poha. (c) body (d) Space Facts
  23. 23.📄 Where does <meta charset="utf-8"> go: in the head or in the body? (a) in the body (b) in the head
  24. 24.🔤 In “HTML”, what do the letters HT stand for? (a) High Tech (b) Home Text (c) HyperText (d) Hot Tags
  25. 25.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Riya’s Recipes</title>
    </head>
    <body>
      <h1>Planets</h1>
      <p>Try this poha.</p>
    </body>
    </html>
    (a) body (b) Riya’s Recipes (c) Try this poha. (d) Planets
  26. 26.📄 Where does <p> go: in the head or in the body? (a) in the body (b) in the head
  27. 27.🏷️ Which is the closing tag for <strong>? (a) <strong/> (b) <strong> (c) <\strong> (d) </strong>
  28. 28.📋 Which list shows the steps of a recipe best? (a) <ul> (b) <br> (c) <hr> (d) <ol>
  29. 29.True or false: in <img>, alt describes the picture. (a) False (b) True
  30. 30.💬 Does the browser show comments on the page? (a) No (b) Yes
  31. 31.🔗 Where does this link open?
    <a href="about.html">Take the quiz</a>
    (a) in a new tab (b) in the same tab
  32. 32.🔗 Which words do you click on?
    <a href="news.html">About us</a>
    (a) About us (b) news.html (c) Contact us (d) href
  33. 33.True or false: <meta> has a closing tag. (a) True (b) False
  34. 34.💬 Which text will NOT show on the page?
    <p>Cricket is fun.</p>
    <p>Our school trip</p>
    <!-- <p>My best friend</p> -->
    (a) My best friend (b) Cricket is fun. (c) Our school trip
  35. 35.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>My Hobbies</title>
    </head>
    <body>
      <h1>All about me</h1>
      <p>Thanks for visiting.</p>
    </body>
    </html>
    (a) My Hobbies (b) All about me (c) index.html (d) Thanks for visiting.
  36. 36.🌐 Which one shows pages from the web? (a) a code editor (b) a web browser (c) a web server
  37. 37.💬 Which text will NOT show on the page?
    <p>I love mangoes.</p>
    <p>Cricket is fun.</p>
    <!-- <p>My pets</p> -->
    (a) I love mangoes. (b) Cricket is fun. (c) My pets
  38. 38.🔍 Which line is missing its closing tag?
    line 1: <h2>My best friend</h2>
    line 2: <em>My pets</em>
    line 3: <h3>Good morning!
    (a) line 3 (b) line 2 (c) line 1
  39. 39.🖼️ Which attribute of <img> sets how tall it is? (a) alt (b) src (c) width (d) height
  40. 40.📝 How many paragraphs does this code make?
    <p>Fun facts</p>
    <h2>My best friend</h2>
    <h2>The red kite</h2>
    <p>Rain today</p>
    <p>Rain today</p>

Answer key

  1. bus.jpg
  2. 3
  3. Contact us
  4. True
  5. </h3>
  6. <!DOCTYPE html>
  7. a web server
  8. src
  9. has a closing tag
  10. <a href="about.html">
  11. False
  12. Markup
  13. Contact us
  14. <li>
  15. <ul>
  16. 3
  17. <
  18. </p>
  19. -->
  20. False
  21. 2
  22. My drawings
  23. in the head
  24. HyperText
  25. Planets
  26. in the body
  27. </strong>
  28. <ol>
  29. True
  30. No
  31. in the same tab
  32. About us
  33. False
  34. My best friend
  35. My Hobbies
  36. a web browser
  37. My pets
  38. line 3
  39. height
  40. 3

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