← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 589 · 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.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="moon.png" alt="The full moon" width="100">
    (a) moon.png (b) Our school bus (c) width (d) The full moon
  2. 2.🔠 How many heading levels does HTML have? (a) 3 (b) 10 (c) 6 (d) 4
  3. 3.📋 Which tag goes around each item of a list? (a) <ol> (b) <ul> (c) <li> (d) <p>
  4. 4.🔠 How many headings are in this code?
    <h1>Cricket is fun.</h1>
    <p>Rain today</p>
    <p>My pets</p>
    <p>The red kite</p>
    <p>Cricket is fun.</p>
  5. 5.🔤 In “HTML”, what does the L stand for? (a) Line (b) Laptop (c) Language (d) Link
  6. 6.🖼️ How many pixels wide is the picture drawn?
    <img src="tiger.jpg" alt="A tiger asleep" width="100">
  7. 7.🧩 An opening tag + content + a closing tag together make an ___. (a) editor (b) address (c) element (d) attribute
  8. 8.🔍 One closing tag is missing. Which one?
    <h2>My pets</h2>
    <h3>Our school trip
    <b>The red kite</b>
    (a) </h3> (b) </b> (c) </strong> (d) </h2>
  9. 9.🖼️ Which attribute of <img> sets how wide it is? (a) alt (b) width (c) height (d) src
  10. 10.📝 How many paragraphs does this code make?
    <p>Good morning!</p>
    <h2>Cricket is fun.</h2>
    <p>My pets</p>
    <p>Fun facts</p>
  11. 11.📝 Does <input> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  12. 12.🔗 Where does this link open?
    <a href="contact.html" target="_blank">Take the quiz</a>
    (a) in a new tab (b) in the same tab
  13. 13.📋 Which list tag lists things in any order? (a) <ul> (b) <li> (c) <ol>
  14. 14.📄 Can HTML on its own make headings? (a) No (b) Yes
  15. 15.📝 Does <title> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  16. 16.🔠 Which heading shows the BIGGEST text: <h2>, <h5>, <h3> or <h1>? (a) <h5> (b) <h2> (c) <h3> (d) <h1>
  17. 17.📋 Which list shows the steps of a recipe best? (a) <ul> (b) <hr> (c) <ol> (d) <br>
  18. 18.🖼️ How many pixels wide is the picture drawn?
    <img src="tiger.jpg" alt="A tiger asleep" width="400">
  19. 19.🔗 Which address opens when you click this link?
    <a href="games.html">Play games</a>
    (a) Play games (b) about.html (c) contact.html (d) games.html
  20. 20.🔠 Which heading shows the SMALLEST text: <h4>, <h3>, <h1> or <h2>? (a) <h4> (b) <h3> (c) <h1> (d) <h2>
  21. 21.Which of these is true of a code editor? (a) colours code to help us (b) has an address bar (c) sends pages over the net (d) answers page requests
  22. 22.🔍 Which line is missing its closing tag?
    line 1: <h3>Fun facts</h3>
    line 2: <em>Good morning!</em>
    line 3: <small>My best friend
    (a) line 2 (b) line 3 (c) line 1
  23. 23.🔗 Which code links to about.html? (a) <a alt="about.html"> (b) <link about.html> (c) <a href="about.html"> (d) <a src="about.html">
  24. 24.🖼️ Which tag puts a picture on a page? (a) <p> (b) <pic> (c) <img> (d) <a>
  25. 25.Which of these is an opening tag? (a) <h1> (b) </p> (c) </body> (d) </title>
  26. 26.True or false: <a> goes in the body. (a) True (b) False
  27. 27.💬 Why do coders write comments? (a) to show pictures (b) to leave notes (c) to make links (d) to add colour
  28. 28.True or false: <link rel="stylesheet"> goes in the body. (a) True (b) False
  29. 29.💬 How many paragraphs show on the page?
    <!-- <p>I love mangoes.</p> -->
    <p>Fun facts</p>
    <p>My pets</p>
    <!-- <p>My best friend</p> -->
  30. 30.Which of these has a closing tag? (a) <img> (b) <meta> (c) <p> (d) <br>
  31. 31.🔗 Which words do you click on?
    <a href="news.html">Maths fun</a>
    (a) Maths fun (b) href (c) Art corner (d) news.html
  32. 32.True or false: <li> lists things in any order. (a) True (b) False
  33. 33.Which of these is a closing tag? (a) </h1> (b) <li> (c) <h1> (d) <title>
  34. 34.📄 Where does <title> go: in the head or in the body? (a) in the head (b) in the body
  35. 35.💬 How does an HTML comment end? (a) */ (b) // (c) >> (d) -->
  36. 36.🌐 Which one stores a website’s files? (a) a web browser (b) a web server (c) a code editor
  37. 37.📋 Does this list show bullets or numbers?
    <ol>
      <li>Banana</li>
      <li>Jamun</li>
      <li>Guava</li>
    </ol>
    (a) bullets (b) numbers
  38. 38.🔍 Which line is missing its closing tag?
    line 1: <h2>Rain today
    line 2: <u>Cricket is fun.</u>
    line 3: <em>Hello, world!</em>
    (a) line 1 (b) line 3 (c) line 2
  39. 39.🔠 Which heading shows the BIGGEST text: <h5>, <h3>, <h2> or <h4>? (a) <h3> (b) <h5> (c) <h4> (d) <h2>
  40. 40.💬 Which text will NOT show on the page?
    <!-- <p>My pets</p> -->
    <p>Fun facts</p>
    <p>Good morning!</p>
    (a) Fun facts (b) Good morning! (c) My pets

Answer key

  1. The full moon
  2. 6
  3. <li>
  4. 1
  5. Language
  6. 100
  7. element
  8. </h3>
  9. width
  10. 3
  11. an empty tag
  12. in a new tab
  13. <ul>
  14. Yes
  15. has a closing tag
  16. <h1>
  17. <ol>
  18. 400
  19. games.html
  20. <h4>
  21. colours code to help us
  22. line 3
  23. <a href="about.html">
  24. <img>
  25. <h1>
  26. True
  27. to leave notes
  28. False
  29. 2
  30. <p>
  31. Maths fun
  32. False
  33. </h1>
  34. in the head
  35. -->
  36. a web server
  37. numbers
  38. line 1
  39. <h2>
  40. My pets

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