← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 239 · 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.🏷️ HTML marks up text using ___. (a) wires (b) tags (c) pixels (d) keys
  2. 2.🖼️ Which attribute of <img> tells which image to load? (a) alt (b) width (c) height (d) src
  3. 3.🔠 How many headings are in this code?
    <h1>My pets</h1>
    <h2>The red kite</h2>
    <p>Rain today</p>
    <h4>Fun facts</h4>
  4. 4.🔠 Which heading shows the SMALLEST text: <h3>, <h1>, <h5> or <h2>? (a) <h2> (b) <h5> (c) <h3> (d) <h1>
  5. 5.🌐 Which one turns HTML into a page? (a) a code editor (b) a web browser (c) a web server
  6. 6.Which of these is an opening tag? (a) </body> (b) </li> (c) <title> (d) </p>
  7. 7.📝 What does <p> make? (a) a table (b) a link (c) a paragraph (d) a picture
  8. 8.📋 Does this list show bullets or numbers?
    <ol>
      <li>Guava</li>
      <li>Litchi</li>
      <li>Grapes</li>
    </ol>
    (a) numbers (b) bullets
  9. 9.🔗 Which words do you click on?
    <a href="art.html">School news</a>
    (a) School news (b) href (c) art.html (d) Take the quiz
  10. 10.🖼️ Which picture file does the browser load?
    <img src="cake.jpg" alt="Birthday cake" width="150">
    (a) moon.png (b) Birthday cake (c) cake.jpg (d) dog.jpg
  11. 11.🔍 Which is the odd one out? (a) opens web pages for us (b) shows pages from the web (c) shows line numbers (d) has an address bar
  12. 12.Which of these has a closing tag? (a) <input> (b) <title> (c) <br> (d) <hr>
  13. 13.📋 Does this list show bullets or numbers?
    <ol>
      <li>Litchi</li>
      <li>Jamun</li>
    </ol>
    (a) bullets (b) numbers
  14. 14.📋 Does this list show bullets or numbers?
    <ol>
      <li>Mango</li>
      <li>Papaya</li>
    </ol>
    (a) numbers (b) bullets
  15. 15.📝 How many paragraphs does this code make?
    <p>Cricket is fun.</p>
    <p>Cricket is fun.</p>
    <p>My pets</p>
    <p>I love mangoes.</p>
    <h2>Cricket is fun.</h2>
  16. 16.🖼️ How many pixels wide is the picture drawn?
    <img src="dog.jpg" alt="A happy dog" width="300">
  17. 17.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="map.png" alt="Map of India" width="300">
    (a) width (b) Map of India (c) Birthday cake (d) map.png
  18. 18.📝 What does <br> do? (a) starts a new line (b) makes text bold (c) makes a list (d) adds a picture
  19. 19.🔗 Which code links to about.html? (a) <a href="about.html"> (b) <a src="about.html"> (c) <link about.html> (d) <a alt="about.html">
  20. 20.🏷️ Which is the closing tag for <u>? (a) <\u> (b) <u/> (c) </u> (d) <u>
  21. 21.🔍 Which is the odd one out? (a) opens web pages for us (b) shows pages from the web (c) stores a website’s files (d) turns HTML into a page
  22. 22.💬 Which text will NOT show on the page?
    <p>Good morning!</p>
    <p>The red kite</p>
    <!-- <p>My pets</p> -->
    <p>Fun facts</p>
    (a) Good morning! (b) The red kite (c) Fun facts (d) My pets
  23. 23.🔍 Which line is missing its closing tag?
    line 1: <h1>Good morning!</h1>
    line 2: <strong>Cricket is fun.</strong>
    line 3: <p>My pets
    (a) line 1 (b) line 2 (c) line 3
  24. 24.📄 What is the first line of an HTML5 page? (a) <!DOCTYPE html> (b) <html> (c) <body> (d) <head>
  25. 25.💬 Which text will NOT show on the page?
    <p>Good morning!</p>
    <p>My pets</p>
    <!-- <p>Fun facts</p> -->
    (a) Good morning! (b) Fun facts (c) My pets
  26. 26.📋 Which list tag is an unordered list? (a) <ol> (b) <li> (c) <ul>
  27. 27.🔗 Which tag makes a clickable link? (a) <p> (b) <img> (c) <link> (d) <a>
  28. 28.🧩 An opening tag + content + a closing tag together make an ___. (a) editor (b) address (c) attribute (d) element
  29. 29.🔗 Which words do you click on?
    <a href="https://example.com">Play games</a>
    (a) href (b) Play games (c) https://example.com (d) About us
  30. 30.🏷️ Is </h1> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  31. 31.💬 How many paragraphs show on the page?
    <p>Hello, world!</p>
    <!-- <p>Rain today</p> -->
    <p>Fun facts</p>
    <p>I love mangoes.</p>
  32. 32.📋 What number does the browser show next to “Orange”?
    <ol start="2">
      <li>Jamun</li>
      <li>Orange</li>
      <li>Banana</li>
      <li>Grapes</li>
      <li>Guava</li>
      <li>Litchi</li>
    </ol>
  33. 33.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
  34. 34.🔠 How many headings are in this code?
    <h1>Fun facts</h1>
    <p>Fun facts</p>
    <p>Hello, world!</p>
    <p>Good morning!</p>
    <p>My pets</p>
  35. 35.True or false: in <img>, width tells which image to load. (a) False (b) True
  36. 36.📋 Which list shows the steps of a recipe best? (a) <hr> (b) <ul> (c) <br> (d) <ol>
  37. 37.True or false: in <img>, alt names the picture file. (a) True (b) False
  38. 38.Which of these is true of a web browser? (a) saves our .html files (b) hosts websites online (c) has an address bar (d) is where we type code
  39. 39.📝 Does <p> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  40. 40.📋 Which list tag is an ordered list? (a) <li> (b) <ol> (c) <ul>

Answer key

  1. tags
  2. src
  3. 3
  4. <h5>
  5. a web browser
  6. <title>
  7. a paragraph
  8. numbers
  9. School news
  10. cake.jpg
  11. shows line numbers
  12. <title>
  13. numbers
  14. numbers
  15. 4
  16. 300
  17. Map of India
  18. starts a new line
  19. <a href="about.html">
  20. </u>
  21. stores a website’s files
  22. My pets
  23. line 3
  24. <!DOCTYPE html>
  25. Fun facts
  26. <ul>
  27. <a>
  28. element
  29. Play games
  30. a closing tag
  31. 3
  32. 3
  33. Yes
  34. 1
  35. False
  36. <ol>
  37. False
  38. has an address bar
  39. has a closing tag
  40. <ol>

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