← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 359 · 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 headings are in this code?
    <h1>Our school trip</h1>
    <h2>My pets</h2>
    <h2>I love mangoes.</h2>
    <p>Hello, world!</p>
  2. 2.🔠 Which tag is used for the main title on a page? (a) <h1> (b) <br> (c) <h6> (d) <p>
  3. 3.📋 Does this list show bullets or numbers?
    <ul>
      <li>Guava</li>
      <li>Banana</li>
      <li>Jamun</li>
    </ul>
    (a) bullets (b) numbers
  4. 4.True or false: a web browser opens web pages for us. (a) False (b) True
  5. 5.🔠 How many headings are in this code?
    <h1>Good morning!</h1>
    <h2>Good morning!</h2>
    <h3>My pets</h3>
  6. 6.🔍 One closing tag is missing. Which one?
    <h1>Fun facts</h1>
    <p>Cricket is fun.
    <b>My pets</b>
    (a) </h1> (b) </b> (c) </p> (d) </small>
  7. 7.🖼️ Which attribute of <img> sets how wide it is? (a) src (b) height (c) alt (d) width
  8. 8.🔍 Which line is missing its closing tag?
    line 1: <h2>Cricket is fun.
    line 2: <u>Rain today</u>
    line 3: <p>The red kite</p>
    (a) line 1 (b) line 3 (c) line 2
  9. 9.🔠 Which heading shows the BIGGEST text: <h1>, <h4>, <h3> or <h2>? (a) <h3> (b) <h4> (c) <h2> (d) <h1>
  10. 10.🌐 Which one stores a website’s files? (a) a web browser (b) a code editor (c) a web server
  11. 11.🖼️ How many pixels wide is the picture drawn?
    <img src="bus.jpg" alt="Our school bus" width="50">
  12. 12.📋 How many items does this list show?
    <ol>
      <li>Guava</li>
      <li>Banana</li>
      <li>Grapes</li>
    </ol>
  13. 13.🔠 Which tag is the least important heading? (a) <h3> (b) <h6> (c) <p> (d) <h1>
  14. 14.🔗 Which words do you click on?
    <a href="about.html">Art corner</a>
    (a) href (b) about.html (c) School news (d) Art corner
  15. 15.📄 What is the first line of an HTML5 page? (a) <body> (b) <html> (c) <head> (d) <!DOCTYPE html>
  16. 16.🔗 Where does this link open?
    <a href="news.html" target="_blank">School news</a>
    (a) in the same tab (b) in a new tab
  17. 17.Which of these is a closing tag? (a) <li> (b) <p> (c) <b> (d) </title>
  18. 18.🔍 One closing tag is missing. Which one?
    <p>My pets
    <strong>Hello, world!</strong>
    <em>Our school trip</em>
    (a) </i> (b) </strong> (c) </em> (d) </p>
  19. 19.🏷️ Which is the closing tag for <p>? (a) <p> (b) <\p> (c) </p> (d) <p/>
  20. 20.📝 How many paragraphs does this code make?
    <p>Fun facts</p>
    <h2>Good morning!</h2>
    <p>Our school trip</p>
  21. 21.🔢 In a basic web page file, which comes first: “<!DOCTYPE html>” or “<html>”? (a) <!DOCTYPE html> (b) <html>
  22. 22.🔍 One closing tag is missing. Which one?
    <u>I love mangoes.
    <small>My best friend</small>
    <i>Cricket is fun.</i>
    (a) </i> (b) </h3> (c) </u> (d) </small>
  23. 23.🔗 Which words do you click on?
    <a href="news.html">About us</a>
    (a) Contact us (b) news.html (c) href (d) About us
  24. 24.True or false: in <img>, src is read by screen readers. (a) True (b) False
  25. 25.True or false: <li> lists things in any order. (a) True (b) False
  26. 26.🌐 Which one opens web pages for us? (a) a web server (b) a code editor (c) a web browser
  27. 27.True or false: in <img>, alt sets how tall it is. (a) True (b) False
  28. 28.📋 Which list suits a shopping list in any order? (a) <br> (b) <hr> (c) <ol> (d) <ul>
  29. 29.📋 How many items does this list show?
    <ol>
      <li>Litchi</li>
      <li>Orange</li>
      <li>Grapes</li>
    </ol>
  30. 30.🌐 Which one turns HTML into a page? (a) a code editor (b) a web browser (c) a web server
  31. 31.True or false: in <img>, src tells which image to load. (a) False (b) True
  32. 32.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="fort.jpg" alt="An old fort" width="300">
    (a) An old fort (b) fort.jpg (c) width (d) A tiger asleep
  33. 33.True or false: <img> goes in the body. (a) False (b) True
  34. 34.🔗 Which tag makes a clickable link? (a) <p> (b) <a> (c) <link> (d) <img>
  35. 35.📄 Where does <h1> go: in the head or in the body? (a) in the head (b) in the body
  36. 36.💬 Which text will NOT show on the page?
    <p>Fun facts</p>
    <p>Our school trip</p>
    <!-- <p>My pets</p> -->
    (a) My pets (b) Our school trip (c) Fun facts
  37. 37.🔗 Which words do you click on?
    <a href="games.html">Art corner</a>
    (a) href (b) Art corner (c) School news (d) games.html
  38. 38.🔠 How many <h1> headings should a page usually have? (a) 10 (b) 3 (c) 1 (d) 6
  39. 39.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="map.png" alt="Map of India" width="150">
    (a) Birthday cake (b) map.png (c) width (d) Map of India
  40. 40.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Riya’s Recipes</title>
    </head>
    <body>
      <h1>Welcome!</h1>
      <p>Try this poha.</p>
    </body>
    </html>
    (a) body (b) Try this poha. (c) Riya’s Recipes (d) Welcome!

Answer key

  1. 3
  2. <h1>
  3. bullets
  4. True
  5. 3
  6. </p>
  7. width
  8. line 1
  9. <h1>
  10. a web server
  11. 50
  12. 3
  13. <h6>
  14. Art corner
  15. <!DOCTYPE html>
  16. in a new tab
  17. </title>
  18. </p>
  19. </p>
  20. 2
  21. <!DOCTYPE html>
  22. </u>
  23. About us
  24. False
  25. False
  26. a web browser
  27. False
  28. <ul>
  29. 3
  30. a web browser
  31. True
  32. An old fort
  33. True
  34. <a>
  35. in the body
  36. My pets
  37. Art corner
  38. 1
  39. Map of India
  40. Welcome!

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