← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 292 · 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.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the body (b) in the head
  2. 2.Which of these is an opening tag? (a) </b> (b) </li> (c) <body> (d) </p>
  3. 3.True or false: in <img>, alt describes the picture. (a) False (b) True
  4. 4.🔗 Which words do you click on?
    <a href="news.html">Play games</a>
    (a) news.html (b) About us (c) Play games (d) href
  5. 5.🔠 Which heading shows the BIGGEST text: <h6>, <h1>, <h2> or <h4>? (a) <h4> (b) <h6> (c) <h1> (d) <h2>
  6. 6.📄 Can HTML on its own make bullet lists? (a) Yes (b) No
  7. 7.💬 How many paragraphs show on the page?
    <p>Our school trip</p>
    <p>Fun facts</p>
    <p>Rain today</p>
    <!-- <p>Hello, world!</p> -->
    <p>Good morning!</p>
  8. 8.📋 Which list tag lists things in any order? (a) <li> (b) <ol> (c) <ul>
  9. 9.True or false: in <img>, src tells which image to load. (a) True (b) False
  10. 10.🔍 Which line is missing its closing tag?
    line 1: <h1>I love mangoes.</h1>
    line 2: <h3>Hello, world!</h3>
    line 3: <small>Fun facts
    (a) line 2 (b) line 3 (c) line 1
  11. 11.🔗 Which code links to about.html? (a) <a src="about.html"> (b) <a alt="about.html"> (c) <link about.html> (d) <a href="about.html">
  12. 12.Which of these is a closing tag? (a) <li> (b) <b> (c) </li> (d) <h1>
  13. 13.🔤 In “HTML”, what does the M stand for? (a) Markup (b) Mouse (c) Machine (d) Modern
  14. 14.🖼️ How many pixels wide is the picture drawn?
    <img src="map.png" alt="Map of India" width="50">
  15. 15.Which of these goes in the head? (a) <style> (b) <p> (c) <a> (d) <img>
  16. 16.🔠 Which heading shows the BIGGEST text: <h1>, <h2>, <h3> or <h4>? (a) <h4> (b) <h2> (c) <h1> (d) <h3>
  17. 17.🔗 Which attribute holds the address of a link? (a) alt (b) src (c) href (d) id
  18. 18.🖼️ Which picture file does the browser load?
    <img src="dog.jpg" alt="A happy dog" width="350">
    (a) bus.jpg (b) A happy dog (c) dog.jpg (d) moon.png
  19. 19.🔗 Where does this link open?
    <a href="news.html" target="_blank">Play games</a>
    (a) in a new tab (b) in the same tab
  20. 20.True or false: <ul> is an unordered list. (a) False (b) True
  21. 21.True or false: <ol> lists things in any order. (a) False (b) True
  22. 22.🖼️ Which attribute of <img> describes the picture? (a) width (b) alt (c) src (d) height
  23. 23.🔗 Which address opens when you click this link?
    <a href="maths.html">Maths fun</a>
    (a) Maths fun (b) news.html (c) maths.html (d) art.html
  24. 24.🌐 Which one has an address bar? (a) a code editor (b) a web server (c) a web browser
  25. 25.🔢 In a basic web page file, which comes first: “</head>” or “<!DOCTYPE html>”? (a) <!DOCTYPE html> (b) </head>
  26. 26.🏷️ Every HTML tag starts with which sign? (a) { (b) < (c) [ (d) (
  27. 27.🔍 Which line is missing its closing tag?
    line 1: <em>Hello, world!</em>
    line 2: <h2>My pets</h2>
    line 3: <b>Rain today
    (a) line 2 (b) line 1 (c) line 3
  28. 28.📛 In <a href="x.html">, what is href? (a) an attribute (b) a closing tag (c) an element name (d) a comment
  29. 29.🔠 Which heading shows the SMALLEST text: <h4>, <h1>, <h2> or <h3>? (a) <h4> (b) <h1> (c) <h2> (d) <h3>
  30. 30.📄 Can HTML on its own make headings? (a) No (b) Yes
  31. 31.🔠 Which heading shows the SMALLEST text: <h3>, <h2>, <h1> or <h4>? (a) <h3> (b) <h4> (c) <h2> (d) <h1>
  32. 32.🔢 In a basic web page file, which comes FIRST? (a) <body> (b) <html> (c) <!DOCTYPE html> (d) </body>
  33. 33.🔗 Where does this link open?
    <a href="about.html" target="_blank">Maths fun</a>
    (a) in the same tab (b) in a new tab
  34. 34.📝 What does <p> make? (a) a table (b) a paragraph (c) a link (d) a picture
  35. 35.🔗 Which address opens when you click this link?
    <a href="maths.html">School news</a>
    (a) art.html (b) School news (c) maths.html (d) news.html
  36. 36.🔗 Where does this link open?
    <a href="about.html" target="_blank">Art corner</a>
    (a) in the same tab (b) in a new tab
  37. 37.🏷️ Is <title> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  38. 38.True or false: <b> is an empty tag. (a) False (b) True
  39. 39.Which of these is true of a web browser? (a) turns HTML into a page (b) is where we type code (c) saves our .html files (d) colours code to help us
  40. 40.📝 Does <br> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag

Answer key

  1. in the head
  2. <body>
  3. True
  4. Play games
  5. <h1>
  6. Yes
  7. 4
  8. <ul>
  9. True
  10. line 3
  11. <a href="about.html">
  12. </li>
  13. Markup
  14. 50
  15. <style>
  16. <h1>
  17. href
  18. dog.jpg
  19. in a new tab
  20. True
  21. False
  22. alt
  23. maths.html
  24. a web browser
  25. <!DOCTYPE html>
  26. <
  27. line 3
  28. an attribute
  29. <h4>
  30. Yes
  31. <h4>
  32. <!DOCTYPE html>
  33. in a new tab
  34. a paragraph
  35. maths.html
  36. in a new tab
  37. an opening tag
  38. False
  39. turns HTML into a page
  40. an empty tag

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