← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 893 · 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 heading shows the SMALLEST text: <h4>, <h1>, <h3> or <h6>? (a) <h3> (b) <h6> (c) <h1> (d) <h4>
  2. 2.📝 How many paragraphs does this code make?
    <p>My pets</p>
    <h2>Hello, world!</h2>
    <h2>Our school trip</h2>
    <p>Rain today</p>
  3. 3.📝 On how many lines does the browser show this paragraph?
    <p>Rivers flow<br>Birds sing</p>
  4. 4.🔗 Where does this link open?
    <a href="contact.html">Visit the site</a>
    (a) in a new tab (b) in the same tab
  5. 5.🔍 Which is the odd one out? (a) shows line numbers (b) colours code to help us (c) is where we type code (d) sends pages over the net
  6. 6.🔗 Which address opens when you click this link?
    <a href="contact.html">Take the quiz</a>
    (a) maths.html (b) contact.html (c) Take the quiz (d) https://example.com
  7. 7.📋 How many items does this list show?
    <ol>
      <li>Grapes</li>
      <li>Guava</li>
      <li>Orange</li>
      <li>Litchi</li>
      <li>Papaya</li>
      <li>Mango</li>
    </ol>
  8. 8.💬 Which text will NOT show on the page?
    <p>Fun facts</p>
    <p>My pets</p>
    <p>I love mangoes.</p>
    <!-- <p>Hello, world!</p> -->
    (a) My pets (b) Fun facts (c) I love mangoes. (d) Hello, world!
  9. 9.🏷️ HTML marks up text using ___. (a) wires (b) keys (c) tags (d) pixels
  10. 10.🔠 Which tag is used for the main title on a page? (a) <h1> (b) <h6> (c) <p> (d) <br>
  11. 11.💬 Which text will NOT show on the page?
    <!-- <p>Good morning!</p> -->
    <p>Our school trip</p>
    <p>I love mangoes.</p>
    <p>My pets</p>
    (a) My pets (b) I love mangoes. (c) Our school trip (d) Good morning!
  12. 12.True or false: <ul> is an unordered list. (a) False (b) True
  13. 13.🔗 Which address opens when you click this link?
    <a href="news.html">About us</a>
    (a) quiz.html (b) news.html (c) games.html (d) About us
  14. 14.True or false: <ol> is an ordered list. (a) False (b) True
  15. 15.🔗 What does target="_blank" do to a link? (a) makes it bold (b) hides the link (c) makes it blank (d) opens it in a new tab
  16. 16.🖼️ Which attribute of <img> is read by screen readers? (a) alt (b) src (c) width (d) height
  17. 17.🖼️ How many pixels wide is the picture drawn?
    <img src="moon.png" alt="The full moon" width="400">
  18. 18.📄 What is the first line of an HTML5 page? (a) <body> (b) <!DOCTYPE html> (c) <head> (d) <html>
  19. 19.🔗 Which code links to about.html? (a) <a alt="about.html"> (b) <a src="about.html"> (c) <link about.html> (d) <a href="about.html">
  20. 20.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as 5 spaces (b) as a dot (c) as a new line (d) as one space
  21. 21.🖼️ Which picture file does the browser load?
    <img src="kite.png" alt="A red kite" width="250">
    (a) A red kite (b) map.png (c) cake.jpg (d) kite.png
  22. 22.📄 Which part holds everything you see on the page? (a) the body (b) the title (c) the head (d) the doctype
  23. 23.🏷️ Is <h1> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  24. 24.Which of these is true of a web server? (a) saves our .html files (b) stores a website’s files (c) opens web pages for us (d) has an address bar
  25. 25.🏷️ Which is the closing tag for <strong>? (a) <strong/> (b) <strong> (c) </strong> (d) <\strong>
  26. 26.🔍 Which line is missing its closing tag?
    line 1: <h3>Hello, world!
    line 2: <b>My best friend</b>
    line 3: <strong>Cricket is fun.</strong>
    (a) line 2 (b) line 1 (c) line 3
  27. 27.🏷️ Is <body> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  28. 28.🔠 Which heading shows the SMALLEST text: <h2>, <h4>, <h3> or <h1>? (a) <h3> (b) <h1> (c) <h2> (d) <h4>
  29. 29.True or false: <style> goes in the head. (a) True (b) False
  30. 30.Which of these is a closing tag? (a) <title> (b) </p> (c) <b> (d) <li>
  31. 31.🏷️ Which is the closing tag for <h2>? (a) <h2/> (b) <h2> (c) <\h2> (d) </h2>
  32. 32.Which of these is an empty tag? (a) <ul> (b) <li> (c) <title> (d) <hr>
  33. 33.🔠 Which heading shows the BIGGEST text: <h3>, <h6>, <h2> or <h1>? (a) <h2> (b) <h1> (c) <h3> (d) <h6>
  34. 34.True or false: <img> goes in the body. (a) False (b) True
  35. 35.💬 Why do coders write comments? (a) to add colour (b) to make links (c) to leave notes (d) to show pictures
  36. 36.📋 How many items does this list show?
    <ul>
      <li>Jamun</li>
      <li>Mango</li>
      <li>Banana</li>
      <li>Papaya</li>
      <li>Orange</li>
    </ul>
  37. 37.🔗 What does HyperText mean? (a) secret text (b) very big text (c) text with links (d) text in colour
  38. 38.💬 Does the browser show comments on the page? (a) Yes (b) No
  39. 39.📋 Which tag goes around each item of a list? (a) <ol> (b) <p> (c) <li> (d) <ul>
  40. 40.True or false: <ul> shows bullet points. (a) False (b) True

Answer key

  1. <h6>
  2. 2
  3. 2
  4. in the same tab
  5. sends pages over the net
  6. contact.html
  7. 6
  8. Hello, world!
  9. tags
  10. <h1>
  11. Good morning!
  12. True
  13. news.html
  14. True
  15. opens it in a new tab
  16. alt
  17. 400
  18. <!DOCTYPE html>
  19. <a href="about.html">
  20. as one space
  21. kite.png
  22. the body
  23. an opening tag
  24. stores a website’s files
  25. </strong>
  26. line 1
  27. an opening tag
  28. <h4>
  29. True
  30. </p>
  31. </h2>
  32. <hr>
  33. <h1>
  34. True
  35. to leave notes
  36. 5
  37. text with links
  38. No
  39. <li>
  40. True

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