← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 559 · 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 address opens when you click this link?
    <a href="art.html">Take the quiz</a>
    (a) news.html (b) quiz.html (c) Take the quiz (d) art.html
  2. 2.🔍 Which is the odd one out? (a) shows pages from the web (b) stores a website’s files (c) opens web pages for us (d) turns HTML into a page
  3. 3.🔗 Where does this link open?
    <a href="games.html" target="_blank">Visit the site</a>
    (a) in a new tab (b) in the same tab
  4. 4.💬 How does an HTML comment start? (a) // (b) # (c) /* (d) <!--
  5. 5.🔠 How many heading levels does HTML have? (a) 4 (b) 10 (c) 6 (d) 3
  6. 6.🔠 Which heading shows the BIGGEST text: <h4>, <h2>, <h3> or <h1>? (a) <h2> (b) <h3> (c) <h1> (d) <h4>
  7. 7.📝 On how many lines does the browser show this paragraph?
    <p>Sky is blue<br>Kites fly high</p>
  8. 8.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Art Gallery</title>
    </head>
    <body>
      <h1>All about me</h1>
      <p>I like to read.</p>
    </body>
    </html>
    (a) All about me (b) index.html (c) Art Gallery (d) I like to read.
  9. 9.🖼️ Which tag puts a picture on a page? (a) <p> (b) <a> (c) <img> (d) <pic>
  10. 10.📝 On how many lines does the browser show this paragraph?
    <p>Sky is blue<br>Stars shine<br>Birds sing<br>Rivers flow<br>Kites fly high</p>
  11. 11.True or false: HTML on its own cannot make bullet lists. (a) False (b) True
  12. 12.🏷️ Which is the closing tag for <small>? (a) </small> (b) <small> (c) <small/> (d) <\small>
  13. 13.🔤 In “HTML”, what does the M stand for? (a) Machine (b) Mouse (c) Modern (d) Markup
  14. 14.📋 Which list tag is one item of a list? (a) <ol> (b) <li> (c) <ul>
  15. 15.🖼️ Which picture file does the browser load?
    <img src="tiger.jpg" alt="A tiger asleep" width="300">
    (a) map.png (b) kite.png (c) tiger.jpg (d) A tiger asleep
  16. 16.🔠 How many headings are in this code?
    <h1>Fun facts</h1>
    <p>I love mangoes.</p>
    <h4>Cricket is fun.</h4>
  17. 17.🔠 How many headings are in this code?
    <h1>My pets</h1>
    <p>Our school trip</p>
    <h2>Fun facts</h2>
    <p>Cricket is fun.</p>
    <h2>Good morning!</h2>
  18. 18.🔍 Which line is missing its closing tag?
    line 1: <h2>Our school trip</h2>
    line 2: <small>Good morning!</small>
    line 3: <h1>Cricket is fun.
    (a) line 2 (b) line 3 (c) line 1
  19. 19.🖼️ Which attribute of <img> shows if the image fails? (a) src (b) width (c) alt (d) height
  20. 20.🔢 In a basic web page file, which comes FIRST? (a) <body> (b) <html> (c) <!DOCTYPE html> (d) <head>
  21. 21.💬 How many paragraphs show on the page?
    <!-- <p>My best friend</p> -->
    <!-- <p>The red kite</p> -->
    <p>Cricket is fun.</p>
    <!-- <p>Our school trip</p> -->
  22. 22.📋 Does this list show bullets or numbers?
    <ol>
      <li>Papaya</li>
      <li>Litchi</li>
      <li>Jamun</li>
    </ol>
    (a) numbers (b) bullets
  23. 23.True or false: <h1> is an empty tag. (a) False (b) True
  24. 24.True or false: <a> goes in the head. (a) True (b) False
  25. 25.🔠 How many headings are in this code?
    <h1>The red kite</h1>
    <h3>The red kite</h3>
    <h3>Cricket is fun.</h3>
    <p>Fun facts</p>
  26. 26.🖼️ Which attribute of <img> names the picture file? (a) height (b) width (c) alt (d) src
  27. 27.🔍 Which line is missing its closing tag?
    line 1: <strong>Hello, world!</strong>
    line 2: <b>My pets</b>
    line 3: <em>Good morning!
    (a) line 2 (b) line 1 (c) line 3
  28. 28.True or false: in <img>, width describes the picture. (a) True (b) False
  29. 29.🔗 Which tag makes a clickable link? (a) <link> (b) <p> (c) <img> (d) <a>
  30. 30.🔠 Which heading shows the SMALLEST text: <h3>, <h2>, <h5> or <h6>? (a) <h5> (b) <h6> (c) <h2> (d) <h3>
  31. 31.Which of these is an opening tag? (a) </b> (b) </body> (c) </h1> (d) <h1>
  32. 32.🔠 How many headings are in this code?
    <h1>Our school trip</h1>
    <h2>My best friend</h2>
    <p>Fun facts</p>
    <h2>Rain today</h2>
    <p>Hello, world!</p>
  33. 33.🔠 Which tag is the least important heading? (a) <p> (b) <h6> (c) <h1> (d) <h3>
  34. 34.True or false: in <img>, alt is read by screen readers. (a) True (b) False
  35. 35.🔗 Which code links to about.html? (a) <link about.html> (b) <a src="about.html"> (c) <a href="about.html"> (d) <a alt="about.html">
  36. 36.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Class 7 Blog</title>
    </head>
    <body>
      <h1>Planets</h1>
      <p>We won by 5 runs.</p>
    </body>
    </html>
    (a) Planets (b) We won by 5 runs. (c) Class 7 Blog (d) index.html
  37. 37.🔗 Where does this link open?
    <a href="maths.html" target="_blank">School news</a>
    (a) in the same tab (b) in a new tab
  38. 38.True or false: <b> is an empty tag. (a) False (b) True
  39. 39.📄 Where does <a> go: in the head or in the body? (a) in the body (b) in the head
  40. 40.🔢 In a basic web page file, which comes LAST? (a) </html> (b) <head> (c) </body> (d) <body>

Answer key

  1. art.html
  2. stores a website’s files
  3. in a new tab
  4. <!--
  5. 6
  6. <h1>
  7. 2
  8. Art Gallery
  9. <img>
  10. 5
  11. False
  12. </small>
  13. Markup
  14. <li>
  15. tiger.jpg
  16. 2
  17. 3
  18. line 3
  19. alt
  20. <!DOCTYPE html>
  21. 1
  22. numbers
  23. False
  24. False
  25. 3
  26. src
  27. line 3
  28. False
  29. <a>
  30. <h6>
  31. <h1>
  32. 3
  33. <h6>
  34. True
  35. <a href="about.html">
  36. Class 7 Blog
  37. in a new tab
  38. False
  39. in the body
  40. </html>

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