← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 671 · 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 one is where we type code? (a) a web browser (b) a code editor (c) a web server
  2. 2.🔠 Which heading shows the SMALLEST text: <h4>, <h2>, <h1> or <h3>? (a) <h2> (b) <h1> (c) <h3> (d) <h4>
  3. 3.🔗 Which words do you click on?
    <a href="quiz.html">Take the quiz</a>
    (a) quiz.html (b) Play games (c) Take the quiz (d) href
  4. 4.🔠 How many headings are in this code?
    <h1>My best friend</h1>
    <h4>Hello, world!</h4>
    <h3>Cricket is fun.</h3>
    <h4>Good morning!</h4>
    <p>Our school trip</p>
  5. 5.📋 Does this list show bullets or numbers?
    <ul>
      <li>Grapes</li>
      <li>Mango</li>
    </ul>
    (a) numbers (b) bullets
  6. 6.📝 How many paragraphs does this code make?
    <p>Rain today</p>
    <h2>The red kite</h2>
    <h2>I love mangoes.</h2>
    <h2>My pets</h2>
    <p>My best friend</p>
  7. 7.True or false: a web server hosts websites online. (a) True (b) False
  8. 8.🖼️ How many pixels wide is the picture drawn?
    <img src="dog.jpg" alt="A happy dog" width="200">
  9. 9.🔠 Are headings shown in bold by default? (a) Yes (b) No
  10. 10.True or false: <h1> is an empty tag. (a) False (b) True
  11. 11.Which of these goes in the body? (a) <title> (b) <link rel="stylesheet"> (c) <style> (d) <img>
  12. 12.💬 Does the browser show comments on the page? (a) Yes (b) No
  13. 13.📋 How many items does this list show?
    <ul>
      <li>Banana</li>
      <li>Grapes</li>
      <li>Papaya</li>
    </ul>
  14. 14.🔗 Where does this link open?
    <a href="quiz.html">School news</a>
    (a) in the same tab (b) in a new tab
  15. 15.🔍 Which line is missing its closing tag?
    line 1: <strong>The red kite</strong>
    line 2: <u>Good morning!
    line 3: <small>Fun facts</small>
    (a) line 2 (b) line 3 (c) line 1
  16. 16.Which of these is an opening tag? (a) </b> (b) </body> (c) </p> (d) <h1>
  17. 17.🖼️ Which tag puts a picture on a page? (a) <pic> (b) <img> (c) <p> (d) <a>
  18. 18.🔢 In a basic web page file, which comes first: “<body>” or “<head>”? (a) <head> (b) <body>
  19. 19.🔗 Which words do you click on?
    <a href="https://example.com">Play games</a>
    (a) Play games (b) https://example.com (c) href (d) About us
  20. 20.True or false: <ol> is one item of a list. (a) False (b) True
  21. 21.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="cake.jpg" alt="Birthday cake" width="250">
    (a) Birthday cake (b) A happy dog (c) width (d) cake.jpg
  22. 22.🔗 Where does this link open?
    <a href="maths.html">Art corner</a>
    (a) in the same tab (b) in a new tab
  23. 23.Which of these goes in the head? (a) <title> (b) <h1> (c) <table> (d) <ul>
  24. 24.🖼️ How many pixels wide is the picture drawn?
    <img src="cake.jpg" alt="Birthday cake" width="350">
  25. 25.💬 Why do coders write comments? (a) to leave notes (b) to make links (c) to add colour (d) to show pictures
  26. 26.🏷️ Is </li> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  27. 27.🔍 One closing tag is missing. Which one?
    <i>The red kite
    <em>My pets</em>
    <b>Rain today</b>
    (a) </i> (b) </h3> (c) </em> (d) </b>
  28. 28.🔠 Which heading shows the SMALLEST text: <h6>, <h1>, <h2> or <h5>? (a) <h2> (b) <h1> (c) <h5> (d) <h6>
  29. 29.True or false: a web browser has an address bar. (a) False (b) True
  30. 30.💬 How does an HTML comment start? (a) # (b) // (c) /* (d) <!--
  31. 31.💬 How does an HTML comment end? (a) // (b) */ (c) --> (d) >>
  32. 32.💬 Which text will NOT show on the page?
    <!-- <p>Our school trip</p> -->
    <p>Rain today</p>
    <p>Fun facts</p>
    <p>Good morning!</p>
    (a) Good morning! (b) Rain today (c) Our school trip (d) Fun facts
  33. 33.📋 Which list shows the steps of a recipe best? (a) <hr> (b) <ul> (c) <br> (d) <ol>
  34. 34.🔍 Which is the odd one out? (a) colours code to help us (b) shows line numbers (c) turns HTML into a page (d) saves our .html files
  35. 35.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
  36. 36.🔤 In “HTML”, what does the L stand for? (a) Language (b) Line (c) Link (d) Laptop
  37. 37.🏷️ Which is the closing tag for <b>? (a) <b> (b) <b/> (c) <\b> (d) </b>
  38. 38.True or false: a web browser colours code to help us. (a) True (b) False
  39. 39.🔠 How many <h1> headings should a page usually have? (a) 3 (b) 6 (c) 1 (d) 10
  40. 40.📄 Which part holds everything you see on the page? (a) the body (b) the head (c) the title (d) the doctype

Answer key

  1. a code editor
  2. <h4>
  3. Take the quiz
  4. 4
  5. bullets
  6. 2
  7. True
  8. 200
  9. Yes
  10. False
  11. <img>
  12. No
  13. 3
  14. in the same tab
  15. line 2
  16. <h1>
  17. <img>
  18. <head>
  19. Play games
  20. False
  21. Birthday cake
  22. in the same tab
  23. <title>
  24. 350
  25. to leave notes
  26. a closing tag
  27. </i>
  28. <h6>
  29. True
  30. <!--
  31. -->
  32. Our school trip
  33. <ol>
  34. turns HTML into a page
  35. Yes
  36. Language
  37. </b>
  38. False
  39. 1
  40. the body

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