← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 2 · 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 names the picture file. (a) True (b) False
  2. 2.🖼️ Which tag puts a picture on a page? (a) <pic> (b) <a> (c) <p> (d) <img>
  3. 3.📝 How many paragraphs does this code make?
    <p>My best friend</p>
    <p>Rain today</p>
    <p>The red kite</p>
    <p>My pets</p>
    <h2>Hello, world!</h2>
  4. 4.🔠 Which heading shows the SMALLEST text: <h6>, <h3>, <h5> or <h1>? (a) <h5> (b) <h1> (c) <h6> (d) <h3>
  5. 5.💬 Which text will NOT show on the page?
    <p>My best friend</p>
    <p>Our school trip</p>
    <p>Hello, world!</p>
    <!-- <p>Fun facts</p> -->
    (a) Fun facts (b) Our school trip (c) Hello, world! (d) My best friend
  6. 6.📄 Where does <ul> go: in the head or in the body? (a) in the head (b) in the body
  7. 7.🔗 Which code links to about.html? (a) <link about.html> (b) <a alt="about.html"> (c) <a src="about.html"> (d) <a href="about.html">
  8. 8.🔍 One closing tag is missing. Which one?
    <h2>Hello, world!</h2>
    <i>Good morning!</i>
    <em>My best friend
    (a) </h2> (b) </h1> (c) </i> (d) </em>
  9. 9.📄 Which part holds everything you see on the page? (a) the head (b) the title (c) the doctype (d) the body
  10. 10.📋 What number does the browser show next to “Orange”?
    <ol start="9">
      <li>Banana</li>
      <li>Guava</li>
      <li>Mango</li>
      <li>Papaya</li>
      <li>Orange</li>
    </ol>
  11. 11.🔠 Which heading shows the SMALLEST text: <h6>, <h4>, <h1> or <h5>? (a) <h6> (b) <h4> (c) <h1> (d) <h5>
  12. 12.📄 Where does <style> go: in the head or in the body? (a) in the head (b) in the body
  13. 13.🔢 In a basic web page file, which comes FIRST? (a) <body> (b) <head> (c) <html> (d) <!DOCTYPE html>
  14. 14.True or false: in <img>, width sets how wide it is. (a) True (b) False
  15. 15.🏷️ Is </body> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  16. 16.📋 Does this list show bullets or numbers?
    <ol>
      <li>Orange</li>
      <li>Papaya</li>
      <li>Banana</li>
    </ol>
    (a) bullets (b) numbers
  17. 17.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="cake.jpg" alt="Birthday cake" width="100">
    (a) A happy dog (b) width (c) cake.jpg (d) Birthday cake
  18. 18.🔠 How many <h1> headings should a page usually have? (a) 3 (b) 6 (c) 10 (d) 1
  19. 19.🔗 Which tag makes a clickable link? (a) <img> (b) <p> (c) <link> (d) <a>
  20. 20.💬 Which text will NOT show on the page?
    <p>Fun facts</p>
    <p>Hello, world!</p>
    <p>My best friend</p>
    <!-- <p>Good morning!</p> -->
    (a) Fun facts (b) Good morning! (c) Hello, world! (d) My best friend
  21. 21.📝 How many paragraphs does this code make?
    <p>Hello, world!</p>
    <h2>My best friend</h2>
    <p>Good morning!</p>
    <p>Fun facts</p>
    <p>My best friend</p>
    <p>Hello, world!</p>
  22. 22.Which of these is a closing tag? (a) </b> (b) <p> (c) <body> (d) <b>
  23. 23.📋 Which list tag is an ordered list? (a) <ul> (b) <li> (c) <ol>
  24. 24.🔠 How many headings are in this code?
    <h1>Fun facts</h1>
    <p>Fun facts</p>
    <p>Rain today</p>
    <h4>My best friend</h4>
    <h3>Our school trip</h3>
  25. 25.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="moon.png" alt="The full moon" width="50">
    (a) moon.png (b) width (c) Our school bus (d) The full moon
  26. 26.🔗 Which address opens when you click this link?
    <a href="maths.html">Take the quiz</a>
    (a) Take the quiz (b) art.html (c) maths.html (d) news.html
  27. 27.📋 Which list shows the steps of a recipe best? (a) <ul> (b) <ol> (c) <br> (d) <hr>
  28. 28.💬 Does the browser show comments on the page? (a) No (b) Yes
  29. 29.🔠 How many headings are in this code?
    <h1>Fun facts</h1>
    <p>Hello, world!</p>
    <p>Fun facts</p>
    <p>Hello, world!</p>
  30. 30.🔠 How many headings are in this code?
    <h1>Cricket is fun.</h1>
    <p>I love mangoes.</p>
    <h2>Rain today</h2>
    <h3>Rain today</h3>
  31. 31.🏷️ What does a closing tag have that an opening tag does not? (a) a hash # (b) a slash / (c) a dollar $ (d) a dot .
  32. 32.📝 How many paragraphs does this code make?
    <p>I love mangoes.</p>
    <p>Cricket is fun.</p>
    <h2>I love mangoes.</h2>
    <p>Cricket is fun.</p>
    <p>My best friend</p>
  33. 33.🔠 Which heading shows the BIGGEST text: <h4>, <h3>, <h2> or <h1>? (a) <h1> (b) <h3> (c) <h2> (d) <h4>
  34. 34.📝 Does <br> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  35. 35.🔠 Which heading shows the BIGGEST text: <h4>, <h2>, <h1> or <h3>? (a) <h4> (b) <h1> (c) <h2> (d) <h3>
  36. 36.True or false: a code editor saves our .html files. (a) False (b) True
  37. 37.💬 Which text will NOT show on the page?
    <!-- <p>My pets</p> -->
    <p>Good morning!</p>
    <p>Cricket is fun.</p>
    (a) My pets (b) Good morning! (c) Cricket is fun.
  38. 38.🧩 An opening tag + content + a closing tag together make an ___. (a) element (b) address (c) attribute (d) editor
  39. 39.🔗 What does target="_blank" do to a link? (a) hides the link (b) makes it blank (c) makes it bold (d) opens it in a new tab
  40. 40.True or false: <a> goes in the body. (a) False (b) True

Answer key

  1. False
  2. <img>
  3. 4
  4. <h6>
  5. Fun facts
  6. in the body
  7. <a href="about.html">
  8. </em>
  9. the body
  10. 13
  11. <h6>
  12. in the head
  13. <!DOCTYPE html>
  14. True
  15. a closing tag
  16. numbers
  17. Birthday cake
  18. 1
  19. <a>
  20. Good morning!
  21. 5
  22. </b>
  23. <ol>
  24. 3
  25. The full moon
  26. maths.html
  27. <ol>
  28. No
  29. 1
  30. 3
  31. a slash /
  32. 4
  33. <h1>
  34. an empty tag
  35. <h1>
  36. True
  37. My pets
  38. element
  39. opens it in a new tab
  40. True

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