← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 703 · 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 headings are in this code?
    <h1>The red kite</h1>
    <h3>Hello, world!</h3>
    <h3>Good morning!</h3>
  2. 2.🔠 How many heading levels does HTML have? (a) 10 (b) 3 (c) 6 (d) 4
  3. 3.🔍 Which line is missing its closing tag?
    line 1: <h1>Our school trip
    line 2: <small>Rain today</small>
    line 3: <i>Cricket is fun.</i>
    (a) line 2 (b) line 1 (c) line 3
  4. 4.Which of these is an empty tag? (a) <h1> (b) <b> (c) <ul> (d) <img>
  5. 5.📄 Can HTML on its own show paragraphs? (a) No (b) Yes
  6. 6.🔗 Which words do you click on?
    <a href="art.html">Art corner</a>
    (a) art.html (b) School news (c) href (d) Art corner
  7. 7.🔠 Which heading shows the BIGGEST text: <h4>, <h1>, <h6> or <h3>? (a) <h4> (b) <h6> (c) <h3> (d) <h1>
  8. 8.🔗 Which code links to about.html? (a) <a alt="about.html"> (b) <a href="about.html"> (c) <link about.html> (d) <a src="about.html">
  9. 9.🔠 How many headings are in this code?
    <h1>My pets</h1>
    <h4>Our school trip</h4>
    <h3>I love mangoes.</h3>
    <p>The red kite</p>
    <p>I love mangoes.</p>
  10. 10.True or false: <input> has a closing tag. (a) False (b) True
  11. 11.📝 What does <br> do? (a) makes text bold (b) adds a picture (c) makes a list (d) starts a new line
  12. 12.🏷️ Which is the closing tag for <small>? (a) <\small> (b) <small> (c) <small/> (d) </small>
  13. 13.🔠 Which heading shows the BIGGEST text: <h4>, <h3>, <h1> or <h6>? (a) <h4> (b) <h3> (c) <h1> (d) <h6>
  14. 14.🔗 Where does this link open?
    <a href="maths.html" target="_blank">Play games</a>
    (a) in the same tab (b) in a new tab
  15. 15.💬 How does an HTML comment start? (a) // (b) <!-- (c) /* (d) #
  16. 16.🔗 Which address opens when you click this link?
    <a href="games.html">About us</a>
    (a) contact.html (b) About us (c) about.html (d) games.html
  17. 17.True or false: HTML on its own can count button clicks. (a) False (b) True
  18. 18.💬 How many paragraphs show on the page?
    <p>Cricket is fun.</p>
    <!-- <p>Hello, world!</p> -->
    <!-- <p>Rain today</p> -->
    <!-- <p>The red kite</p> -->
  19. 19.💬 Why do coders write comments? (a) to show pictures (b) to leave notes (c) to add colour (d) to make links
  20. 20.💬 Which text will NOT show on the page?
    <p>My pets</p>
    <!-- <p>My best friend</p> -->
    <p>The red kite</p>
    <p>Fun facts</p>
    (a) The red kite (b) Fun facts (c) My pets (d) My best friend
  21. 21.🔠 Which tag is the least important heading? (a) <p> (b) <h3> (c) <h1> (d) <h6>
  22. 22.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Cricket Club</title>
    </head>
    <body>
      <h1>All about me</h1>
      <p>Mars is red.</p>
    </body>
    </html>
    (a) index.html (b) All about me (c) Mars is red. (d) Cricket Club
  23. 23.Which of these goes in the body? (a) <style> (b) <title> (c) <ul> (d) <link rel="stylesheet">
  24. 24.Which of these is an opening tag? (a) </p> (b) <h1> (c) </b> (d) </title>
  25. 25.💬 Does the browser show comments on the page? (a) Yes (b) No
  26. 26.🔗 Which words do you click on?
    <a href="contact.html">Contact us</a>
    (a) contact.html (b) href (c) Contact us (d) Visit the site
  27. 27.🌐 Which one has an address bar? (a) a web server (b) a code editor (c) a web browser
  28. 28.💬 How does an HTML comment end? (a) */ (b) >> (c) // (d) -->
  29. 29.📋 Which list shows the steps of a recipe best? (a) <br> (b) <ol> (c) <hr> (d) <ul>
  30. 30.📝 Does <h1> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  31. 31.🏷️ Is <body> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  32. 32.🔗 Which words do you click on?
    <a href="quiz.html">About us</a>
    (a) Contact us (b) quiz.html (c) href (d) About us
  33. 33.📄 Can HTML on its own make bullet lists? (a) Yes (b) No
  34. 34.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Art Gallery</title>
    </head>
    <body>
      <h1>Match report</h1>
      <p>I like to read.</p>
    </body>
    </html>
    (a) Art Gallery (b) body (c) Match report (d) I like to read.
  35. 35.🖼️ Which attribute of <img> describes the picture? (a) width (b) src (c) height (d) alt
  36. 36.Which of these is an opening tag? (a) </title> (b) <p> (c) </p> (d) </b>
  37. 37.🔍 One closing tag is missing. Which one?
    <em>Good morning!
    <i>I love mangoes.</i>
    <h1>My best friend</h1>
    (a) </p> (b) </em> (c) </i> (d) </h1>
  38. 38.📝 How many paragraphs does this code make?
    <p>Our school trip</p>
    <p>Hello, world!</p>
    <p>The red kite</p>
  39. 39.🔢 In a basic web page file, which comes first: “</head>” or “<head>”? (a) </head> (b) <head>
  40. 40.📋 How many items does this list show?
    <ol>
      <li>Jamun</li>
      <li>Papaya</li>
      <li>Mango</li>
      <li>Orange</li>
      <li>Banana</li>
    </ol>

Answer key

  1. 3
  2. 6
  3. line 1
  4. <img>
  5. Yes
  6. Art corner
  7. <h1>
  8. <a href="about.html">
  9. 3
  10. False
  11. starts a new line
  12. </small>
  13. <h1>
  14. in a new tab
  15. <!--
  16. games.html
  17. False
  18. 1
  19. to leave notes
  20. My best friend
  21. <h6>
  22. Cricket Club
  23. <ul>
  24. <h1>
  25. No
  26. Contact us
  27. a web browser
  28. -->
  29. <ol>
  30. has a closing tag
  31. an opening tag
  32. About us
  33. Yes
  34. Match report
  35. alt
  36. <p>
  37. </em>
  38. 3
  39. <head>
  40. 5

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