← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 229 · 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>, height describes the picture. (a) True (b) False
  2. 2.💬 Why do coders write comments? (a) to leave notes (b) to add colour (c) to show pictures (d) to make links
  3. 3.📄 Where does <table> go: in the head or in the body? (a) in the head (b) in the body
  4. 4.True or false: a web server colours code to help us. (a) True (b) False
  5. 5.True or false: <li> lists things in any order. (a) True (b) False
  6. 6.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
  7. 7.📝 How many paragraphs does this code make?
    <p>Fun facts</p>
    <p>Cricket is fun.</p>
    <p>I love mangoes.</p>
    <p>I love mangoes.</p>
    <p>Cricket is fun.</p>
    <p>The red kite</p>
  8. 8.🔗 Where does this link open?
    <a href="news.html">Maths fun</a>
    (a) in the same tab (b) in a new tab
  9. 9.🔍 One closing tag is missing. Which one?
    <u>Fun facts
    <h2>Good morning!</h2>
    <small>Cricket is fun.</small>
    (a) </small> (b) </u> (c) </p> (d) </h2>
  10. 10.🖼️ Which picture file does the browser load?
    <img src="bus.jpg" alt="Our school bus" width="100">
    (a) tiger.jpg (b) fort.jpg (c) bus.jpg (d) Our school bus
  11. 11.True or false: <ul> is an unordered list. (a) True (b) False
  12. 12.True or false: in <img>, alt names the picture file. (a) False (b) True
  13. 13.🔍 One closing tag is missing. Which one?
    <strong>Our school trip
    <h1>My pets</h1>
    <em>Rain today</em>
    (a) </b> (b) </em> (c) </strong> (d) </h1>
  14. 14.🔗 Which address opens when you click this link?
    <a href="art.html">Art corner</a>
    (a) Art corner (b) quiz.html (c) art.html (d) news.html
  15. 15.🔠 Which heading shows the SMALLEST text: <h2>, <h6>, <h4> or <h1>? (a) <h4> (b) <h6> (c) <h2> (d) <h1>
  16. 16.🌐 Which one turns HTML into a page? (a) a web browser (b) a web server (c) a code editor
  17. 17.📄 Can HTML on its own add up two numbers? (a) Yes (b) No
  18. 18.Which of these is an opening tag? (a) </title> (b) </li> (c) <b> (d) </b>
  19. 19.🖼️ Which picture file does the browser load?
    <img src="dog.jpg" alt="A happy dog" width="350">
    (a) dog.jpg (b) A happy dog (c) moon.png (d) bus.jpg
  20. 20.📝 Does <input> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  21. 21.🖼️ How many pixels wide is the picture drawn?
    <img src="dog.jpg" alt="A happy dog" width="350">
  22. 22.📝 Does <meta> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  23. 23.True or false: in <img>, height names the picture file. (a) False (b) True
  24. 24.📋 Which list tag is an unordered list? (a) <li> (b) <ul> (c) <ol>
  25. 25.🖼️ Which attribute of <img> tells which image to load? (a) width (b) height (c) alt (d) src
  26. 26.🔗 Where does this link open?
    <a href="maths.html" target="_blank">Contact us</a>
    (a) in a new tab (b) in the same tab
  27. 27.🔍 Which is the odd one out? (a) colours code to help us (b) hosts websites online (c) sends pages over the net (d) answers page requests
  28. 28.🔗 Which address opens when you click this link?
    <a href="contact.html">Art corner</a>
    (a) https://example.com (b) Art corner (c) contact.html (d) maths.html
  29. 29.📋 Does this list show bullets or numbers?
    <ol>
      <li>Papaya</li>
      <li>Banana</li>
      <li>Litchi</li>
    </ol>
    (a) bullets (b) numbers
  30. 30.🌐 Which one has an address bar? (a) a web browser (b) a code editor (c) a web server
  31. 31.🏷️ What does a closing tag have that an opening tag does not? (a) a dollar $ (b) a slash / (c) a dot . (d) a hash #
  32. 32.🌐 Which one stores a website’s files? (a) a code editor (b) a web browser (c) a web server
  33. 33.🔠 Which heading shows the SMALLEST text: <h5>, <h1>, <h2> or <h3>? (a) <h5> (b) <h1> (c) <h2> (d) <h3>
  34. 34.🔗 Which address opens when you click this link?
    <a href="maths.html">About us</a>
    (a) maths.html (b) art.html (c) news.html (d) About us
  35. 35.📄 Can HTML on its own make bullet lists? (a) Yes (b) No
  36. 36.🔍 One closing tag is missing. Which one?
    <u>My pets</u>
    <small>I love mangoes.
    <p>Good morning!</p>
    (a) </h2> (b) </p> (c) </small> (d) </u>
  37. 37.🖼️ Which tag puts a picture on a page? (a) <pic> (b) <a> (c) <img> (d) <p>
  38. 38.💬 Which text will NOT show on the page?
    <!-- <p>Hello, world!</p> -->
    <p>I love mangoes.</p>
    <p>Rain today</p>
    (a) Rain today (b) Hello, world! (c) I love mangoes.
  39. 39.🔠 Which heading shows the BIGGEST text: <h5>, <h1>, <h2> or <h3>? (a) <h5> (b) <h3> (c) <h1> (d) <h2>
  40. 40.🏷️ Which is the closing tag for <h1>? (a) <h1/> (b) <\h1> (c) <h1> (d) </h1>

Answer key

  1. False
  2. to leave notes
  3. in the body
  4. False
  5. False
  6. Yes
  7. 6
  8. in the same tab
  9. </u>
  10. bus.jpg
  11. True
  12. False
  13. </strong>
  14. art.html
  15. <h6>
  16. a web browser
  17. No
  18. <b>
  19. dog.jpg
  20. an empty tag
  21. 350
  22. an empty tag
  23. False
  24. <ul>
  25. src
  26. in a new tab
  27. colours code to help us
  28. contact.html
  29. numbers
  30. a web browser
  31. a slash /
  32. a web server
  33. <h5>
  34. maths.html
  35. Yes
  36. </small>
  37. <img>
  38. Hello, world!
  39. <h1>
  40. </h1>

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