← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 919 · 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.📝 Does <meta> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  2. 2.Which of these has a closing tag? (a) <h1> (b) <hr> (c) <meta> (d) <img>
  3. 3.💬 How many paragraphs show on the page?
    <p>Fun facts</p>
    <p>Rain today</p>
    <!-- <p>Good morning!</p> -->
  4. 4.🔗 Which words do you click on?
    <a href="news.html">About us</a>
    (a) news.html (b) Contact us (c) href (d) About us
  5. 5.🔗 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">
  6. 6.📝 On how many lines does the browser show this paragraph?
    <p>Sky is blue<br>Birds sing</p>
  7. 7.📝 On how many lines does the browser show this paragraph?
    <p>Rivers flow<br>Birds sing</p>
  8. 8.🔍 Which line is missing its closing tag?
    line 1: <u>Cricket is fun.</u>
    line 2: <i>I love mangoes.</i>
    line 3: <small>My pets
    (a) line 1 (b) line 3 (c) line 2
  9. 9.🖼️ Which picture file does the browser load?
    <img src="bus.jpg" alt="Our school bus" width="300">
    (a) tiger.jpg (b) Our school bus (c) fort.jpg (d) bus.jpg
  10. 10.🖼️ Which attribute of <img> is read by screen readers? (a) src (b) width (c) height (d) alt
  11. 11.🏷️ Every HTML tag starts with which sign? (a) [ (b) < (c) ( (d) {
  12. 12.True or false: <ol> is an unordered list. (a) False (b) True
  13. 13.💬 How does an HTML comment end? (a) // (b) */ (c) >> (d) -->
  14. 14.True or false: in <img>, src names the picture file. (a) True (b) False
  15. 15.🏷️ Is </title> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  16. 16.💬 Which text will NOT show on the page?
    <p>The red kite</p>
    <p>Cricket is fun.</p>
    <!-- <p>My pets</p> -->
    <p>Hello, world!</p>
    (a) The red kite (b) Cricket is fun. (c) Hello, world! (d) My pets
  17. 17.📋 How many items does this list show?
    <ol>
      <li>Banana</li>
      <li>Orange</li>
      <li>Guava</li>
    </ol>
  18. 18.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
  19. 19.🏷️ Which is the closing tag for <em>? (a) <\em> (b) <em> (c) </em> (d) <em/>
  20. 20.📋 How many items does this list show?
    <ol>
      <li>Litchi</li>
      <li>Guava</li>
      <li>Papaya</li>
      <li>Jamun</li>
      <li>Orange</li>
    </ol>
  21. 21.🏷️ Is </body> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  22. 22.🔗 Which address opens when you click this link?
    <a href="news.html">Visit the site</a>
    (a) Visit the site (b) news.html (c) games.html (d) quiz.html
  23. 23.Which of these is true of a web browser? (a) shows line numbers (b) answers page requests (c) opens web pages for us (d) saves our .html files
  24. 24.💬 How many paragraphs show on the page?
    <p>Cricket is fun.</p>
    <!-- <p>Rain today</p> -->
    <!-- <p>My best friend</p> -->
  25. 25.🔍 Which is the odd one out? (a) saves our .html files (b) colours code to help us (c) turns HTML into a page (d) is where we type code
  26. 26.💬 Why do coders write comments? (a) to add colour (b) to show pictures (c) to leave notes (d) to make links
  27. 27.🏷️ Is <h1> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  28. 28.🔍 Which line is missing its closing tag?
    line 1: <h1>The red kite
    line 2: <i>Fun facts</i>
    line 3: <small>Rain today</small>
    (a) line 2 (b) line 3 (c) line 1
  29. 29.🔠 How many headings are in this code?
    <h1>Our school trip</h1>
    <p>Our school trip</p>
    <p>My pets</p>
    <h2>I love mangoes.</h2>
  30. 30.📄 Can HTML on its own add pictures to a page? (a) Yes (b) No
  31. 31.True or false: a code editor answers page requests. (a) True (b) False
  32. 32.Which of these is a closing tag? (a) <title> (b) <b> (c) </li> (d) <p>
  33. 33.📄 Where does <ul> go: in the head or in the body? (a) in the head (b) in the body
  34. 34.🖼️ How many pixels wide is the picture drawn?
    <img src="cake.jpg" alt="Birthday cake" width="100">
  35. 35.🖼️ Which picture file does the browser load?
    <img src="dog.jpg" alt="A happy dog" width="300">
    (a) A happy dog (b) bus.jpg (c) moon.png (d) dog.jpg
  36. 36.🏷️ Is <title> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  37. 37.💬 How many paragraphs show on the page?
    <p>I love mangoes.</p>
    <!-- <p>Rain today</p> -->
    <!-- <p>Fun facts</p> -->
  38. 38.🖼️ Which picture file does the browser load?
    <img src="map.png" alt="Map of India" width="150">
    (a) map.png (b) Map of India (c) dog.jpg (d) cake.jpg
  39. 39.🔤 In “HTML”, what do the letters HT stand for? (a) HyperText (b) Hot Tags (c) Home Text (d) High Tech
  40. 40.🔗 Which words do you click on?
    <a href="contact.html">Take the quiz</a>
    (a) Take the quiz (b) contact.html (c) href (d) Play games

Answer key

  1. an empty tag
  2. <h1>
  3. 2
  4. About us
  5. <a href="about.html">
  6. 2
  7. 2
  8. line 3
  9. bus.jpg
  10. alt
  11. <
  12. False
  13. -->
  14. True
  15. a closing tag
  16. My pets
  17. 3
  18. Yes
  19. </em>
  20. 5
  21. a closing tag
  22. news.html
  23. opens web pages for us
  24. 1
  25. turns HTML into a page
  26. to leave notes
  27. an opening tag
  28. line 1
  29. 2
  30. Yes
  31. False
  32. </li>
  33. in the body
  34. 100
  35. dog.jpg
  36. an opening tag
  37. 1
  38. map.png
  39. HyperText
  40. Take the quiz

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