← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 512 · 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.📄 Can HTML on its own make links to pages? (a) Yes (b) No
  2. 2.📋 Does this list show bullets or numbers?
    <ul>
      <li>Mango</li>
      <li>Papaya</li>
      <li>Guava</li>
    </ul>
    (a) bullets (b) numbers
  3. 3.🔗 Where does this link open?
    <a href="news.html" target="_blank">Play games</a>
    (a) in the same tab (b) in a new tab
  4. 4.Which of these is true of a web server? (a) has an address bar (b) is where we type code (c) saves our .html files (d) stores a website’s files
  5. 5.🧱 HTML gives a web page its ___. (a) sound (b) colours (c) structure (d) speed
  6. 6.Which of these is a closing tag? (a) <li> (b) <b> (c) </b> (d) <h1>
  7. 7.📋 What number does the browser show next to “Jamun”?
    <ol>
      <li>Mango</li>
      <li>Jamun</li>
      <li>Banana</li>
      <li>Litchi</li>
    </ol>
  8. 8.True or false: a web server answers page requests. (a) False (b) True
  9. 9.True or false: a web browser hosts websites online. (a) True (b) False
  10. 10.🏷️ What does a closing tag have that an opening tag does not? (a) a hash # (b) a slash / (c) a dot . (d) a dollar $
  11. 11.🏷️ Is <h1> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  12. 12.🖼️ Which attribute of <img> sets how wide it is? (a) src (b) height (c) width (d) alt
  13. 13.🔗 What does HyperText mean? (a) text in colour (b) secret text (c) text with links (d) very big text
  14. 14.📋 How many items does this list show?
    <ol>
      <li>Banana</li>
      <li>Mango</li>
      <li>Jamun</li>
      <li>Papaya</li>
      <li>Orange</li>
    </ol>
  15. 15.💬 How many paragraphs show on the page?
    <!-- <p>Good morning!</p> -->
    <!-- <p>Rain today</p> -->
    <!-- <p>I love mangoes.</p> -->
    <p>My pets</p>
  16. 16.📛 In <a href="x.html">, what is href? (a) an element name (b) a comment (c) an attribute (d) a closing tag
  17. 17.🔍 Which line is missing its closing tag?
    line 1: <strong>Fun facts</strong>
    line 2: <p>Our school trip
    line 3: <h2>I love mangoes.</h2>
    (a) line 2 (b) line 1 (c) line 3
  18. 18.Which of these is true of a web browser? (a) sends pages over the net (b) is where we type code (c) saves our .html files (d) shows pages from the web
  19. 19.Which of these is an empty tag? (a) <title> (b) <meta> (c) <b> (d) <p>
  20. 20.🔠 How many heading levels does HTML have? (a) 4 (b) 3 (c) 6 (d) 10
  21. 21.🔗 What does target="_blank" do to a link? (a) hides the link (b) makes it bold (c) makes it blank (d) opens it in a new tab
  22. 22.🔗 Where does this link open?
    <a href="maths.html" target="_blank">Maths fun</a>
    (a) in the same tab (b) in a new tab
  23. 23.🔠 Are headings shown in bold by default? (a) No (b) Yes
  24. 24.📝 What does <p> make? (a) a paragraph (b) a link (c) a table (d) a picture
  25. 25.📝 How many paragraphs does this code make?
    <p>Rain today</p>
    <p>The red kite</p>
    <p>Hello, world!</p>
    <p>I love mangoes.</p>
    <p>My pets</p>
    <p>I love mangoes.</p>
  26. 26.🔠 Which tag is used for the main title on a page? (a) <p> (b) <br> (c) <h6> (d) <h1>
  27. 27.💬 Why do coders write comments? (a) to add colour (b) to show pictures (c) to leave notes (d) to make links
  28. 28.💬 How many paragraphs show on the page?
    <p>Hello, world!</p>
    <p>Cricket is fun.</p>
    <!-- <p>My pets</p> -->
    <p>I love mangoes.</p>
  29. 29.🖼️ Which picture file does the browser load?
    <img src="map.png" alt="Map of India" width="400">
    (a) Map of India (b) map.png (c) dog.jpg (d) cake.jpg
  30. 30.🔗 Which tag makes a clickable link? (a) <link> (b) <p> (c) <a> (d) <img>
  31. 31.💬 How many paragraphs show on the page?
    <p>Good morning!</p>
    <!-- <p>My pets</p> -->
    <!-- <p>I love mangoes.</p> -->
    <p>Cricket is fun.</p>
  32. 32.🖼️ Which attribute of <img> is read by screen readers? (a) width (b) height (c) src (d) alt
  33. 33.🔗 Where does this link open?
    <a href="maths.html">Contact us</a>
    (a) in the same tab (b) in a new tab
  34. 34.📋 Which list shows the steps of a recipe best? (a) <hr> (b) <ul> (c) <br> (d) <ol>
  35. 35.💬 Which text will NOT show on the page?
    <p>Our school trip</p>
    <p>Rain today</p>
    <p>Cricket is fun.</p>
    <!-- <p>Fun facts</p> -->
    (a) Rain today (b) Cricket is fun. (c) Fun facts (d) Our school trip
  36. 36.🔤 In “HTML”, what does the L stand for? (a) Laptop (b) Link (c) Language (d) Line
  37. 37.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
  38. 38.📄 Where does the text of <title> appear? (a) at the bottom (b) in a big heading (c) on the browser tab (d) nowhere
  39. 39.True or false: HTML on its own can make headings. (a) False (b) True
  40. 40.🌐 Which one has an address bar? (a) a code editor (b) a web server (c) a web browser

Answer key

  1. Yes
  2. bullets
  3. in a new tab
  4. stores a website’s files
  5. structure
  6. </b>
  7. 2
  8. True
  9. False
  10. a slash /
  11. an opening tag
  12. width
  13. text with links
  14. 5
  15. 1
  16. an attribute
  17. line 2
  18. shows pages from the web
  19. <meta>
  20. 6
  21. opens it in a new tab
  22. in a new tab
  23. Yes
  24. a paragraph
  25. 6
  26. <h1>
  27. to leave notes
  28. 3
  29. map.png
  30. <a>
  31. 2
  32. alt
  33. in the same tab
  34. <ol>
  35. Fun facts
  36. Language
  37. Yes
  38. on the browser tab
  39. True
  40. a web browser

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