← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 440 · 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.🔗 Where does this link open?
    <a href="quiz.html">Take the quiz</a>
    (a) in a new tab (b) in the same tab
  2. 2.💬 Which text will NOT show on the page?
    <p>Hello, world!</p>
    <p>My best friend</p>
    <p>I love mangoes.</p>
    <!-- <p>Our school trip</p> -->
    (a) Hello, world! (b) Our school trip (c) My best friend (d) I love mangoes.
  3. 3.🖼️ Which attribute of <img> is read by screen readers? (a) height (b) src (c) width (d) alt
  4. 4.🔠 Which heading shows the BIGGEST text: <h3>, <h2>, <h1> or <h4>? (a) <h1> (b) <h2> (c) <h3> (d) <h4>
  5. 5.📄 Which part holds everything you see on the page? (a) the title (b) the body (c) the head (d) the doctype
  6. 6.📝 What does <br> do? (a) makes text bold (b) starts a new line (c) makes a list (d) adds a picture
  7. 7.🔗 Which words do you click on?
    <a href="about.html">About us</a>
    (a) href (b) About us (c) Contact us (d) about.html
  8. 8.📝 On how many lines does the browser show this paragraph?
    <p>Stars shine<br>Roses are red</p>
  9. 9.🖼️ Which picture file does the browser load?
    <img src="moon.png" alt="The full moon" width="100">
    (a) moon.png (b) bus.jpg (c) The full moon (d) fort.jpg
  10. 10.📝 How many paragraphs does this code make?
    <p>Our school trip</p>
    <p>My best friend</p>
    <h2>Rain today</h2>
    <h2>Rain today</h2>
  11. 11.🔠 Which heading shows the SMALLEST text: <h2>, <h3>, <h1> or <h5>? (a) <h1> (b) <h3> (c) <h2> (d) <h5>
  12. 12.Which of these is an empty tag? (a) <p> (b) <h1> (c) <li> (d) <hr>
  13. 13.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="tiger.jpg" alt="A tiger asleep" width="150">
    (a) tiger.jpg (b) A tiger asleep (c) width (d) A red kite
  14. 14.Which of these is true of a web server? (a) sends pages over the net (b) colours code to help us (c) turns HTML into a page (d) opens web pages for us
  15. 15.🔗 What does target="_blank" do to a link? (a) makes it bold (b) hides the link (c) opens it in a new tab (d) makes it blank
  16. 16.🔍 One closing tag is missing. Which one?
    <h2>Good morning!</h2>
    <strong>I love mangoes.</strong>
    <small>My best friend
    (a) </h2> (b) </u> (c) </small> (d) </strong>
  17. 17.🔠 Which heading shows the SMALLEST text: <h3>, <h1>, <h4> or <h2>? (a) <h4> (b) <h1> (c) <h3> (d) <h2>
  18. 18.📝 How many paragraphs does this code make?
    <p>Rain today</p>
    <h2>The red kite</h2>
    <p>Hello, world!</p>
    <h2>Cricket is fun.</h2>
    <p>Rain today</p>
    <p>Fun facts</p>
  19. 19.🏷️ Is <title> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  20. 20.Which of these is true of a web browser? (a) shows line numbers (b) is where we type code (c) colours code to help us (d) shows pages from the web
  21. 21.True or false: <link rel="stylesheet"> goes in the head. (a) False (b) True
  22. 22.🔠 Which heading shows the BIGGEST text: <h4>, <h6>, <h5> or <h3>? (a) <h5> (b) <h6> (c) <h3> (d) <h4>
  23. 23.📄 Where does <h1> go: in the head or in the body? (a) in the body (b) in the head
  24. 24.🔗 Which words do you click on?
    <a href="contact.html">Take the quiz</a>
    (a) href (b) Take the quiz (c) contact.html (d) Play games
  25. 25.💬 How many paragraphs show on the page?
    <!-- <p>My pets</p> -->
    <!-- <p>My best friend</p> -->
    <p>I love mangoes.</p>
    <p>Good morning!</p>
    <!-- <p>Cricket is fun.</p> -->
  26. 26.📋 How many items does this list show?
    <ul>
      <li>Mango</li>
      <li>Banana</li>
      <li>Litchi</li>
      <li>Orange</li>
      <li>Grapes</li>
      <li>Guava</li>
    </ul>
  27. 27.📝 How many paragraphs does this code make?
    <p>My pets</p>
    <p>Our school trip</p>
    <p>I love mangoes.</p>
    <h2>Our school trip</h2>
    <h2>My best friend</h2>
    <h2>I love mangoes.</h2>
  28. 28.True or false: a web server hosts websites online. (a) False (b) True
  29. 29.True or false: <li> shows 1, 2, 3 numbers. (a) True (b) False
  30. 30.🔍 One closing tag is missing. Which one?
    <small>Rain today</small>
    <b>Cricket is fun.</b>
    <em>Good morning!
    (a) </em> (b) </b> (c) </h2> (d) </small>
  31. 31.🔗 Which words do you click on?
    <a href="contact.html">Contact us</a>
    (a) href (b) Visit the site (c) contact.html (d) Contact us
  32. 32.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>My Hobbies</title>
    </head>
    <body>
      <h1>Welcome!</h1>
      <p>I like to read.</p>
    </body>
    </html>
    (a) My Hobbies (b) index.html (c) Welcome! (d) I like to read.
  33. 33.🌐 Which one shows line numbers? (a) a web browser (b) a code editor (c) a web server
  34. 34.True or false: <li> is an unordered list. (a) False (b) True
  35. 35.🔗 Which words do you click on?
    <a href="games.html">Art corner</a>
    (a) School news (b) Art corner (c) href (d) games.html
  36. 36.🔗 Which address opens when you click this link?
    <a href="about.html">Maths fun</a>
    (a) contact.html (b) https://example.com (c) Maths fun (d) about.html
  37. 37.📝 What does <p> make? (a) a table (b) a paragraph (c) a picture (d) a link
  38. 38.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="bus.jpg" alt="Our school bus" width="100">
    (a) Our school bus (b) An old fort (c) width (d) bus.jpg
  39. 39.🔠 Which heading shows the BIGGEST text: <h3>, <h5>, <h2> or <h1>? (a) <h5> (b) <h3> (c) <h1> (d) <h2>
  40. 40.🌐 Which one answers page requests? (a) a code editor (b) a web server (c) a web browser

Answer key

  1. in the same tab
  2. Our school trip
  3. alt
  4. <h1>
  5. the body
  6. starts a new line
  7. About us
  8. 2
  9. moon.png
  10. 2
  11. <h5>
  12. <hr>
  13. A tiger asleep
  14. sends pages over the net
  15. opens it in a new tab
  16. </small>
  17. <h4>
  18. 4
  19. an opening tag
  20. shows pages from the web
  21. True
  22. <h3>
  23. in the body
  24. Take the quiz
  25. 2
  26. 6
  27. 3
  28. True
  29. False
  30. </em>
  31. Contact us
  32. My Hobbies
  33. a code editor
  34. False
  35. Art corner
  36. about.html
  37. a paragraph
  38. Our school bus
  39. <h1>
  40. a web server

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