← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 804 · 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.🔗 Where does this link open?
    <a href="quiz.html">About us</a>
    (a) in a new tab (b) in the same tab
  2. 2.💬 Which text will NOT show on the page?
    <p>Fun facts</p>
    <!-- <p>My pets</p> -->
    <p>My best friend</p>
    <p>Good morning!</p>
    (a) Good morning! (b) My best friend (c) Fun facts (d) My pets
  3. 3.🔍 Which line is missing its closing tag?
    line 1: <strong>My pets
    line 2: <p>Hello, world!</p>
    line 3: <small>Cricket is fun.</small>
    (a) line 1 (b) line 2 (c) line 3
  4. 4.🔍 One closing tag is missing. Which one?
    <small>Fun facts</small>
    <h3>My best friend
    <u>The red kite</u>
    (a) </u> (b) </h3> (c) </small> (d) </em>
  5. 5.🔍 One closing tag is missing. Which one?
    <b>Our school trip</b>
    <em>Good morning!
    <strong>Rain today</strong>
    (a) </h2> (b) </em> (c) </b> (d) </strong>
  6. 6.True or false: a code editor shows pages from the web. (a) False (b) True
  7. 7.🔗 Where does this link open?
    <a href="https://example.com">School news</a>
    (a) in a new tab (b) in the same tab
  8. 8.True or false: in <img>, height names the picture file. (a) True (b) False
  9. 9.🔠 Which heading shows the BIGGEST text: <h5>, <h6>, <h2> or <h1>? (a) <h1> (b) <h2> (c) <h5> (d) <h6>
  10. 10.True or false: in <img>, alt names the picture file. (a) False (b) True
  11. 11.🔗 Which attribute holds the address of a link? (a) href (b) alt (c) src (d) id
  12. 12.🔗 Which words do you click on?
    <a href="news.html">Maths fun</a>
    (a) Art corner (b) news.html (c) href (d) Maths fun
  13. 13.📝 How many paragraphs does this code make?
    <p>Good morning!</p>
    <p>Rain today</p>
    <p>The red kite</p>
    <p>Good morning!</p>
    <h2>Our school trip</h2>
    <h2>Rain today</h2>
  14. 14.Which of these is true of a web browser? (a) saves our .html files (b) answers page requests (c) hosts websites online (d) turns HTML into a page
  15. 15.🔠 How many headings are in this code?
    <h1>The red kite</h1>
    <p>Fun facts</p>
    <h2>Our school trip</h2>
    <h2>Hello, world!</h2>
    <p>Cricket is fun.</p>
  16. 16.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="map.png" alt="Map of India" width="250">
    (a) Map of India (b) map.png (c) Birthday cake (d) width
  17. 17.📋 Which list tag shows 1, 2, 3 numbers? (a) <ol> (b) <li> (c) <ul>
  18. 18.True or false: <li> goes inside ul or ol. (a) False (b) True
  19. 19.🔗 Which words do you click on?
    <a href="about.html">Take the quiz</a>
    (a) Take the quiz (b) about.html (c) Play games (d) href
  20. 20.🔗 Which words do you click on?
    <a href="https://example.com">Art corner</a>
    (a) href (b) School news (c) Art corner (d) https://example.com
  21. 21.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="fort.jpg" alt="An old fort" width="250">
    (a) An old fort (b) width (c) fort.jpg (d) A tiger asleep
  22. 22.💬 How does an HTML comment end? (a) */ (b) >> (c) // (d) -->
  23. 23.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>My Hobbies</title>
    </head>
    <body>
      <h1>Planets</h1>
      <p>We won by 5 runs.</p>
    </body>
    </html>
    (a) We won by 5 runs. (b) Planets (c) index.html (d) My Hobbies
  24. 24.Which of these has a closing tag? (a) <br> (b) <input> (c) <meta> (d) <title>
  25. 25.🔠 Which heading shows the BIGGEST text: <h6>, <h3>, <h1> or <h2>? (a) <h6> (b) <h3> (c) <h2> (d) <h1>
  26. 26.🖼️ Which attribute of <img> is read by screen readers? (a) alt (b) width (c) src (d) height
  27. 27.🔠 Which tag is used for the main title on a page? (a) <p> (b) <h6> (c) <h1> (d) <br>
  28. 28.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Class 7 Blog</title>
    </head>
    <body>
      <h1>Planets</h1>
      <p>Mars is red.</p>
    </body>
    </html>
    (a) Mars is red. (b) Planets (c) Class 7 Blog (d) index.html
  29. 29.🔗 Where does this link open?
    <a href="contact.html" target="_blank">Visit the site</a>
    (a) in a new tab (b) in the same tab
  30. 30.🖼️ Which attribute of <img> sets how wide it is? (a) alt (b) src (c) height (d) width
  31. 31.💬 How many paragraphs show on the page?
    <!-- <p>Fun facts</p> -->
    <p>Cricket is fun.</p>
    <p>Rain today</p>
  32. 32.💬 How many paragraphs show on the page?
    <p>Hello, world!</p>
    <!-- <p>Our school trip</p> -->
    <p>Rain today</p>
  33. 33.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="kite.png" alt="A red kite" width="150">
    (a) kite.png (b) Map of India (c) width (d) A red kite
  34. 34.💬 How many paragraphs show on the page?
    <p>Cricket is fun.</p>
    <!-- <p>My best friend</p> -->
    <p>The red kite</p>
    <p>Fun facts</p>
  35. 35.🔍 Which is the odd one out? (a) turns HTML into a page (b) shows pages from the web (c) colours code to help us (d) has an address bar
  36. 36.🔗 Which tag makes a clickable link? (a) <img> (b) <link> (c) <p> (d) <a>
  37. 37.🏷️ Is <b> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  38. 38.💬 How does an HTML comment start? (a) # (b) <!-- (c) // (d) /*
  39. 39.True or false: <title> is an empty tag. (a) False (b) True
  40. 40.🔗 Which address opens when you click this link?
    <a href="https://example.com">About us</a>
    (a) maths.html (b) About us (c) https://example.com (d) art.html

Answer key

  1. in the same tab
  2. My pets
  3. line 1
  4. </h3>
  5. </em>
  6. False
  7. in the same tab
  8. False
  9. <h1>
  10. False
  11. href
  12. Maths fun
  13. 4
  14. turns HTML into a page
  15. 3
  16. Map of India
  17. <ol>
  18. True
  19. Take the quiz
  20. Art corner
  21. An old fort
  22. -->
  23. My Hobbies
  24. <title>
  25. <h1>
  26. alt
  27. <h1>
  28. Class 7 Blog
  29. in a new tab
  30. width
  31. 2
  32. 2
  33. A red kite
  34. 3
  35. colours code to help us
  36. <a>
  37. an opening tag
  38. <!--
  39. False
  40. https://example.com

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