← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 91 · 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 is the odd one out? (a) stores a website’s files (b) saves our .html files (c) shows line numbers (d) is where we type code
  2. 2.💬 Which text will NOT show on the page?
    <p>Rain today</p>
    <p>Cricket is fun.</p>
    <p>My best friend</p>
    <!-- <p>Good morning!</p> -->
    (a) My best friend (b) Rain today (c) Good morning! (d) Cricket is fun.
  3. 3.🖼️ Why do we add alt text to an image? (a) to make it bigger (b) to describe the image (c) to load it faster (d) to colour it
  4. 4.True or false: <img> has a closing tag. (a) True (b) False
  5. 5.🔍 One closing tag is missing. Which one?
    <p>Cricket is fun.</p>
    <h3>Fun facts</h3>
    <u>My best friend
    (a) </u> (b) </h3> (c) </small> (d) </p>
  6. 6.📝 What does <br> do? (a) makes text bold (b) adds a picture (c) starts a new line (d) makes a list
  7. 7.🔗 Which words do you click on?
    <a href="art.html">About us</a>
    (a) href (b) Contact us (c) art.html (d) About us
  8. 8.True or false: HTML on its own cannot count button clicks. (a) False (b) True
  9. 9.📋 Which tag goes around each item of a list? (a) <p> (b) <ol> (c) <ul> (d) <li>
  10. 10.True or false: a code editor saves our .html files. (a) False (b) True
  11. 11.True or false: <li> shows 1, 2, 3 numbers. (a) False (b) True
  12. 12.Which of these is a closing tag? (a) <title> (b) <body> (c) </b> (d) <li>
  13. 13.🖼️ How many pixels wide is the picture drawn?
    <img src="cake.jpg" alt="Birthday cake" width="350">
  14. 14.Which of these is an empty tag? (a) <li> (b) <br> (c) <title> (d) <b>
  15. 15.🖼️ Which picture file does the browser load?
    <img src="map.png" alt="Map of India" width="400">
    (a) Map of India (b) cake.jpg (c) dog.jpg (d) map.png
  16. 16.True or false: a web server has an address bar. (a) False (b) True
  17. 17.🏷️ HTML marks up text using ___. (a) keys (b) pixels (c) wires (d) tags
  18. 18.Which of these is an opening tag? (a) </p> (b) </h1> (c) </title> (d) <h1>
  19. 19.True or false: <link rel="stylesheet"> goes in the body. (a) False (b) True
  20. 20.🏷️ Every HTML tag starts with which sign? (a) [ (b) { (c) ( (d) <
  21. 21.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Riya’s Recipes</title>
    </head>
    <body>
      <h1>Easy snacks</h1>
      <p>Thanks for visiting.</p>
    </body>
    </html>
    (a) Riya’s Recipes (b) Thanks for visiting. (c) Easy snacks (d) body
  22. 22.True or false: a web server shows line numbers. (a) False (b) True
  23. 23.📄 What is the first line of an HTML5 page? (a) <!DOCTYPE html> (b) <head> (c) <body> (d) <html>
  24. 24.True or false: in <img>, height sets how wide it is. (a) False (b) True
  25. 25.Which of these goes in the head? (a) <table> (b) <img> (c) <h1> (d) <link rel="stylesheet">
  26. 26.📋 Which list tag lists steps in order? (a) <li> (b) <ul> (c) <ol>
  27. 27.🔗 What does target="_blank" do to a link? (a) makes it bold (b) hides the link (c) makes it blank (d) opens it in a new tab
  28. 28.💬 Which text will NOT show on the page?
    <p>My pets</p>
    <p>Cricket is fun.</p>
    <!-- <p>Hello, world!</p> -->
    <p>Fun facts</p>
    (a) Fun facts (b) My pets (c) Cricket is fun. (d) Hello, world!
  29. 29.🔗 Which words do you click on?
    <a href="https://example.com">Maths fun</a>
    (a) href (b) Maths fun (c) Art corner (d) https://example.com
  30. 30.🧩 An opening tag + content + a closing tag together make an ___. (a) editor (b) attribute (c) address (d) element
  31. 31.🌐 Which one opens web pages for us? (a) a web server (b) a code editor (c) a web browser
  32. 32.🖼️ How many pixels wide is the picture drawn?
    <img src="kite.png" alt="A red kite" width="350">
  33. 33.Which of these goes in the head? (a) <meta charset="utf-8"> (b) <a> (c) <h1> (d) <table>
  34. 34.🔠 Which heading shows the SMALLEST text: <h6>, <h1>, <h4> or <h2>? (a) <h2> (b) <h6> (c) <h1> (d) <h4>
  35. 35.🔠 Which heading shows the BIGGEST text: <h5>, <h4>, <h1> or <h3>? (a) <h5> (b) <h1> (c) <h3> (d) <h4>
  36. 36.True or false: <ol> is an ordered list. (a) False (b) True
  37. 37.🔗 Where does this link open?
    <a href="about.html">Maths fun</a>
    (a) in the same tab (b) in a new tab
  38. 38.True or false: HTML on its own cannot add pictures to a page. (a) True (b) False
  39. 39.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
  40. 40.📄 Which part holds everything you see on the page? (a) the title (b) the doctype (c) the head (d) the body

Answer key

  1. stores a website’s files
  2. Good morning!
  3. to describe the image
  4. False
  5. </u>
  6. starts a new line
  7. About us
  8. True
  9. <li>
  10. True
  11. False
  12. </b>
  13. 350
  14. <br>
  15. map.png
  16. False
  17. tags
  18. <h1>
  19. False
  20. <
  21. Easy snacks
  22. False
  23. <!DOCTYPE html>
  24. False
  25. <link rel="stylesheet">
  26. <ol>
  27. opens it in a new tab
  28. Hello, world!
  29. Maths fun
  30. element
  31. a web browser
  32. 350
  33. <meta charset="utf-8">
  34. <h6>
  35. <h1>
  36. True
  37. in the same tab
  38. False
  39. Yes
  40. the body

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