← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 730 · 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 server? (a) shows pages from the web (b) sends pages over the net (c) opens web pages for us (d) shows line numbers
  2. 2.📝 How many paragraphs does this code make?
    <p>Cricket is fun.</p>
    <p>The red kite</p>
    <p>Hello, world!</p>
  3. 3.🖼️ Which picture file does the browser load?
    <img src="moon.png" alt="The full moon" width="50">
    (a) fort.jpg (b) bus.jpg (c) moon.png (d) The full moon
  4. 4.📋 Which list tag lists things in any order? (a) <ol> (b) <ul> (c) <li>
  5. 5.📝 On how many lines does the browser show this paragraph?
    <p>Sky is blue<br>Kites fly high<br>Roses are red</p>
  6. 6.📋 Which list suits a shopping list in any order? (a) <hr> (b) <ol> (c) <br> (d) <ul>
  7. 7.Which of these has a closing tag? (a) <br> (b) <img> (c) <p> (d) <input>
  8. 8.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="kite.png" alt="A red kite" width="200">
    (a) kite.png (b) Map of India (c) A red kite (d) width
  9. 9.🔗 Which address opens when you click this link?
    <a href="news.html">Contact us</a>
    (a) quiz.html (b) Contact us (c) news.html (d) games.html
  10. 10.📛 In <a href="x.html">, what is href? (a) an element name (b) a comment (c) a closing tag (d) an attribute
  11. 11.True or false: a code editor sends pages over the net. (a) False (b) True
  12. 12.🔗 Which attribute holds the address of a link? (a) id (b) alt (c) href (d) src
  13. 13.🔍 Which line is missing its closing tag?
    line 1: <b>Good morning!</b>
    line 2: <strong>My best friend</strong>
    line 3: <h2>The red kite
    (a) line 1 (b) line 3 (c) line 2
  14. 14.💬 Why do coders write comments? (a) to add colour (b) to show pictures (c) to leave notes (d) to make links
  15. 15.🔗 Where does this link open?
    <a href="quiz.html">Visit the site</a>
    (a) in a new tab (b) in the same tab
  16. 16.🏷️ Is <p> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  17. 17.🔠 Which heading shows the SMALLEST text: <h1>, <h3>, <h5> or <h2>? (a) <h1> (b) <h2> (c) <h5> (d) <h3>
  18. 18.🖼️ Which tag puts a picture on a page? (a) <a> (b) <img> (c) <pic> (d) <p>
  19. 19.🔠 Which heading shows the BIGGEST text: <h2>, <h3>, <h6> or <h4>? (a) <h2> (b) <h4> (c) <h6> (d) <h3>
  20. 20.💬 Which text will NOT show on the page?
    <!-- <p>Rain today</p> -->
    <p>I love mangoes.</p>
    <p>Hello, world!</p>
    (a) I love mangoes. (b) Rain today (c) Hello, world!
  21. 21.Which of these goes in the body? (a) <link rel="stylesheet"> (b) <style> (c) <title> (d) <img>
  22. 22.True or false: <ul> is an unordered list. (a) False (b) True
  23. 23.🔠 Which heading shows the SMALLEST text: <h4>, <h1>, <h6> or <h2>? (a) <h2> (b) <h4> (c) <h1> (d) <h6>
  24. 24.🌐 Which one shows pages from the web? (a) a web server (b) a code editor (c) a web browser
  25. 25.🔠 Which heading shows the BIGGEST text: <h6>, <h1>, <h3> or <h2>? (a) <h2> (b) <h1> (c) <h3> (d) <h6>
  26. 26.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>My Hobbies</title>
    </head>
    <body>
      <h1>Match report</h1>
      <p>Here is my best one.</p>
    </body>
    </html>
    (a) Here is my best one. (b) index.html (c) Match report (d) My Hobbies
  27. 27.Which of these is true of a code editor? (a) shows line numbers (b) sends pages over the net (c) answers page requests (d) stores a website’s files
  28. 28.📄 Which part holds everything you see on the page? (a) the title (b) the head (c) the doctype (d) the body
  29. 29.🔗 Which address opens when you click this link?
    <a href="games.html">Art corner</a>
    (a) Art corner (b) contact.html (c) games.html (d) about.html
  30. 30.True or false: a web server colours code to help us. (a) False (b) True
  31. 31.Which of these goes in the head? (a) <img> (b) <h1> (c) <p> (d) <meta charset="utf-8">
  32. 32.💬 Which text will NOT show on the page?
    <!-- <p>Fun facts</p> -->
    <p>My pets</p>
    <p>Cricket is fun.</p>
    (a) Fun facts (b) Cricket is fun. (c) My pets
  33. 33.🔗 Which address opens when you click this link?
    <a href="maths.html">Take the quiz</a>
    (a) news.html (b) maths.html (c) Take the quiz (d) art.html
  34. 34.🖼️ Which attribute of <img> is read by screen readers? (a) alt (b) width (c) src (d) height
  35. 35.🔗 Which tag makes a clickable link? (a) <img> (b) <link> (c) <a> (d) <p>
  36. 36.🔗 Which code links to about.html? (a) <link about.html> (b) <a src="about.html"> (c) <a href="about.html"> (d) <a alt="about.html">
  37. 37.🔗 Which address opens when you click this link?
    <a href="games.html">Contact us</a>
    (a) about.html (b) Contact us (c) games.html (d) contact.html
  38. 38.📄 Where does <ul> go: in the head or in the body? (a) in the body (b) in the head
  39. 39.📄 Where does <title> go: in the head or in the body? (a) in the head (b) in the body
  40. 40.🔍 One closing tag is missing. Which one?
    <h2>My pets
    <strong>I love mangoes.</strong>
    <h3>Cricket is fun.</h3>
    (a) </strong> (b) </p> (c) </h2> (d) </h3>

Answer key

  1. sends pages over the net
  2. 3
  3. moon.png
  4. <ul>
  5. 3
  6. <ul>
  7. <p>
  8. A red kite
  9. news.html
  10. an attribute
  11. False
  12. href
  13. line 3
  14. to leave notes
  15. in the same tab
  16. an opening tag
  17. <h5>
  18. <img>
  19. <h2>
  20. Rain today
  21. <img>
  22. True
  23. <h6>
  24. a web browser
  25. <h1>
  26. My Hobbies
  27. shows line numbers
  28. the body
  29. games.html
  30. False
  31. <meta charset="utf-8">
  32. Fun facts
  33. maths.html
  34. alt
  35. <a>
  36. <a href="about.html">
  37. games.html
  38. in the body
  39. in the head
  40. </h2>

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