← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 490 · 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.True or false: in <img>, src sets how tall it is. (a) False (b) True
  2. 2.🔍 Which is the odd one out? (a) turns HTML into a page (b) stores a website’s files (c) opens web pages for us (d) shows pages from the web
  3. 3.🏷️ Which is the closing tag for <h2>? (a) <h2/> (b) </h2> (c) <\h2> (d) <h2>
  4. 4.Which of these has a closing tag? (a) <b> (b) <img> (c) <input> (d) <meta>
  5. 5.💬 How many paragraphs show on the page?
    <p>My pets</p>
    <!-- <p>The red kite</p> -->
    <p>Hello, world!</p>
  6. 6.💬 Which text will NOT show on the page?
    <p>Fun facts</p>
    <p>My pets</p>
    <!-- <p>Our school trip</p> -->
    (a) Fun facts (b) Our school trip (c) My pets
  7. 7.🖼️ Which tag puts a picture on a page? (a) <pic> (b) <img> (c) <p> (d) <a>
  8. 8.📄 What is the first line of an HTML5 page? (a) <!DOCTYPE html> (b) <body> (c) <html> (d) <head>
  9. 9.🔤 In “HTML”, what do the letters HT stand for? (a) Home Text (b) High Tech (c) HyperText (d) Hot Tags
  10. 10.💬 Does the browser show comments on the page? (a) No (b) Yes
  11. 11.🔗 Which words do you click on?
    <a href="contact.html">Contact us</a>
    (a) Contact us (b) contact.html (c) href (d) Visit the site
  12. 12.True or false: <ul> goes in the head. (a) False (b) True
  13. 13.📄 Where does <table> go: in the head or in the body? (a) in the body (b) in the head
  14. 14.🔢 In a basic web page file, which comes FIRST? (a) <head> (b) <!DOCTYPE html> (c) </head> (d) <html>
  15. 15.🔍 Which is the odd one out? (a) turns HTML into a page (b) saves our .html files (c) colours code to help us (d) shows line numbers
  16. 16.Which of these goes in the body? (a) <title> (b) <meta charset="utf-8"> (c) <style> (d) <a>
  17. 17.Which of these goes in the head? (a) <title> (b) <ul> (c) <h1> (d) <p>
  18. 18.🔗 Where does this link open?
    <a href="art.html">Contact us</a>
    (a) in a new tab (b) in the same tab
  19. 19.🏷️ Is </b> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  20. 20.🔗 Which words do you click on?
    <a href="art.html">About us</a>
    (a) About us (b) Contact us (c) art.html (d) href
  21. 21.🔗 Which words do you click on?
    <a href="https://example.com">Contact us</a>
    (a) Visit the site (b) href (c) https://example.com (d) Contact us
  22. 22.🖼️ Which picture file does the browser load?
    <img src="kite.png" alt="A red kite" width="250">
    (a) A red kite (b) cake.jpg (c) kite.png (d) map.png
  23. 23.🏷️ Is <b> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  24. 24.Which of these is true of a web browser? (a) sends pages over the net (b) opens web pages for us (c) shows line numbers (d) answers page requests
  25. 25.🔠 Which heading shows the BIGGEST text: <h2>, <h5>, <h4> or <h3>? (a) <h4> (b) <h2> (c) <h3> (d) <h5>
  26. 26.🔠 Which tag is the least important heading? (a) <h1> (b) <h6> (c) <h3> (d) <p>
  27. 27.📝 What does <p> make? (a) a picture (b) a table (c) a paragraph (d) a link
  28. 28.Which of these goes in the head? (a) <a> (b) <meta charset="utf-8"> (c) <ul> (d) <h1>
  29. 29.🌐 Which one has an address bar? (a) a web server (b) a web browser (c) a code editor
  30. 30.True or false: in <img>, alt sets how tall it is. (a) False (b) True
  31. 31.🔗 Which code links to about.html? (a) <a src="about.html"> (b) <a href="about.html"> (c) <link about.html> (d) <a alt="about.html">
  32. 32.True or false: in <img>, src tells which image to load. (a) False (b) True
  33. 33.🖼️ Which picture file does the browser load?
    <img src="fort.jpg" alt="An old fort" width="350">
    (a) tiger.jpg (b) An old fort (c) fort.jpg (d) kite.png
  34. 34.🔗 Which attribute holds the address of a link? (a) alt (b) src (c) href (d) id
  35. 35.📄 Where does the text of <title> appear? (a) on the browser tab (b) in a big heading (c) at the bottom (d) nowhere
  36. 36.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Class 7 Blog</title>
    </head>
    <body>
      <h1>Planets</h1>
      <p>I like to read.</p>
    </body>
    </html>
    (a) index.html (b) Planets (c) I like to read. (d) Class 7 Blog
  37. 37.💬 How many paragraphs show on the page?
    <!-- <p>My pets</p> -->
    <!-- <p>Our school trip</p> -->
    <p>My best friend</p>
  38. 38.💬 Which text will NOT show on the page?
    <p>Cricket is fun.</p>
    <p>Fun facts</p>
    <p>Good morning!</p>
    <!-- <p>Our school trip</p> -->
    (a) Our school trip (b) Cricket is fun. (c) Good morning! (d) Fun facts
  39. 39.📝 On how many lines does the browser show this paragraph?
    <p>Rivers flow<br>Roses are red</p>
  40. 40.True or false: a web browser hosts websites online. (a) False (b) True

Answer key

  1. False
  2. stores a website’s files
  3. </h2>
  4. <b>
  5. 2
  6. Our school trip
  7. <img>
  8. <!DOCTYPE html>
  9. HyperText
  10. No
  11. Contact us
  12. False
  13. in the body
  14. <!DOCTYPE html>
  15. turns HTML into a page
  16. <a>
  17. <title>
  18. in the same tab
  19. a closing tag
  20. About us
  21. Contact us
  22. kite.png
  23. an opening tag
  24. opens web pages for us
  25. <h2>
  26. <h6>
  27. a paragraph
  28. <meta charset="utf-8">
  29. a web browser
  30. False
  31. <a href="about.html">
  32. True
  33. fort.jpg
  34. href
  35. on the browser tab
  36. Class 7 Blog
  37. 1
  38. Our school trip
  39. 2
  40. False

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