← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 385 · 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 text will NOT show on the page?
    <p>Cricket is fun.</p>
    <p>The red kite</p>
    <!-- <p>My best friend</p> -->
    (a) My best friend (b) Cricket is fun. (c) The red kite
  2. 2.🖼️ Which attribute of <img> sets how tall it is? (a) src (b) alt (c) height (d) width
  3. 3.🖼️ Which attribute of <img> names the picture file? (a) src (b) height (c) width (d) alt
  4. 4.📋 Which tag goes around each item of a list? (a) <p> (b) <ul> (c) <li> (d) <ol>
  5. 5.💬 Which text will NOT show on the page?
    <p>Our school trip</p>
    <p>My pets</p>
    <p>Rain today</p>
    <!-- <p>My best friend</p> -->
    (a) My pets (b) Our school trip (c) My best friend (d) Rain today
  6. 6.🌐 Which one shows pages from the web? (a) a web browser (b) a web server (c) a code editor
  7. 7.🔠 Which heading shows the SMALLEST text: <h3>, <h1>, <h4> or <h2>? (a) <h1> (b) <h3> (c) <h4> (d) <h2>
  8. 8.Which of these goes in the body? (a) <table> (b) <title> (c) <style> (d) <link rel="stylesheet">
  9. 9.📋 What number does the browser show next to “Grapes”?
    <ol>
      <li>Jamun</li>
      <li>Grapes</li>
      <li>Guava</li>
      <li>Litchi</li>
      <li>Mango</li>
    </ol>
  10. 10.Which of these is true of a web browser? (a) answers page requests (b) saves our .html files (c) opens web pages for us (d) is where we type code
  11. 11.🏷️ Which is the closing tag for <strong>? (a) <strong> (b) <strong/> (c) <\strong> (d) </strong>
  12. 12.True or false: in <img>, src names the picture file. (a) False (b) True
  13. 13.🌐 Which one sends pages over the net? (a) a web server (b) a web browser (c) a code editor
  14. 14.🔗 Which address opens when you click this link?
    <a href="art.html">Visit the site</a>
    (a) quiz.html (b) art.html (c) news.html (d) Visit the site
  15. 15.🏷️ Is <li> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  16. 16.True or false: <input> has a closing tag. (a) True (b) False
  17. 17.🔗 Which address opens when you click this link?
    <a href="games.html">Play games</a>
    (a) about.html (b) games.html (c) Play games (d) contact.html
  18. 18.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>My Hobbies</title>
    </head>
    <body>
      <h1>Welcome!</h1>
      <p>Mars is red.</p>
    </body>
    </html>
    (a) Mars is red. (b) My Hobbies (c) body (d) Welcome!
  19. 19.True or false: <a> goes in the body. (a) False (b) True
  20. 20.📄 Where does the text of <title> appear? (a) nowhere (b) on the browser tab (c) at the bottom (d) in a big heading
  21. 21.🔢 In a basic web page file, which comes FIRST? (a) <html> (b) <head> (c) <!DOCTYPE html> (d) <body>
  22. 22.🔠 How many heading levels does HTML have? (a) 6 (b) 3 (c) 4 (d) 10
  23. 23.📋 Which list tag is an unordered list? (a) <ol> (b) <ul> (c) <li>
  24. 24.💬 Which text will NOT show on the page?
    <p>Cricket is fun.</p>
    <p>Fun facts</p>
    <!-- <p>Hello, world!</p> -->
    (a) Fun facts (b) Cricket is fun. (c) Hello, world!
  25. 25.💬 How many paragraphs show on the page?
    <!-- <p>I love mangoes.</p> -->
    <p>Rain today</p>
    <!-- <p>My best friend</p> -->
  26. 26.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="moon.png" alt="The full moon" width="100">
    (a) width (b) The full moon (c) moon.png (d) Our school bus
  27. 27.💬 Why do coders write comments? (a) to make links (b) to leave notes (c) to show pictures (d) to add colour
  28. 28.💬 Which text will NOT show on the page?
    <p>Cricket is fun.</p>
    <p>My best friend</p>
    <!-- <p>Hello, world!</p> -->
    (a) Cricket is fun. (b) My best friend (c) Hello, world!
  29. 29.Which of these has a closing tag? (a) <img> (b) <p> (c) <hr> (d) <br>
  30. 30.True or false: HTML on its own can show paragraphs. (a) True (b) False
  31. 31.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>My Hobbies</title>
    </head>
    <body>
      <h1>Welcome!</h1>
      <p>Thanks for visiting.</p>
    </body>
    </html>
    (a) Welcome! (b) Thanks for visiting. (c) My Hobbies (d) index.html
  32. 32.🔠 Which tag is used for the main title on a page? (a) <p> (b) <br> (c) <h1> (d) <h6>
  33. 33.📄 Where does <p> go: in the head or in the body? (a) in the body (b) in the head
  34. 34.📋 How many items does this list show?
    <ol>
      <li>Mango</li>
      <li>Papaya</li>
      <li>Banana</li>
      <li>Grapes</li>
      <li>Orange</li>
      <li>Jamun</li>
    </ol>
  35. 35.📋 Which list tag goes inside ul or ol? (a) <ul> (b) <li> (c) <ol>
  36. 36.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
  37. 37.🔗 What does target="_blank" do to a link? (a) hides the link (b) opens it in a new tab (c) makes it bold (d) makes it blank
  38. 38.💬 How many paragraphs show on the page?
    <!-- <p>My best friend</p> -->
    <!-- <p>My pets</p> -->
    <p>Our school trip</p>
    <!-- <p>The red kite</p> -->
  39. 39.🔍 Which is the odd one out? (a) shows line numbers (b) colours code to help us (c) saves our .html files (d) sends pages over the net
  40. 40.📋 What number does the browser show next to “Grapes”?
    <ol>
      <li>Banana</li>
      <li>Guava</li>
      <li>Grapes</li>
    </ol>

Answer key

  1. My best friend
  2. height
  3. src
  4. <li>
  5. My best friend
  6. a web browser
  7. <h4>
  8. <table>
  9. 2
  10. opens web pages for us
  11. </strong>
  12. True
  13. a web server
  14. art.html
  15. an opening tag
  16. False
  17. games.html
  18. Welcome!
  19. True
  20. on the browser tab
  21. <!DOCTYPE html>
  22. 6
  23. <ul>
  24. Hello, world!
  25. 1
  26. The full moon
  27. to leave notes
  28. Hello, world!
  29. <p>
  30. True
  31. My Hobbies
  32. <h1>
  33. in the body
  34. 6
  35. <li>
  36. Yes
  37. opens it in a new tab
  38. 1
  39. sends pages over the net
  40. 3

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