← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 146 · 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.🏷️ Every HTML tag starts with which sign? (a) { (b) < (c) ( (d) [
  2. 2.Which of these goes in the body? (a) <h1> (b) <style> (c) <meta charset="utf-8"> (d) <link rel="stylesheet">
  3. 3.🔠 Which heading shows the BIGGEST text: <h2>, <h5>, <h6> or <h1>? (a) <h2> (b) <h5> (c) <h6> (d) <h1>
  4. 4.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="cake.jpg" alt="Birthday cake" width="350">
    (a) A happy dog (b) Birthday cake (c) cake.jpg (d) width
  5. 5.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="tiger.jpg" alt="A tiger asleep" width="250">
    (a) width (b) A tiger asleep (c) A red kite (d) tiger.jpg
  6. 6.📝 How many paragraphs does this code make?
    <p>Good morning!</p>
    <p>Our school trip</p>
    <h2>I love mangoes.</h2>
    <h2>Fun facts</h2>
    <h2>Cricket is fun.</h2>
    <h2>My pets</h2>
  7. 7.📋 Which list shows the steps of a recipe best? (a) <hr> (b) <ol> (c) <br> (d) <ul>
  8. 8.💬 Which text will NOT show on the page?
    <p>Rain today</p>
    <!-- <p>Hello, world!</p> -->
    <p>Cricket is fun.</p>
    (a) Cricket is fun. (b) Hello, world! (c) Rain today
  9. 9.📝 Does <b> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  10. 10.🖼️ Which attribute of <img> describes the picture? (a) width (b) height (c) alt (d) src
  11. 11.🖼️ Which attribute of <img> tells which image to load? (a) height (b) alt (c) src (d) width
  12. 12.🏷️ Is </body> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  13. 13.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
  14. 14.Which of these is an empty tag? (a) <li> (b) <img> (c) <h1> (d) <b>
  15. 15.Which of these is a closing tag? (a) <body> (b) <b> (c) </title> (d) <li>
  16. 16.🌐 Which one hosts websites online? (a) a web server (b) a code editor (c) a web browser
  17. 17.🏷️ Is <title> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  18. 18.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="fort.jpg" alt="An old fort" width="350">
    (a) fort.jpg (b) A tiger asleep (c) An old fort (d) width
  19. 19.📋 Which list tag goes inside ul or ol? (a) <ul> (b) <ol> (c) <li>
  20. 20.🔠 How many headings are in this code?
    <h1>Fun facts</h1>
    <h4>Our school trip</h4>
    <p>My best friend</p>
  21. 21.🌐 Which one saves our .html files? (a) a code editor (b) a web server (c) a web browser
  22. 22.🌐 Which one has an address bar? (a) a web server (b) a web browser (c) a code editor
  23. 23.🔗 Which address opens when you click this link?
    <a href="news.html">Visit the site</a>
    (a) Visit the site (b) games.html (c) news.html (d) quiz.html
  24. 24.🖼️ How many pixels wide is the picture drawn?
    <img src="moon.png" alt="The full moon" width="400">
  25. 25.True or false: <li> is an unordered list. (a) True (b) False
  26. 26.True or false: HTML on its own cannot pick a random number. (a) True (b) False
  27. 27.🏷️ Which is the closing tag for <b>? (a) </b> (b) <b/> (c) <b> (d) <\b>
  28. 28.🔢 In a basic web page file, which comes first: “</body>” or “</html>”? (a) </html> (b) </body>
  29. 29.🔠 How many <h1> headings should a page usually have? (a) 1 (b) 10 (c) 6 (d) 3
  30. 30.🔍 One closing tag is missing. Which one?
    <strong>Good morning!</strong>
    <i>My best friend</i>
    <p>Rain today
    (a) </u> (b) </i> (c) </p> (d) </strong>
  31. 31.🔠 Which heading shows the SMALLEST text: <h2>, <h1>, <h6> or <h3>? (a) <h1> (b) <h6> (c) <h3> (d) <h2>
  32. 32.🔢 In a basic web page file, which comes first: “</head>” or “</html>”? (a) </head> (b) </html>
  33. 33.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as a dot (b) as 5 spaces (c) as a new line (d) as one space
  34. 34.💬 Does the browser show comments on the page? (a) No (b) Yes
  35. 35.🖼️ How many pixels wide is the picture drawn?
    <img src="dog.jpg" alt="A happy dog" width="200">
  36. 36.Which of these is an opening tag? (a) <h1> (b) </body> (c) </li> (d) </h1>
  37. 37.🔍 One closing tag is missing. Which one?
    <p>My pets
    <h2>Hello, world!</h2>
    <small>Cricket is fun.</small>
    (a) </p> (b) </small> (c) </u> (d) </h2>
  38. 38.Which of these is a closing tag? (a) <b> (b) <title> (c) </li> (d) <li>
  39. 39.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Riya’s Recipes</title>
    </head>
    <body>
      <h1>Match report</h1>
      <p>Here is my best one.</p>
    </body>
    </html>
    (a) Riya’s Recipes (b) index.html (c) Here is my best one. (d) Match report
  40. 40.📄 What is the first line of an HTML5 page? (a) <body> (b) <!DOCTYPE html> (c) <html> (d) <head>

Answer key

  1. <
  2. <h1>
  3. <h1>
  4. Birthday cake
  5. A tiger asleep
  6. 2
  7. <ol>
  8. Hello, world!
  9. has a closing tag
  10. alt
  11. src
  12. a closing tag
  13. Yes
  14. <img>
  15. </title>
  16. a web server
  17. an opening tag
  18. An old fort
  19. <li>
  20. 2
  21. a code editor
  22. a web browser
  23. news.html
  24. 400
  25. False
  26. True
  27. </b>
  28. </body>
  29. 1
  30. </p>
  31. <h6>
  32. </head>
  33. as one space
  34. No
  35. 200
  36. <h1>
  37. </p>
  38. </li>
  39. Riya’s Recipes
  40. <!DOCTYPE html>

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