← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 888 · 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.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="map.png" alt="Map of India" width="300">
    (a) map.png (b) Map of India (c) width (d) Birthday cake
  2. 2.🔍 Which line is missing its closing tag?
    line 1: <h3>Our school trip</h3>
    line 2: <h2>Fun facts</h2>
    line 3: <strong>Rain today
    (a) line 3 (b) line 1 (c) line 2
  3. 3.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="cake.jpg" alt="Birthday cake" width="400">
    (a) width (b) cake.jpg (c) Birthday cake (d) A happy dog
  4. 4.🔠 Which heading shows the BIGGEST text: <h1>, <h6>, <h5> or <h2>? (a) <h2> (b) <h6> (c) <h5> (d) <h1>
  5. 5.Which of these is true of a web server? (a) has an address bar (b) turns HTML into a page (c) hosts websites online (d) opens web pages for us
  6. 6.Which of these is true of a web browser? (a) shows line numbers (b) shows pages from the web (c) hosts websites online (d) is where we type code
  7. 7.🔠 How many headings are in this code?
    <h1>My best friend</h1>
    <p>I love mangoes.</p>
    <p>The red kite</p>
    <p>Rain today</p>
  8. 8.🔗 Which words do you click on?
    <a href="maths.html">Contact us</a>
    (a) Visit the site (b) href (c) maths.html (d) Contact us
  9. 9.🔗 Which words do you click on?
    <a href="quiz.html">About us</a>
    (a) Contact us (b) quiz.html (c) href (d) About us
  10. 10.🔢 In a basic web page file, which comes first: “</body>” or “</html>”? (a) </html> (b) </body>
  11. 11.📋 Does this list show bullets or numbers?
    <ul>
      <li>Banana</li>
      <li>Papaya</li>
      <li>Mango</li>
    </ul>
    (a) numbers (b) bullets
  12. 12.📋 What number does the browser show next to “Papaya”?
    <ol start="3">
      <li>Guava</li>
      <li>Litchi</li>
      <li>Papaya</li>
    </ol>
  13. 13.🔗 What does target="_blank" do to a link? (a) hides the link (b) makes it blank (c) opens it in a new tab (d) makes it bold
  14. 14.📋 What number does the browser show next to “Litchi”?
    <ol start="6">
      <li>Orange</li>
      <li>Jamun</li>
      <li>Mango</li>
      <li>Litchi</li>
      <li>Grapes</li>
      <li>Papaya</li>
    </ol>
  15. 15.📝 How many paragraphs does this code make?
    <p>My pets</p>
    <h2>Good morning!</h2>
    <h2>Hello, world!</h2>
  16. 16.📋 What number does the browser show next to “Papaya”?
    <ol>
      <li>Guava</li>
      <li>Jamun</li>
      <li>Orange</li>
      <li>Litchi</li>
      <li>Papaya</li>
      <li>Mango</li>
    </ol>
  17. 17.🖼️ Which picture file does the browser load?
    <img src="dog.jpg" alt="A happy dog" width="400">
    (a) A happy dog (b) moon.png (c) dog.jpg (d) bus.jpg
  18. 18.🔠 Are headings shown in bold by default? (a) No (b) Yes
  19. 19.💬 Why do coders write comments? (a) to add colour (b) to make links (c) to leave notes (d) to show pictures
  20. 20.🔠 How many heading levels does HTML have? (a) 4 (b) 3 (c) 10 (d) 6
  21. 21.🌐 Which one shows pages from the web? (a) a web server (b) a web browser (c) a code editor
  22. 22.💬 How many paragraphs show on the page?
    <!-- <p>Fun facts</p> -->
    <p>I love mangoes.</p>
    <p>The red kite</p>
  23. 23.💬 How many paragraphs show on the page?
    <!-- <p>Rain today</p> -->
    <!-- <p>Hello, world!</p> -->
    <p>I love mangoes.</p>
  24. 24.🔗 Which attribute holds the address of a link? (a) href (b) id (c) src (d) alt
  25. 25.Which of these goes in the head? (a) <table> (b) <style> (c) <a> (d) <img>
  26. 26.💬 Does the browser show comments on the page? (a) Yes (b) No
  27. 27.Which of these goes in the body? (a) <style> (b) <title> (c) <meta charset="utf-8"> (d) <h1>
  28. 28.Which of these is true of a web browser? (a) opens web pages for us (b) answers page requests (c) colours code to help us (d) stores a website’s files
  29. 29.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Cricket Club</title>
    </head>
    <body>
      <h1>My drawings</h1>
      <p>We won by 5 runs.</p>
    </body>
    </html>
    (a) body (b) My drawings (c) Cricket Club (d) We won by 5 runs.
  30. 30.🔗 Which words do you click on?
    <a href="about.html">Maths fun</a>
    (a) Maths fun (b) Art corner (c) href (d) about.html
  31. 31.🏷️ Is </body> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  32. 32.🔠 How many headings are in this code?
    <h1>Fun facts</h1>
    <p>Fun facts</p>
    <p>My best friend</p>
    <h4>Hello, world!</h4>
    <p>My pets</p>
  33. 33.🔠 Which heading shows the SMALLEST text: <h4>, <h1>, <h6> or <h5>? (a) <h1> (b) <h5> (c) <h6> (d) <h4>
  34. 34.📋 How many items does this list show?
    <ul>
      <li>Papaya</li>
      <li>Orange</li>
      <li>Litchi</li>
      <li>Jamun</li>
      <li>Grapes</li>
      <li>Mango</li>
    </ul>
  35. 35.Which of these is true of a code editor? (a) turns HTML into a page (b) sends pages over the net (c) saves our .html files (d) stores a website’s files
  36. 36.💬 Which text will NOT show on the page?
    <p>Good morning!</p>
    <p>Hello, world!</p>
    <p>I love mangoes.</p>
    <!-- <p>Fun facts</p> -->
    (a) Hello, world! (b) Fun facts (c) Good morning! (d) I love mangoes.
  37. 37.🔍 One closing tag is missing. Which one?
    <h3>The red kite
    <em>Our school trip</em>
    <p>I love mangoes.</p>
    (a) </em> (b) </p> (c) </h3> (d) </u>
  38. 38.True or false: <p> goes in the body. (a) True (b) False
  39. 39.True or false: in <img>, height sets how tall it is. (a) False (b) True
  40. 40.📄 Can HTML on its own make a form? (a) No (b) Yes

Answer key

  1. Map of India
  2. line 3
  3. Birthday cake
  4. <h1>
  5. hosts websites online
  6. shows pages from the web
  7. 1
  8. Contact us
  9. About us
  10. </body>
  11. bullets
  12. 5
  13. opens it in a new tab
  14. 9
  15. 1
  16. 5
  17. dog.jpg
  18. Yes
  19. to leave notes
  20. 6
  21. a web browser
  22. 2
  23. 1
  24. href
  25. <style>
  26. No
  27. <h1>
  28. opens web pages for us
  29. My drawings
  30. Maths fun
  31. a closing tag
  32. 2
  33. <h6>
  34. 6
  35. saves our .html files
  36. Fun facts
  37. </h3>
  38. True
  39. True
  40. Yes

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