← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 949 · 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 tag is used for the main title on a page? (a) <h6> (b) <br> (c) <p> (d) <h1>
  2. 2.🔗 Where does this link open?
    <a href="news.html" target="_blank">Take the quiz</a>
    (a) in the same tab (b) in a new tab
  3. 3.True or false: <table> goes in the body. (a) True (b) False
  4. 4.Which of these goes in the body? (a) <title> (b) <p> (c) <link rel="stylesheet"> (d) <style>
  5. 5.🖼️ Which attribute of <img> is read by screen readers? (a) height (b) width (c) src (d) alt
  6. 6.Which of these is true of a web browser? (a) hosts websites online (b) opens web pages for us (c) sends pages over the net (d) is where we type code
  7. 7.🔠 How many headings are in this code?
    <h1>I love mangoes.</h1>
    <p>Rain today</p>
    <h2>Rain today</h2>
    <h2>My pets</h2>
    <p>Good morning!</p>
  8. 8.🔠 How many heading levels does HTML have? (a) 10 (b) 6 (c) 3 (d) 4
  9. 9.True or false: in <img>, height is read by screen readers. (a) True (b) False
  10. 10.🔍 Which line is missing its closing tag?
    line 1: <strong>Fun facts</strong>
    line 2: <u>Rain today
    line 3: <b>Cricket is fun.</b>
    (a) line 2 (b) line 1 (c) line 3
  11. 11.💬 Which text will NOT show on the page?
    <!-- <p>Rain today</p> -->
    <p>Cricket is fun.</p>
    <p>My pets</p>
    (a) Cricket is fun. (b) My pets (c) Rain today
  12. 12.📄 Where does <ul> go: in the head or in the body? (a) in the head (b) in the body
  13. 13.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the body (b) in the head
  14. 14.True or false: a code editor turns HTML into a page. (a) False (b) True
  15. 15.🔗 Which tag makes a clickable link? (a) <img> (b) <p> (c) <a> (d) <link>
  16. 16.📄 Where does <style> go: in the head or in the body? (a) in the body (b) in the head
  17. 17.🔤 In “HTML”, what does the M stand for? (a) Mouse (b) Machine (c) Markup (d) Modern
  18. 18.Which of these is true of a web server? (a) stores a website’s files (b) shows pages from the web (c) is where we type code (d) colours code to help us
  19. 19.🌐 Which one answers page requests? (a) a code editor (b) a web server (c) a web browser
  20. 20.Which of these goes in the body? (a) <style> (b) <link rel="stylesheet"> (c) <h1> (d) <meta charset="utf-8">
  21. 21.🔍 Which line is missing its closing tag?
    line 1: <h2>My pets</h2>
    line 2: <h1>Cricket is fun.</h1>
    line 3: <strong>Hello, world!
    (a) line 1 (b) line 2 (c) line 3
  22. 22.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="cake.jpg" alt="Birthday cake" width="50">
    (a) A happy dog (b) width (c) cake.jpg (d) Birthday cake
  23. 23.🔗 Where does this link open?
    <a href="games.html">About us</a>
    (a) in a new tab (b) in the same tab
  24. 24.True or false: <link rel="stylesheet"> goes in the body. (a) False (b) True
  25. 25.Which of these is an empty tag? (a) <p> (b) <meta> (c) <li> (d) <h1>
  26. 26.🔗 Which address opens when you click this link?
    <a href="news.html">Take the quiz</a>
    (a) Take the quiz (b) news.html (c) games.html (d) quiz.html
  27. 27.🔠 Which heading shows the BIGGEST text: <h1>, <h5>, <h6> or <h3>? (a) <h1> (b) <h6> (c) <h3> (d) <h5>
  28. 28.🔠 Which heading shows the SMALLEST text: <h2>, <h1>, <h5> or <h3>? (a) <h1> (b) <h2> (c) <h3> (d) <h5>
  29. 29.🌍 Which program shows a web page to us? (a) a music player (b) a web browser (c) a paint program (d) a calculator
  30. 30.🔍 One closing tag is missing. Which one?
    <em>My best friend</em>
    <b>Our school trip
    <h2>I love mangoes.</h2>
    (a) </h2> (b) </h1> (c) </b> (d) </em>
  31. 31.📄 Can HTML on its own show paragraphs? (a) Yes (b) No
  32. 32.🔢 In a basic web page file, which comes first: “<head>” or “<body>”? (a) <head> (b) <body>
  33. 33.True or false: in <img>, height sets how tall it is. (a) False (b) True
  34. 34.🖼️ How many pixels wide is the picture drawn?
    <img src="fort.jpg" alt="An old fort" width="400">
  35. 35.📄 What is the first line of an HTML5 page? (a) <head> (b) <body> (c) <html> (d) <!DOCTYPE html>
  36. 36.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="map.png" alt="Map of India" width="100">
    (a) map.png (b) Birthday cake (c) width (d) Map of India
  37. 37.🔗 What does HyperText mean? (a) very big text (b) text in colour (c) secret text (d) text with links
  38. 38.🖼️ Which tag puts a picture on a page? (a) <img> (b) <pic> (c) <a> (d) <p>
  39. 39.🖼️ How many pixels wide is the picture drawn?
    <img src="cake.jpg" alt="Birthday cake" width="250">
  40. 40.📋 Does this list show bullets or numbers?
    <ul>
      <li>Banana</li>
      <li>Jamun</li>
      <li>Papaya</li>
    </ul>
    (a) numbers (b) bullets

Answer key

  1. <h1>
  2. in a new tab
  3. True
  4. <p>
  5. alt
  6. opens web pages for us
  7. 3
  8. 6
  9. False
  10. line 2
  11. Rain today
  12. in the body
  13. in the head
  14. False
  15. <a>
  16. in the head
  17. Markup
  18. stores a website’s files
  19. a web server
  20. <h1>
  21. line 3
  22. Birthday cake
  23. in the same tab
  24. False
  25. <meta>
  26. news.html
  27. <h1>
  28. <h5>
  29. a web browser
  30. </b>
  31. Yes
  32. <head>
  33. True
  34. 400
  35. <!DOCTYPE html>
  36. Map of India
  37. text with links
  38. <img>
  39. 250
  40. bullets

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