← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 839 · 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: <meta> is an empty tag. (a) True (b) False
  2. 2.🔠 How many headings are in this code?
    <h1>Good morning!</h1>
    <p>My pets</p>
    <p>Fun facts</p>
    <p>Our school trip</p>
  3. 3.💬 How many paragraphs show on the page?
    <!-- <p>Rain today</p> -->
    <!-- <p>Hello, world!</p> -->
    <!-- <p>Fun facts</p> -->
    <p>My pets</p>
  4. 4.📝 On how many lines does the browser show this paragraph?
    <p>Stars shine<br>Birds sing<br>Sky is blue<br>Rivers flow</p>
  5. 5.True or false: <ul> shows bullet points. (a) False (b) True
  6. 6.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Class 7 Blog</title>
    </head>
    <body>
      <h1>Match report</h1>
      <p>I like to read.</p>
    </body>
    </html>
    (a) Class 7 Blog (b) index.html (c) I like to read. (d) Match report
  7. 7.🔗 What does target="_blank" do to a link? (a) hides the link (b) makes it bold (c) makes it blank (d) opens it in a new tab
  8. 8.🔤 In “HTML”, what does the M stand for? (a) Machine (b) Modern (c) Markup (d) Mouse
  9. 9.📄 Can HTML on its own show paragraphs? (a) No (b) Yes
  10. 10.True or false: a web browser opens web pages for us. (a) False (b) True
  11. 11.🔠 How many <h1> headings should a page usually have? (a) 10 (b) 6 (c) 1 (d) 3
  12. 12.Which of these is a closing tag? (a) <title> (b) <h1> (c) </p> (d) <li>
  13. 13.Which of these is true of a web browser? (a) is where we type code (b) answers page requests (c) turns HTML into a page (d) stores a website’s files
  14. 14.🖼️ How many pixels wide is the picture drawn?
    <img src="fort.jpg" alt="An old fort" width="350">
  15. 15.Which of these is an empty tag? (a) <li> (b) <b> (c) <br> (d) <p>
  16. 16.🖼️ Which attribute of <img> sets how tall it is? (a) src (b) width (c) height (d) alt
  17. 17.🔠 How many heading levels does HTML have? (a) 4 (b) 3 (c) 6 (d) 10
  18. 18.🔗 Which address opens when you click this link?
    <a href="games.html">Contact us</a>
    (a) contact.html (b) about.html (c) games.html (d) Contact us
  19. 19.🖼️ Does <img> need a closing tag? (a) Yes (b) No
  20. 20.📋 Which list tag shows bullet points? (a) <ol> (b) <ul> (c) <li>
  21. 21.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Cricket Club</title>
    </head>
    <body>
      <h1>Planets</h1>
      <p>Try this poha.</p>
    </body>
    </html>
    (a) Planets (b) index.html (c) Try this poha. (d) Cricket Club
  22. 22.🖼️ Which attribute of <img> names the picture file? (a) width (b) height (c) src (d) alt
  23. 23.🔗 Where does this link open?
    <a href="https://example.com">Art corner</a>
    (a) in a new tab (b) in the same tab
  24. 24.True or false: <ol> is an unordered list. (a) True (b) False
  25. 25.💬 Which text will NOT show on the page?
    <!-- <p>Fun facts</p> -->
    <p>I love mangoes.</p>
    <p>Hello, world!</p>
    <p>My pets</p>
    (a) My pets (b) I love mangoes. (c) Fun facts (d) Hello, world!
  26. 26.🔠 How many headings are in this code?
    <h1>The red kite</h1>
    <p>Rain today</p>
    <p>Fun facts</p>
    <h4>The red kite</h4>
    <p>My pets</p>
  27. 27.🔗 Which address opens when you click this link?
    <a href="contact.html">Contact us</a>
    (a) Contact us (b) contact.html (c) maths.html (d) https://example.com
  28. 28.📄 Where does <img> go: in the head or in the body? (a) in the body (b) in the head
  29. 29.True or false: a code editor colours code to help us. (a) True (b) False
  30. 30.💬 How many paragraphs show on the page?
    <p>Hello, world!</p>
    <!-- <p>The red kite</p> -->
    <!-- <p>Rain today</p> -->
  31. 31.📄 Can HTML on its own add pictures to a page? (a) No (b) Yes
  32. 32.💬 Why do coders write comments? (a) to add colour (b) to leave notes (c) to make links (d) to show pictures
  33. 33.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the head (b) in the body
  34. 34.📋 Which tag goes around each item of a list? (a) <ul> (b) <ol> (c) <li> (d) <p>
  35. 35.🏷️ Every HTML tag starts with which sign? (a) < (b) { (c) [ (d) (
  36. 36.💬 Which text will NOT show on the page?
    <p>Fun facts</p>
    <p>Hello, world!</p>
    <!-- <p>Cricket is fun.</p> -->
    (a) Cricket is fun. (b) Fun facts (c) Hello, world!
  37. 37.💬 How many paragraphs show on the page?
    <!-- <p>Cricket is fun.</p> -->
    <p>Fun facts</p>
    <p>Our school trip</p>
    <!-- <p>My pets</p> -->
    <!-- <p>Hello, world!</p> -->
  38. 38.True or false: <a> goes in the body. (a) True (b) False
  39. 39.🖼️ Which attribute of <img> shows if the image fails? (a) height (b) src (c) width (d) alt
  40. 40.Which of these is a closing tag? (a) <b> (b) <h1> (c) <title> (d) </b>

Answer key

  1. True
  2. 1
  3. 1
  4. 4
  5. True
  6. Class 7 Blog
  7. opens it in a new tab
  8. Markup
  9. Yes
  10. True
  11. 1
  12. </p>
  13. turns HTML into a page
  14. 350
  15. <br>
  16. height
  17. 6
  18. games.html
  19. No
  20. <ul>
  21. Cricket Club
  22. src
  23. in the same tab
  24. False
  25. Fun facts
  26. 2
  27. contact.html
  28. in the body
  29. True
  30. 1
  31. Yes
  32. to leave notes
  33. in the head
  34. <li>
  35. <
  36. Cricket is fun.
  37. 2
  38. True
  39. alt
  40. </b>

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