← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 646 · 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="cake.jpg" alt="Birthday cake" width="100">
    (a) Birthday cake (b) A happy dog (c) width (d) cake.jpg
  2. 2.🔍 One closing tag is missing. Which one?
    <h2>Cricket is fun.
    <em>The red kite</em>
    <u>I love mangoes.</u>
    (a) </em> (b) </h2> (c) </u> (d) </i>
  3. 3.🔠 Which heading shows the SMALLEST text: <h1>, <h6>, <h2> or <h5>? (a) <h2> (b) <h5> (c) <h1> (d) <h6>
  4. 4.🖼️ Which tag puts a picture on a page? (a) <a> (b) <pic> (c) <p> (d) <img>
  5. 5.🔍 Which line is missing its closing tag?
    line 1: <b>My best friend</b>
    line 2: <small>The red kite</small>
    line 3: <h3>Good morning!
    (a) line 1 (b) line 3 (c) line 2
  6. 6.🔗 Which address opens when you click this link?
    <a href="art.html">Play games</a>
    (a) Play games (b) art.html (c) quiz.html (d) news.html
  7. 7.🖼️ Which picture file does the browser load?
    <img src="dog.jpg" alt="A happy dog" width="350">
    (a) bus.jpg (b) dog.jpg (c) moon.png (d) A happy dog
  8. 8.🖼️ Which attribute of <img> names the picture file? (a) width (b) height (c) alt (d) src
  9. 9.Which of these is an empty tag? (a) <ul> (b) <h1> (c) <p> (d) <hr>
  10. 10.🖼️ How many pixels wide is the picture drawn?
    <img src="fort.jpg" alt="An old fort" width="150">
  11. 11.🏷️ What does a closing tag have that an opening tag does not? (a) a dot . (b) a dollar $ (c) a hash # (d) a slash /
  12. 12.🔍 Which line is missing its closing tag?
    line 1: <h3>Hello, world!
    line 2: <b>The red kite</b>
    line 3: <h2>Good morning!</h2>
    (a) line 1 (b) line 2 (c) line 3
  13. 13.📝 How many paragraphs does this code make?
    <p>Good morning!</p>
    <h2>Rain today</h2>
    <p>Rain today</p>
    <p>Fun facts</p>
  14. 14.🏷️ Which is the closing tag for <h2>? (a) <\h2> (b) <h2> (c) </h2> (d) <h2/>
  15. 15.🔠 Which heading shows the SMALLEST text: <h6>, <h2>, <h4> or <h1>? (a) <h6> (b) <h2> (c) <h1> (d) <h4>
  16. 16.📋 Which list suits a shopping list in any order? (a) <ul> (b) <br> (c) <hr> (d) <ol>
  17. 17.🔠 Which heading shows the SMALLEST text: <h1>, <h3>, <h2> or <h4>? (a) <h4> (b) <h1> (c) <h2> (d) <h3>
  18. 18.🧩 An opening tag + content + a closing tag together make an ___. (a) attribute (b) editor (c) element (d) address
  19. 19.True or false: HTML on its own can pick a random number. (a) True (b) False
  20. 20.🔠 How many headings are in this code?
    <h1>I love mangoes.</h1>
    <p>Our school trip</p>
    <h3>The red kite</h3>
    <h4>My pets</h4>
  21. 21.Which of these has a closing tag? (a) <input> (b) <hr> (c) <title> (d) <br>
  22. 22.🔢 In a basic web page file, which comes first: “</head>” or “<!DOCTYPE html>”? (a) <!DOCTYPE html> (b) </head>
  23. 23.📋 Which list shows the steps of a recipe best? (a) <br> (b) <ol> (c) <ul> (d) <hr>
  24. 24.🔗 Which attribute holds the address of a link? (a) src (b) id (c) href (d) alt
  25. 25.True or false: <img> goes in the head. (a) False (b) True
  26. 26.🖼️ Which picture file does the browser load?
    <img src="bus.jpg" alt="Our school bus" width="250">
    (a) bus.jpg (b) fort.jpg (c) Our school bus (d) tiger.jpg
  27. 27.📝 How many paragraphs does this code make?
    <p>Hello, world!</p>
    <p>I love mangoes.</p>
    <p>My pets</p>
    <p>I love mangoes.</p>
    <p>Good morning!</p>
  28. 28.🔢 In a basic web page file, which comes first: “<html>” or “</head>”? (a) </head> (b) <html>
  29. 29.🏷️ Which is the closing tag for <p>? (a) </p> (b) <p> (c) <\p> (d) <p/>
  30. 30.📋 Which tag goes around each item of a list? (a) <ul> (b) <li> (c) <p> (d) <ol>
  31. 31.🔠 Which heading shows the SMALLEST text: <h3>, <h2>, <h5> or <h4>? (a) <h3> (b) <h4> (c) <h2> (d) <h5>
  32. 32.🔗 Which words do you click on?
    <a href="games.html">Take the quiz</a>
    (a) games.html (b) href (c) Take the quiz (d) Play games
  33. 33.True or false: a web server sends pages over the net. (a) True (b) False
  34. 34.Which of these has a closing tag? (a) <br> (b) <meta> (c) <h1> (d) <input>
  35. 35.📄 What is the first line of an HTML5 page? (a) <!DOCTYPE html> (b) <html> (c) <body> (d) <head>
  36. 36.🏷️ Which is the closing tag for <b>? (a) </b> (b) <\b> (c) <b> (d) <b/>
  37. 37.🔠 Which heading shows the BIGGEST text: <h6>, <h2>, <h1> or <h3>? (a) <h6> (b) <h3> (c) <h1> (d) <h2>
  38. 38.True or false: a code editor opens web pages for us. (a) False (b) True
  39. 39.📋 What number does the browser show next to “Papaya”?
    <ol>
      <li>Banana</li>
      <li>Jamun</li>
      <li>Papaya</li>
      <li>Grapes</li>
      <li>Orange</li>
      <li>Litchi</li>
    </ol>
  40. 40.📝 How many paragraphs does this code make?
    <p>Rain today</p>
    <p>My best friend</p>
    <p>Rain today</p>

Answer key

  1. Birthday cake
  2. </h2>
  3. <h6>
  4. <img>
  5. line 3
  6. art.html
  7. dog.jpg
  8. src
  9. <hr>
  10. 150
  11. a slash /
  12. line 1
  13. 3
  14. </h2>
  15. <h6>
  16. <ul>
  17. <h4>
  18. element
  19. False
  20. 3
  21. <title>
  22. <!DOCTYPE html>
  23. <ol>
  24. href
  25. False
  26. bus.jpg
  27. 5
  28. <html>
  29. </p>
  30. <li>
  31. <h5>
  32. Take the quiz
  33. True
  34. <h1>
  35. <!DOCTYPE html>
  36. </b>
  37. <h1>
  38. False
  39. 3
  40. 3

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