← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 792 · 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 heading levels does HTML have? (a) 6 (b) 3 (c) 10 (d) 4
  2. 2.🔗 Which tag makes a clickable link? (a) <img> (b) <p> (c) <a> (d) <link>
  3. 3.🔗 Which words do you click on?
    <a href="art.html">Play games</a>
    (a) Play games (b) href (c) art.html (d) About us
  4. 4.💬 Which text will NOT show on the page?
    <p>Cricket is fun.</p>
    <!-- <p>Rain today</p> -->
    <p>My pets</p>
    (a) Cricket is fun. (b) My pets (c) Rain today
  5. 5.🔗 Which address opens when you click this link?
    <a href="maths.html">Visit the site</a>
    (a) Visit the site (b) art.html (c) maths.html (d) news.html
  6. 6.🔗 Where does this link open?
    <a href="games.html" target="_blank">Take the quiz</a>
    (a) in a new tab (b) in the same tab
  7. 7.📋 Which tag goes around each item of a list? (a) <li> (b) <p> (c) <ol> (d) <ul>
  8. 8.True or false: a web browser colours code to help us. (a) False (b) True
  9. 9.🖼️ Which attribute of <img> is read by screen readers? (a) src (b) height (c) alt (d) width
  10. 10.🌐 Which one sends pages over the net? (a) a web browser (b) a web server (c) a code editor
  11. 11.🖼️ Which picture file does the browser load?
    <img src="tiger.jpg" alt="A tiger asleep" width="150">
    (a) A tiger asleep (b) map.png (c) tiger.jpg (d) kite.png
  12. 12.🖼️ How many pixels wide is the picture drawn?
    <img src="moon.png" alt="The full moon" width="350">
  13. 13.🔗 Which words do you click on?
    <a href="contact.html">Maths fun</a>
    (a) href (b) Art corner (c) Maths fun (d) contact.html
  14. 14.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Riya’s Recipes</title>
    </head>
    <body>
      <h1>Match report</h1>
      <p>I like to read.</p>
    </body>
    </html>
    (a) index.html (b) Riya’s Recipes (c) Match report (d) I like to read.
  15. 15.📋 What number does the browser show next to “Banana”?
    <ol>
      <li>Grapes</li>
      <li>Papaya</li>
      <li>Banana</li>
    </ol>
  16. 16.🔗 Where does this link open?
    <a href="games.html" target="_blank">Visit the site</a>
    (a) in a new tab (b) in the same tab
  17. 17.True or false: in <img>, src shows if the image fails. (a) True (b) False
  18. 18.🔗 What does target="_blank" do to a link? (a) makes it bold (b) hides the link (c) opens it in a new tab (d) makes it blank
  19. 19.True or false: in <img>, src names the picture file. (a) True (b) False
  20. 20.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>My Hobbies</title>
    </head>
    <body>
      <h1>My drawings</h1>
      <p>Try this poha.</p>
    </body>
    </html>
    (a) Try this poha. (b) index.html (c) My Hobbies (d) My drawings
  21. 21.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="tiger.jpg" alt="A tiger asleep" width="100">
    (a) A red kite (b) tiger.jpg (c) A tiger asleep (d) width
  22. 22.True or false: <br> is an empty tag. (a) False (b) True
  23. 23.🔢 In a basic web page file, which comes first: “</head>” or “<!DOCTYPE html>”? (a) <!DOCTYPE html> (b) </head>
  24. 24.📝 What does <br> do? (a) makes text bold (b) makes a list (c) starts a new line (d) adds a picture
  25. 25.💬 How many paragraphs show on the page?
    <p>I love mangoes.</p>
    <p>Good morning!</p>
    <!-- <p>My best friend</p> -->
  26. 26.🔍 Which is the odd one out? (a) turns HTML into a page (b) hosts websites online (c) has an address bar (d) shows pages from the web
  27. 27.💬 Which text will NOT show on the page?
    <p>Cricket is fun.</p>
    <p>My pets</p>
    <!-- <p>Good morning!</p> -->
    <p>The red kite</p>
    (a) Cricket is fun. (b) My pets (c) Good morning! (d) The red kite
  28. 28.🔠 Which heading shows the BIGGEST text: <h1>, <h5>, <h4> or <h3>? (a) <h1> (b) <h5> (c) <h4> (d) <h3>
  29. 29.💬 Which text will NOT show on the page?
    <p>Good morning!</p>
    <!-- <p>My pets</p> -->
    <p>My best friend</p>
    (a) My pets (b) Good morning! (c) My best friend
  30. 30.Which of these is an opening tag? (a) <p> (b) </h1> (c) </p> (d) </title>
  31. 31.🔗 Which words do you click on?
    <a href="quiz.html">Art corner</a>
    (a) School news (b) Art corner (c) quiz.html (d) href
  32. 32.💬 How does an HTML comment start? (a) # (b) /* (c) <!-- (d) //
  33. 33.💬 Which text will NOT show on the page?
    <p>Good morning!</p>
    <!-- <p>Cricket is fun.</p> -->
    <p>My pets</p>
    (a) My pets (b) Cricket is fun. (c) Good morning!
  34. 34.💬 Does the browser show comments on the page? (a) Yes (b) No
  35. 35.True or false: HTML on its own cannot add pictures to a page. (a) False (b) True
  36. 36.Which of these is true of a web server? (a) opens web pages for us (b) shows line numbers (c) is where we type code (d) stores a website’s files
  37. 37.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="fort.jpg" alt="An old fort" width="250">
    (a) A tiger asleep (b) fort.jpg (c) An old fort (d) width
  38. 38.🔍 One closing tag is missing. Which one?
    <h2>Fun facts</h2>
    <em>My pets
    <p>Good morning!</p>
    (a) </em> (b) </p> (c) </h2> (d) </small>
  39. 39.True or false: HTML on its own can make bullet lists. (a) True (b) False
  40. 40.🔢 In a basic web page file, which comes first: “<body>” or “</html>”? (a) <body> (b) </html>

Answer key

  1. 6
  2. <a>
  3. Play games
  4. Rain today
  5. maths.html
  6. in a new tab
  7. <li>
  8. False
  9. alt
  10. a web server
  11. tiger.jpg
  12. 350
  13. Maths fun
  14. Riya’s Recipes
  15. 3
  16. in a new tab
  17. False
  18. opens it in a new tab
  19. True
  20. My Hobbies
  21. A tiger asleep
  22. True
  23. <!DOCTYPE html>
  24. starts a new line
  25. 2
  26. hosts websites online
  27. Good morning!
  28. <h1>
  29. My pets
  30. <p>
  31. Art corner
  32. <!--
  33. Cricket is fun.
  34. No
  35. False
  36. stores a website’s files
  37. An old fort
  38. </em>
  39. True
  40. <body>

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