← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 126 · 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">Maths fun</a>
    (a) in a new tab (b) in the same tab
  2. 2.🔠 Which heading shows the BIGGEST text: <h1>, <h4>, <h5> or <h6>? (a) <h5> (b) <h6> (c) <h1> (d) <h4>
  3. 3.🔗 Where does this link open?
    <a href="art.html" target="_blank">Contact us</a>
    (a) in the same tab (b) in a new tab
  4. 4.📝 On how many lines does the browser show this paragraph?
    <p>Stars shine<br>Sky is blue<br>Roses are red</p>
  5. 5.📄 Can HTML on its own make a form? (a) Yes (b) No
  6. 6.📋 How many items does this list show?
    <ol>
      <li>Mango</li>
      <li>Banana</li>
    </ol>
  7. 7.💬 Which text will NOT show on the page?
    <p>My best friend</p>
    <p>Rain today</p>
    <p>Our school trip</p>
    <!-- <p>Good morning!</p> -->
    (a) Rain today (b) Our school trip (c) My best friend (d) Good morning!
  8. 8.🖼️ Which picture file does the browser load?
    <img src="kite.png" alt="A red kite" width="350">
    (a) map.png (b) cake.jpg (c) kite.png (d) A red kite
  9. 9.📄 Can HTML on its own make headings? (a) No (b) Yes
  10. 10.🔍 One closing tag is missing. Which one?
    <h2>Cricket is fun.
    <small>My pets</small>
    <u>Hello, world!</u>
    (a) </u> (b) </small> (c) </h1> (d) </h2>
  11. 11.💬 Why do coders write comments? (a) to add colour (b) to make links (c) to leave notes (d) to show pictures
  12. 12.🔗 Which address opens when you click this link?
    <a href="https://example.com">Contact us</a>
    (a) maths.html (b) Contact us (c) art.html (d) https://example.com
  13. 13.📄 Where does <meta charset="utf-8"> go: in the head or in the body? (a) in the body (b) in the head
  14. 14.🔗 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
  15. 15.🖼️ Which attribute of <img> tells which image to load? (a) height (b) src (c) alt (d) width
  16. 16.🏷️ Which is the closing tag for <p>? (a) </p> (b) <\p> (c) <p/> (d) <p>
  17. 17.True or false: a code editor sends pages over the net. (a) False (b) True
  18. 18.💬 Which text will NOT show on the page?
    <p>My pets</p>
    <!-- <p>Cricket is fun.</p> -->
    <p>The red kite</p>
    <p>Hello, world!</p>
    (a) My pets (b) Hello, world! (c) Cricket is fun. (d) The red kite
  19. 19.💬 Which text will NOT show on the page?
    <p>Our school trip</p>
    <!-- <p>Hello, world!</p> -->
    <p>Fun facts</p>
    (a) Hello, world! (b) Our school trip (c) Fun facts
  20. 20.True or false: <title> goes in the body. (a) True (b) False
  21. 21.📄 Where does <table> go: in the head or in the body? (a) in the body (b) in the head
  22. 22.🔠 How many headings are in this code?
    <h1>Our school trip</h1>
    <h4>My pets</h4>
    <h4>My best friend</h4>
    <h2>Our school trip</h2>
    <h4>The red kite</h4>
  23. 23.True or false: a web server colours code to help us. (a) True (b) False
  24. 24.🔠 Which tag is used for the main title on a page? (a) <p> (b) <h1> (c) <h6> (d) <br>
  25. 25.🔍 Which line is missing its closing tag?
    line 1: <em>Our school trip</em>
    line 2: <p>Fun facts</p>
    line 3: <h1>My pets
    (a) line 2 (b) line 1 (c) line 3
  26. 26.💬 How many paragraphs show on the page?
    <!-- <p>Good morning!</p> -->
    <p>Fun facts</p>
    <!-- <p>My best friend</p> -->
    <!-- <p>Rain today</p> -->
    <!-- <p>The red kite</p> -->
  27. 27.True or false: <link rel="stylesheet"> goes in the head. (a) True (b) False
  28. 28.Which of these is true of a web server? (a) has an address bar (b) shows pages from the web (c) hosts websites online (d) turns HTML into a page
  29. 29.📄 Can HTML on its own add pictures to a page? (a) No (b) Yes
  30. 30.🔍 Which is the odd one out? (a) shows line numbers (b) turns HTML into a page (c) saves our .html files (d) colours code to help us
  31. 31.🖼️ Which attribute of <img> sets how wide it is? (a) height (b) width (c) alt (d) src
  32. 32.True or false: in <img>, width sets how wide it is. (a) True (b) False
  33. 33.True or false: a web browser turns HTML into a page. (a) False (b) True
  34. 34.🔠 How many headings are in this code?
    <h1>I love mangoes.</h1>
    <h2>My pets</h2>
    <h3>Hello, world!</h3>
    <h2>Good morning!</h2>
  35. 35.🔢 In a basic web page file, which comes FIRST? (a) <!DOCTYPE html> (b) <html> (c) </head> (d) <body>
  36. 36.🌐 Which one turns HTML into a page? (a) a web browser (b) a code editor (c) a web server
  37. 37.📋 Which list tag is an unordered list? (a) <ol> (b) <li> (c) <ul>
  38. 38.💬 How many paragraphs show on the page?
    <!-- <p>Good morning!</p> -->
    <p>The red kite</p>
    <p>I love mangoes.</p>
  39. 39.💬 Does the browser show comments on the page? (a) No (b) Yes
  40. 40.🖼️ Which picture file does the browser load?
    <img src="fort.jpg" alt="An old fort" width="50">
    (a) kite.png (b) fort.jpg (c) tiger.jpg (d) An old fort

Answer key

  1. in the same tab
  2. <h1>
  3. in a new tab
  4. 3
  5. Yes
  6. 2
  7. Good morning!
  8. kite.png
  9. Yes
  10. </h2>
  11. to leave notes
  12. https://example.com
  13. in the head
  14. opens it in a new tab
  15. src
  16. </p>
  17. False
  18. Cricket is fun.
  19. Hello, world!
  20. False
  21. in the body
  22. 5
  23. False
  24. <h1>
  25. line 3
  26. 1
  27. True
  28. hosts websites online
  29. Yes
  30. turns HTML into a page
  31. width
  32. True
  33. True
  34. 4
  35. <!DOCTYPE html>
  36. a web browser
  37. <ul>
  38. 2
  39. No
  40. fort.jpg

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