← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 161 · 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.📋 How many items does this list show?
    <ul>
      <li>Banana</li>
      <li>Guava</li>
      <li>Mango</li>
      <li>Jamun</li>
      <li>Litchi</li>
    </ul>
  2. 2.📝 What does <hr> draw? (a) a link (b) a picture (c) a table (d) a line across the page
  3. 3.🔗 Which address opens when you click this link?
    <a href="art.html">Visit the site</a>
    (a) art.html (b) Visit the site (c) news.html (d) quiz.html
  4. 4.True or false: <ul> shows 1, 2, 3 numbers. (a) False (b) True
  5. 5.💬 Which text will NOT show on the page?
    <p>The red kite</p>
    <p>Cricket is fun.</p>
    <p>I love mangoes.</p>
    <!-- <p>Fun facts</p> -->
    (a) The red kite (b) I love mangoes. (c) Fun facts (d) Cricket is fun.
  6. 6.🔤 In “HTML”, what does the L stand for? (a) Laptop (b) Line (c) Language (d) Link
  7. 7.📛 In <a href="x.html">, what is href? (a) an element name (b) an attribute (c) a comment (d) a closing tag
  8. 8.Which of these is an opening tag? (a) </p> (b) <title> (c) </b> (d) </body>
  9. 9.🔍 Which line is missing its closing tag?
    line 1: <h3>My pets</h3>
    line 2: <h1>Hello, world!
    line 3: <em>Rain today</em>
    (a) line 2 (b) line 1 (c) line 3
  10. 10.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="dog.jpg" alt="A happy dog" width="50">
    (a) The full moon (b) A happy dog (c) dog.jpg (d) width
  11. 11.📝 How many paragraphs does this code make?
    <p>Rain today</p>
    <h2>Our school trip</h2>
    <p>My pets</p>
  12. 12.🔤 In “HTML”, what do the letters HT stand for? (a) High Tech (b) Hot Tags (c) Home Text (d) HyperText
  13. 13.🌐 Which one sends pages over the net? (a) a web server (b) a code editor (c) a web browser
  14. 14.🔠 How many headings are in this code?
    <h1>Good morning!</h1>
    <h4>Our school trip</h4>
    <p>Fun facts</p>
  15. 15.🔠 How many headings are in this code?
    <h1>Cricket is fun.</h1>
    <h3>Fun facts</h3>
    <h3>Our school trip</h3>
  16. 16.🔗 Which tag makes a clickable link? (a) <p> (b) <link> (c) <img> (d) <a>
  17. 17.True or false: <h1> goes in the head. (a) True (b) False
  18. 18.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Riya’s Recipes</title>
    </head>
    <body>
      <h1>Planets</h1>
      <p>I like to read.</p>
    </body>
    </html>
    (a) Riya’s Recipes (b) I like to read. (c) Planets (d) body
  19. 19.📋 What number does the browser show next to “Papaya”?
    <ol start="3">
      <li>Litchi</li>
      <li>Mango</li>
      <li>Grapes</li>
      <li>Orange</li>
      <li>Papaya</li>
      <li>Guava</li>
    </ol>
  20. 20.📄 What is the first line of an HTML5 page? (a) <body> (b) <head> (c) <html> (d) <!DOCTYPE html>
  21. 21.🔗 Which address opens when you click this link?
    <a href="maths.html">About us</a>
    (a) maths.html (b) art.html (c) news.html (d) About us
  22. 22.Which of these is a closing tag? (a) <body> (b) <li> (c) <p> (d) </h1>
  23. 23.🌐 Which one answers page requests? (a) a code editor (b) a web server (c) a web browser
  24. 24.🏷️ Is <title> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  25. 25.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="kite.png" alt="A red kite" width="100">
    (a) kite.png (b) A red kite (c) width (d) Map of India
  26. 26.📋 Does this list show bullets or numbers?
    <ol>
      <li>Banana</li>
      <li>Litchi</li>
      <li>Jamun</li>
    </ol>
    (a) numbers (b) bullets
  27. 27.📝 How many paragraphs does this code make?
    <p>My pets</p>
    <p>My best friend</p>
    <p>The red kite</p>
  28. 28.🖼️ How many pixels wide is the picture drawn?
    <img src="moon.png" alt="The full moon" width="250">
  29. 29.📄 Can HTML on its own make tables? (a) No (b) Yes
  30. 30.True or false: HTML on its own cannot make links to pages. (a) False (b) True
  31. 31.🔠 Which heading shows the SMALLEST text: <h1>, <h2>, <h5> or <h6>? (a) <h5> (b) <h1> (c) <h6> (d) <h2>
  32. 32.True or false: in <img>, alt tells which image to load. (a) False (b) True
  33. 33.True or false: <input> has a closing tag. (a) False (b) True
  34. 34.📋 How many items does this list show?
    <ol>
      <li>Jamun</li>
      <li>Orange</li>
      <li>Litchi</li>
      <li>Guava</li>
      <li>Papaya</li>
      <li>Banana</li>
    </ol>
  35. 35.🌐 Which one opens web pages for us? (a) a web browser (b) a code editor (c) a web server
  36. 36.💬 How many paragraphs show on the page?
    <!-- <p>My best friend</p> -->
    <p>I love mangoes.</p>
    <p>Fun facts</p>
  37. 37.Which of these is an empty tag? (a) <ul> (b) <hr> (c) <b> (d) <h1>
  38. 38.📝 How many paragraphs does this code make?
    <p>My best friend</p>
    <h2>Our school trip</h2>
    <h2>My pets</h2>
    <p>My best friend</p>
    <p>Our school trip</p>
    <h2>Fun facts</h2>
  39. 39.🌐 Which one has an address bar? (a) a web browser (b) a web server (c) a code editor
  40. 40.🖼️ Does <img> need a closing tag? (a) Yes (b) No

Answer key

  1. 5
  2. a line across the page
  3. art.html
  4. False
  5. Fun facts
  6. Language
  7. an attribute
  8. <title>
  9. line 2
  10. A happy dog
  11. 2
  12. HyperText
  13. a web server
  14. 2
  15. 3
  16. <a>
  17. False
  18. Planets
  19. 7
  20. <!DOCTYPE html>
  21. maths.html
  22. </h1>
  23. a web server
  24. an opening tag
  25. A red kite
  26. numbers
  27. 3
  28. 250
  29. Yes
  30. False
  31. <h6>
  32. False
  33. False
  34. 6
  35. a web browser
  36. 2
  37. <hr>
  38. 3
  39. a web browser
  40. No

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