← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 691 · 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.Which of these is true of a web browser? (a) saves our .html files (b) hosts websites online (c) answers page requests (d) turns HTML into a page
  2. 2.📄 Can HTML on its own add up two numbers? (a) No (b) Yes
  3. 3.📝 On how many lines does the browser show this paragraph?
    <p>Birds sing<br>Rivers flow</p>
  4. 4.🔗 Which words do you click on?
    <a href="about.html">About us</a>
    (a) About us (b) about.html (c) Contact us (d) href
  5. 5.🔠 How many headings are in this code?
    <h1>I love mangoes.</h1>
    <h2>I love mangoes.</h2>
    <h4>My pets</h4>
    <h3>Good morning!</h3>
  6. 6.🖼️ Why do we add alt text to an image? (a) to describe the image (b) to colour it (c) to make it bigger (d) to load it faster
  7. 7.📋 Does this list show bullets or numbers?
    <ol>
      <li>Banana</li>
      <li>Grapes</li>
      <li>Litchi</li>
    </ol>
    (a) bullets (b) numbers
  8. 8.📄 Where does <meta charset="utf-8"> go: in the head or in the body? (a) in the head (b) in the body
  9. 9.📋 How many items does this list show?
    <ul>
      <li>Mango</li>
      <li>Grapes</li>
    </ul>
  10. 10.🔍 One closing tag is missing. Which one?
    <h1>My pets</h1>
    <h3>Hello, world!</h3>
    <h2>Our school trip
    (a) </h2> (b) </p> (c) </h1> (d) </h3>
  11. 11.🌐 Which one sends pages over the net? (a) a code editor (b) a web browser (c) a web server
  12. 12.🔠 How many headings are in this code?
    <h1>My best friend</h1>
    <p>Cricket is fun.</p>
    <h4>Good morning!</h4>
  13. 13.📝 Does <b> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  14. 14.💬 Does the browser show comments on the page? (a) Yes (b) No
  15. 15.💬 How many paragraphs show on the page?
    <p>Our school trip</p>
    <!-- <p>My best friend</p> -->
    <p>My pets</p>
  16. 16.🔍 One closing tag is missing. Which one?
    <h2>Hello, world!
    <small>The red kite</small>
    <p>I love mangoes.</p>
    (a) </small> (b) </p> (c) </h2> (d) </h1>
  17. 17.📝 What does <br> do? (a) makes a list (b) adds a picture (c) starts a new line (d) makes text bold
  18. 18.🔗 Which attribute holds the address of a link? (a) src (b) alt (c) id (d) href
  19. 19.💬 How many paragraphs show on the page?
    <!-- <p>Hello, world!</p> -->
    <!-- <p>Fun facts</p> -->
    <p>Cricket is fun.</p>
    <!-- <p>My pets</p> -->
    <!-- <p>Our school trip</p> -->
  20. 20.💬 How many paragraphs show on the page?
    <!-- <p>Hello, world!</p> -->
    <p>My pets</p>
    <p>Cricket is fun.</p>
    <p>Rain today</p>
  21. 21.🔍 Which is the odd one out? (a) turns HTML into a page (b) opens web pages for us (c) has an address bar (d) shows line numbers
  22. 22.📋 Which list tag shows bullet points? (a) <li> (b) <ol> (c) <ul>
  23. 23.🔠 How many headings are in this code?
    <h1>Cricket is fun.</h1>
    <h4>Rain today</h4>
    <h4>My pets</h4>
  24. 24.📝 How many paragraphs does this code make?
    <p>Fun facts</p>
    <p>My pets</p>
    <h2>Hello, world!</h2>
    <p>I love mangoes.</p>
    <p>Cricket is fun.</p>
  25. 25.🔠 Which heading shows the BIGGEST text: <h4>, <h1>, <h2> or <h6>? (a) <h2> (b) <h1> (c) <h6> (d) <h4>
  26. 26.🔗 Which words do you click on?
    <a href="quiz.html">Maths fun</a>
    (a) href (b) Maths fun (c) Art corner (d) quiz.html
  27. 27.💬 How many paragraphs show on the page?
    <!-- <p>Rain today</p> -->
    <p>Cricket is fun.</p>
    <p>My best friend</p>
    <!-- <p>The red kite</p> -->
    <p>I love mangoes.</p>
  28. 28.📄 Which part holds everything you see on the page? (a) the doctype (b) the body (c) the head (d) the title
  29. 29.📛 In <a href="x.html">, what is href? (a) a comment (b) an attribute (c) a closing tag (d) an element name
  30. 30.🖼️ Which attribute of <img> names the picture file? (a) alt (b) width (c) src (d) height
  31. 31.💬 Which text will NOT show on the page?
    <p>Hello, world!</p>
    <!-- <p>Cricket is fun.</p> -->
    <p>My best friend</p>
    <p>Fun facts</p>
    (a) Hello, world! (b) Cricket is fun. (c) Fun facts (d) My best friend
  32. 32.Which of these is true of a code editor? (a) hosts websites online (b) turns HTML into a page (c) shows line numbers (d) stores a website’s files
  33. 33.🔗 Which address opens when you click this link?
    <a href="contact.html">Play games</a>
    (a) contact.html (b) Play games (c) https://example.com (d) maths.html
  34. 34.🏷️ Which is the closing tag for <em>? (a) </em> (b) <\em> (c) <em/> (d) <em>
  35. 35.🖼️ Which picture file does the browser load?
    <img src="moon.png" alt="The full moon" width="250">
    (a) The full moon (b) bus.jpg (c) moon.png (d) fort.jpg
  36. 36.📋 How many items does this list show?
    <ol>
      <li>Grapes</li>
      <li>Jamun</li>
      <li>Banana</li>
      <li>Guava</li>
      <li>Litchi</li>
      <li>Papaya</li>
    </ol>
  37. 37.Which of these is true of a web server? (a) saves our .html files (b) has an address bar (c) opens web pages for us (d) stores a website’s files
  38. 38.📋 Does this list show bullets or numbers?
    <ol>
      <li>Guava</li>
      <li>Mango</li>
      <li>Papaya</li>
    </ol>
    (a) numbers (b) bullets
  39. 39.🔠 Which heading shows the SMALLEST text: <h5>, <h1>, <h6> or <h4>? (a) <h5> (b) <h1> (c) <h4> (d) <h6>
  40. 40.🔗 Which address opens when you click this link?
    <a href="https://example.com">Play games</a>
    (a) Play games (b) art.html (c) maths.html (d) https://example.com

Answer key

  1. turns HTML into a page
  2. No
  3. 2
  4. About us
  5. 4
  6. to describe the image
  7. numbers
  8. in the head
  9. 2
  10. </h2>
  11. a web server
  12. 2
  13. has a closing tag
  14. No
  15. 2
  16. </h2>
  17. starts a new line
  18. href
  19. 1
  20. 3
  21. shows line numbers
  22. <ul>
  23. 3
  24. 4
  25. <h1>
  26. Maths fun
  27. 3
  28. the body
  29. an attribute
  30. src
  31. Cricket is fun.
  32. shows line numbers
  33. contact.html
  34. </em>
  35. moon.png
  36. 6
  37. stores a website’s files
  38. numbers
  39. <h6>
  40. https://example.com

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