← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 785 · 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.🧱 HTML gives a web page its ___. (a) colours (b) sound (c) structure (d) speed
  2. 2.🖼️ Why do we add alt text to an image? (a) to describe the image (b) to make it bigger (c) to colour it (d) to load it faster
  3. 3.📋 Which list tag shows 1, 2, 3 numbers? (a) <li> (b) <ol> (c) <ul>
  4. 4.True or false: in <img>, src names the picture file. (a) False (b) True
  5. 5.🔍 Which line is missing its closing tag?
    line 1: <h2>Hello, world!</h2>
    line 2: <h1>The red kite
    line 3: <b>I love mangoes.</b>
    (a) line 2 (b) line 3 (c) line 1
  6. 6.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Art Gallery</title>
    </head>
    <body>
      <h1>All about me</h1>
      <p>I like to read.</p>
    </body>
    </html>
    (a) Art Gallery (b) I like to read. (c) All about me (d) body
  7. 7.🌐 Which one answers page requests? (a) a web server (b) a code editor (c) a web browser
  8. 8.🔠 Which heading shows the BIGGEST text: <h3>, <h6>, <h5> or <h4>? (a) <h6> (b) <h3> (c) <h4> (d) <h5>
  9. 9.📋 How many items does this list show?
    <ol>
      <li>Papaya</li>
      <li>Orange</li>
    </ol>
  10. 10.🔠 Which heading shows the SMALLEST text: <h4>, <h6>, <h1> or <h3>? (a) <h6> (b) <h3> (c) <h1> (d) <h4>
  11. 11.💬 Which text will NOT show on the page?
    <p>I love mangoes.</p>
    <!-- <p>Hello, world!</p> -->
    <p>My pets</p>
    (a) I love mangoes. (b) Hello, world! (c) My pets
  12. 12.📋 Which list tag shows bullet points? (a) <ol> (b) <li> (c) <ul>
  13. 13.💬 Which text will NOT show on the page?
    <!-- <p>My pets</p> -->
    <p>I love mangoes.</p>
    <p>Fun facts</p>
    <p>My best friend</p>
    (a) My best friend (b) I love mangoes. (c) Fun facts (d) My pets
  14. 14.Which of these is a closing tag? (a) <body> (b) <li> (c) <b> (d) </h1>
  15. 15.True or false: <ol> lists steps in order. (a) True (b) False
  16. 16.Which of these is true of a web browser? (a) colours code to help us (b) shows line numbers (c) hosts websites online (d) shows pages from the web
  17. 17.True or false: in <img>, height names the picture file. (a) True (b) False
  18. 18.🔗 Which address opens when you click this link?
    <a href="quiz.html">Art corner</a>
    (a) games.html (b) about.html (c) Art corner (d) quiz.html
  19. 19.🔢 In a basic web page file, which comes first: “</head>” or “<html>”? (a) </head> (b) <html>
  20. 20.True or false: a code editor colours code to help us. (a) False (b) True
  21. 21.🔠 Which heading shows the SMALLEST text: <h2>, <h4>, <h6> or <h3>? (a) <h2> (b) <h4> (c) <h3> (d) <h6>
  22. 22.🔠 How many <h1> headings should a page usually have? (a) 10 (b) 6 (c) 1 (d) 3
  23. 23.📝 Does <h1> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  24. 24.📛 In <a href="x.html">, what is href? (a) a comment (b) a closing tag (c) an element name (d) an attribute
  25. 25.True or false: <meta> has a closing tag. (a) True (b) False
  26. 26.🏷️ Is </p> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  27. 27.🔠 Which tag is used for the main title on a page? (a) <h1> (b) <br> (c) <p> (d) <h6>
  28. 28.🔗 Which words do you click on?
    <a href="about.html">About us</a>
    (a) About us (b) about.html (c) Contact us (d) href
  29. 29.🔠 How many headings are in this code?
    <h1>My best friend</h1>
    <h2>My pets</h2>
    <h4>Good morning!</h4>
    <p>The red kite</p>
  30. 30.🔗 Which words do you click on?
    <a href="maths.html">Take the quiz</a>
    (a) maths.html (b) Take the quiz (c) href (d) Play games
  31. 31.🖼️ How many pixels wide is the picture drawn?
    <img src="cake.jpg" alt="Birthday cake" width="300">
  32. 32.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Space Facts</title>
    </head>
    <body>
      <h1>All about me</h1>
      <p>Try this poha.</p>
    </body>
    </html>
    (a) Try this poha. (b) All about me (c) index.html (d) Space Facts
  33. 33.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
  34. 34.💬 How does an HTML comment end? (a) --> (b) >> (c) */ (d) //
  35. 35.🔍 One closing tag is missing. Which one?
    <i>My best friend</i>
    <strong>Our school trip</strong>
    <em>Hello, world!
    (a) </i> (b) </strong> (c) </small> (d) </em>
  36. 36.True or false: HTML on its own can add pictures to a page. (a) True (b) False
  37. 37.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="dog.jpg" alt="A happy dog" width="200">
    (a) The full moon (b) width (c) A happy dog (d) dog.jpg
  38. 38.🔍 Which line is missing its closing tag?
    line 1: <small>The red kite
    line 2: <strong>My pets</strong>
    line 3: <b>Good morning!</b>
    (a) line 3 (b) line 2 (c) line 1
  39. 39.🏷️ Is <li> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  40. 40.🖼️ Does <img> need a closing tag? (a) No (b) Yes

Answer key

  1. structure
  2. to describe the image
  3. <ol>
  4. True
  5. line 2
  6. All about me
  7. a web server
  8. <h3>
  9. 2
  10. <h6>
  11. Hello, world!
  12. <ul>
  13. My pets
  14. </h1>
  15. True
  16. shows pages from the web
  17. False
  18. quiz.html
  19. <html>
  20. True
  21. <h6>
  22. 1
  23. has a closing tag
  24. an attribute
  25. False
  26. a closing tag
  27. <h1>
  28. About us
  29. 3
  30. Take the quiz
  31. 300
  32. Space Facts
  33. Yes
  34. -->
  35. </em>
  36. True
  37. A happy dog
  38. line 1
  39. an opening tag
  40. No

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