← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 364 · 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.🔠 How many heading levels does HTML have? (a) 3 (b) 4 (c) 10 (d) 6
  2. 2.📋 What number does the browser show next to “Jamun”?
    <ol>
      <li>Grapes</li>
      <li>Jamun</li>
      <li>Orange</li>
      <li>Papaya</li>
    </ol>
  3. 3.🖼️ Which tag puts a picture on a page? (a) <pic> (b) <a> (c) <p> (d) <img>
  4. 4.📝 Does <p> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  5. 5.📋 What number does the browser show next to “Orange”?
    <ol start="3">
      <li>Mango</li>
      <li>Banana</li>
      <li>Orange</li>
    </ol>
  6. 6.🔠 How many headings are in this code?
    <h1>Rain today</h1>
    <p>Cricket is fun.</p>
    <h3>I love mangoes.</h3>
    <p>My best friend</p>
  7. 7.📋 What number does the browser show next to “Banana”?
    <ol start="6">
      <li>Litchi</li>
      <li>Mango</li>
      <li>Banana</li>
    </ol>
  8. 8.💬 How many paragraphs show on the page?
    <!-- <p>Good morning!</p> -->
    <p>Hello, world!</p>
    <!-- <p>I love mangoes.</p> -->
  9. 9.📝 How many paragraphs does this code make?
    <p>Good morning!</p>
    <p>Fun facts</p>
    <p>My best friend</p>
    <h2>Cricket is fun.</h2>
    <h2>Good morning!</h2>
  10. 10.📝 How many paragraphs does this code make?
    <p>The red kite</p>
    <p>My pets</p>
    <p>Good morning!</p>
  11. 11.🔠 Which heading shows the SMALLEST text: <h3>, <h6>, <h2> or <h1>? (a) <h1> (b) <h2> (c) <h3> (d) <h6>
  12. 12.🔗 Where does this link open?
    <a href="games.html">Play games</a>
    (a) in the same tab (b) in a new tab
  13. 13.🔠 Which heading shows the SMALLEST text: <h6>, <h4>, <h2> or <h5>? (a) <h5> (b) <h2> (c) <h4> (d) <h6>
  14. 14.🔠 How many headings are in this code?
    <h1>My pets</h1>
    <h2>My pets</h2>
    <h2>Hello, world!</h2>
  15. 15.💬 How does an HTML comment end? (a) */ (b) // (c) >> (d) -->
  16. 16.🔠 How many headings are in this code?
    <h1>Hello, world!</h1>
    <p>Our school trip</p>
    <h4>Rain today</h4>
  17. 17.🔍 One closing tag is missing. Which one?
    <b>The red kite</b>
    <i>Hello, world!
    <h1>My pets</h1>
    (a) </u> (b) </h1> (c) </b> (d) </i>
  18. 18.📄 What is the first line of an HTML5 page? (a) <!DOCTYPE html> (b) <html> (c) <body> (d) <head>
  19. 19.🔗 Where does this link open?
    <a href="art.html">School news</a>
    (a) in the same tab (b) in a new tab
  20. 20.📝 How many paragraphs does this code make?
    <p>My best friend</p>
    <p>The red kite</p>
    <h2>Cricket is fun.</h2>
  21. 21.💬 Does the browser show comments on the page? (a) Yes (b) No
  22. 22.🔗 Which words do you click on?
    <a href="news.html">Play games</a>
    (a) Play games (b) About us (c) news.html (d) href
  23. 23.📄 Where does <h1> go: in the head or in the body? (a) in the body (b) in the head
  24. 24.💬 How many paragraphs show on the page?
    <!-- <p>Fun facts</p> -->
    <p>Our school trip</p>
    <p>Good morning!</p>
    <p>My best friend</p>
  25. 25.📋 Which list tag lists things in any order? (a) <ul> (b) <li> (c) <ol>
  26. 26.📋 Which list shows the steps of a recipe best? (a) <ol> (b) <ul> (c) <hr> (d) <br>
  27. 27.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Class 7 Blog</title>
    </head>
    <body>
      <h1>Planets</h1>
      <p>I like to read.</p>
    </body>
    </html>
    (a) Planets (b) I like to read. (c) Class 7 Blog (d) index.html
  28. 28.🔍 Which is the odd one out? (a) shows line numbers (b) colours code to help us (c) is where we type code (d) shows pages from the web
  29. 29.True or false: <meta> has a closing tag. (a) False (b) True
  30. 30.🏷️ Which is the closing tag for <i>? (a) <i/> (b) <\i> (c) </i> (d) <i>
  31. 31.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="moon.png" alt="The full moon" width="50">
    (a) width (b) moon.png (c) Our school bus (d) The full moon
  32. 32.🏷️ Which is the closing tag for <h2>? (a) <\h2> (b) <h2/> (c) <h2> (d) </h2>
  33. 33.📋 How many items does this list show?
    <ol>
      <li>Grapes</li>
      <li>Papaya</li>
      <li>Guava</li>
      <li>Mango</li>
      <li>Jamun</li>
      <li>Orange</li>
    </ol>
  34. 34.True or false: a code editor sends pages over the net. (a) True (b) False
  35. 35.🔗 Which tag makes a clickable link? (a) <link> (b) <img> (c) <a> (d) <p>
  36. 36.True or false: a web browser saves our .html files. (a) False (b) True
  37. 37.True or false: <br> has a closing tag. (a) False (b) True
  38. 38.🌐 Which one shows line numbers? (a) a web server (b) a web browser (c) a code editor
  39. 39.True or false: HTML on its own cannot make links to pages. (a) False (b) True
  40. 40.🧱 HTML gives a web page its ___. (a) structure (b) colours (c) speed (d) sound

Answer key

  1. 6
  2. 2
  3. <img>
  4. has a closing tag
  5. 5
  6. 2
  7. 8
  8. 1
  9. 3
  10. 3
  11. <h6>
  12. in the same tab
  13. <h6>
  14. 3
  15. -->
  16. 2
  17. </i>
  18. <!DOCTYPE html>
  19. in the same tab
  20. 2
  21. No
  22. Play games
  23. in the body
  24. 3
  25. <ul>
  26. <ol>
  27. Class 7 Blog
  28. shows pages from the web
  29. False
  30. </i>
  31. The full moon
  32. </h2>
  33. 6
  34. False
  35. <a>
  36. False
  37. False
  38. a code editor
  39. False
  40. structure

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