← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 848 · 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 of these is true of a web browser? (a) answers page requests (b) turns HTML into a page (c) is where we type code (d) hosts websites online
  2. 2.True or false: <input> has a closing tag. (a) True (b) False
  3. 3.🖼️ Why do we add alt text to an image? (a) to describe the image (b) to colour it (c) to load it faster (d) to make it bigger
  4. 4.True or false: HTML on its own can pick a random number. (a) False (b) True
  5. 5.📄 Can HTML on its own make links to pages? (a) No (b) Yes
  6. 6.True or false: <table> goes in the body. (a) True (b) False
  7. 7.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Class 7 Blog</title>
    </head>
    <body>
      <h1>My drawings</h1>
      <p>Here is my best one.</p>
    </body>
    </html>
    (a) index.html (b) My drawings (c) Here is my best one. (d) Class 7 Blog
  8. 8.🔠 How many heading levels does HTML have? (a) 6 (b) 4 (c) 3 (d) 10
  9. 9.💬 How does an HTML comment end? (a) */ (b) // (c) >> (d) -->
  10. 10.🖼️ Which attribute of <img> shows if the image fails? (a) alt (b) width (c) src (d) height
  11. 11.🔗 Where does this link open?
    <a href="news.html">Take the quiz</a>
    (a) in a new tab (b) in the same tab
  12. 12.🔗 Which address opens when you click this link?
    <a href="quiz.html">School news</a>
    (a) games.html (b) about.html (c) School news (d) quiz.html
  13. 13.🔗 Which words do you click on?
    <a href="about.html">Visit the site</a>
    (a) Visit the site (b) href (c) Maths fun (d) about.html
  14. 14.🏷️ What does a closing tag have that an opening tag does not? (a) a dollar $ (b) a dot . (c) a slash / (d) a hash #
  15. 15.🏷️ Which is the closing tag for <i>? (a) <\i> (b) <i/> (c) <i> (d) </i>
  16. 16.💬 How many paragraphs show on the page?
    <p>Good morning!</p>
    <!-- <p>The red kite</p> -->
    <!-- <p>Rain today</p> -->
  17. 17.🏷️ Is </b> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  18. 18.📝 What does <p> make? (a) a picture (b) a paragraph (c) a link (d) a table
  19. 19.True or false: <p> goes in the body. (a) False (b) True
  20. 20.📋 Which list shows the steps of a recipe best? (a) <br> (b) <ul> (c) <ol> (d) <hr>
  21. 21.True or false: in <img>, width names the picture file. (a) True (b) False
  22. 22.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
  23. 23.📄 What is the first line of an HTML5 page? (a) <!DOCTYPE html> (b) <body> (c) <head> (d) <html>
  24. 24.📝 How many paragraphs does this code make?
    <p>My best friend</p>
    <p>Good morning!</p>
    <h2>Good morning!</h2>
  25. 25.💬 Which text will NOT show on the page?
    <p>My pets</p>
    <p>I love mangoes.</p>
    <p>Hello, world!</p>
    <!-- <p>My best friend</p> -->
    (a) I love mangoes. (b) Hello, world! (c) My pets (d) My best friend
  26. 26.Which of these is an opening tag? (a) <li> (b) </body> (c) </b> (d) </h1>
  27. 27.💬 How many paragraphs show on the page?
    <!-- <p>Good morning!</p> -->
    <!-- <p>Cricket is fun.</p> -->
    <p>I love mangoes.</p>
  28. 28.📄 Where does the text of <title> appear? (a) at the bottom (b) nowhere (c) on the browser tab (d) in a big heading
  29. 29.📋 Which tag goes around each item of a list? (a) <ol> (b) <p> (c) <ul> (d) <li>
  30. 30.📋 How many items does this list show?
    <ul>
      <li>Papaya</li>
      <li>Litchi</li>
    </ul>
  31. 31.🖼️ Which tag puts a picture on a page? (a) <pic> (b) <a> (c) <img> (d) <p>
  32. 32.📝 How many paragraphs does this code make?
    <p>Cricket is fun.</p>
    <p>Good morning!</p>
    <p>Fun facts</p>
    <p>The red kite</p>
  33. 33.Which of these is an opening tag? (a) </h1> (b) </b> (c) </p> (d) <title>
  34. 34.🔠 How many headings are in this code?
    <h1>Hello, world!</h1>
    <h4>Good morning!</h4>
    <h3>Our school trip</h3>
    <p>Rain today</p>
    <p>My pets</p>
  35. 35.True or false: a web server shows pages from the web. (a) True (b) False
  36. 36.💬 How many paragraphs show on the page?
    <!-- <p>My pets</p> -->
    <!-- <p>Good morning!</p> -->
    <p>My best friend</p>
  37. 37.💬 Which text will NOT show on the page?
    <!-- <p>Our school trip</p> -->
    <p>Hello, world!</p>
    <p>Fun facts</p>
    (a) Hello, world! (b) Our school trip (c) Fun facts
  38. 38.🌐 Which one hosts websites online? (a) a code editor (b) a web server (c) a web browser
  39. 39.🔗 Where does this link open?
    <a href="art.html">Play games</a>
    (a) in a new tab (b) in the same tab
  40. 40.📋 Does this list show bullets or numbers?
    <ol>
      <li>Papaya</li>
      <li>Jamun</li>
      <li>Banana</li>
    </ol>
    (a) numbers (b) bullets

Answer key

  1. turns HTML into a page
  2. False
  3. to describe the image
  4. False
  5. Yes
  6. True
  7. Class 7 Blog
  8. 6
  9. -->
  10. alt
  11. in the same tab
  12. quiz.html
  13. Visit the site
  14. a slash /
  15. </i>
  16. 1
  17. a closing tag
  18. a paragraph
  19. True
  20. <ol>
  21. False
  22. Yes
  23. <!DOCTYPE html>
  24. 2
  25. My best friend
  26. <li>
  27. 1
  28. on the browser tab
  29. <li>
  30. 2
  31. <img>
  32. 4
  33. <title>
  34. 3
  35. False
  36. 1
  37. Our school trip
  38. a web server
  39. in the same tab
  40. numbers

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