← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 813 · 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>I love mangoes.</p> -->
    <p>Hello, world!</p>
    <p>My pets</p>
    (a) Hello, world! (b) I love mangoes. (c) My pets
  2. 2.🖼️ Which attribute of <img> describes the picture? (a) alt (b) width (c) src (d) height
  3. 3.📄 Can HTML on its own add pictures to a page? (a) No (b) Yes
  4. 4.📝 Does <b> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  5. 5.🔠 Which heading shows the BIGGEST text: <h1>, <h4>, <h5> or <h6>? (a) <h4> (b) <h1> (c) <h6> (d) <h5>
  6. 6.🔗 Which address opens when you click this link?
    <a href="quiz.html">Visit the site</a>
    (a) Visit the site (b) quiz.html (c) about.html (d) games.html
  7. 7.📋 What number does the browser show next to “Papaya”?
    <ol>
      <li>Grapes</li>
      <li>Papaya</li>
      <li>Litchi</li>
      <li>Guava</li>
    </ol>
  8. 8.💬 How many paragraphs show on the page?
    <!-- <p>Our school trip</p> -->
    <p>My best friend</p>
    <p>Good morning!</p>
    <p>Hello, world!</p>
    <p>Fun facts</p>
  9. 9.📄 Can HTML on its own make headings? (a) No (b) Yes
  10. 10.🏷️ Is </b> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  11. 11.💾 A web page file usually ends with which extension? (a) .mp3 (b) .png (c) .html (d) .txt
  12. 12.📋 What number does the browser show next to “Orange”?
    <ol start="6">
      <li>Banana</li>
      <li>Orange</li>
      <li>Litchi</li>
    </ol>
  13. 13.📄 Where does <style> go: in the head or in the body? (a) in the body (b) in the head
  14. 14.📄 Can HTML on its own make a form? (a) No (b) Yes
  15. 15.Which of these is true of a web server? (a) stores a website’s files (b) turns HTML into a page (c) shows pages from the web (d) saves our .html files
  16. 16.Which of these is a closing tag? (a) <title> (b) <li> (c) <b> (d) </li>
  17. 17.📝 Does <p> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  18. 18.💬 Which text will NOT show on the page?
    <!-- <p>Good morning!</p> -->
    <p>My pets</p>
    <p>I love mangoes.</p>
    (a) Good morning! (b) I love mangoes. (c) My pets
  19. 19.📝 On how many lines does the browser show this paragraph?
    <p>Birds sing<br>Kites fly high<br>Roses are red<br>Sky is blue<br>Rivers flow</p>
  20. 20.📋 What number does the browser show next to “Mango”?
    <ol>
      <li>Litchi</li>
      <li>Grapes</li>
      <li>Mango</li>
      <li>Papaya</li>
      <li>Orange</li>
    </ol>
  21. 21.🔠 How many headings are in this code?
    <h1>The red kite</h1>
    <h2>My best friend</h2>
    <h3>Fun facts</h3>
  22. 22.🖼️ How many pixels wide is the picture drawn?
    <img src="fort.jpg" alt="An old fort" width="200">
  23. 23.💬 How does an HTML comment end? (a) */ (b) >> (c) // (d) -->
  24. 24.True or false: in <img>, src names the picture file. (a) True (b) False
  25. 25.🖼️ Which attribute of <img> names the picture file? (a) width (b) height (c) alt (d) src
  26. 26.🔠 Which tag is the least important heading? (a) <h3> (b) <h1> (c) <h6> (d) <p>
  27. 27.🔠 How many headings are in this code?
    <h1>Cricket is fun.</h1>
    <p>Fun facts</p>
    <p>I love mangoes.</p>
    <p>Our school trip</p>
  28. 28.🔢 In a basic web page file, which comes LAST? (a) <head> (b) </body> (c) </html> (d) <html>
  29. 29.📋 Which list suits a shopping list in any order? (a) <ol> (b) <ul> (c) <br> (d) <hr>
  30. 30.🌐 Which one shows line numbers? (a) a web browser (b) a code editor (c) a web server
  31. 31.Which of these is true of a code editor? (a) opens web pages for us (b) is where we type code (c) has an address bar (d) turns HTML into a page
  32. 32.🧩 An opening tag + content + a closing tag together make an ___. (a) editor (b) element (c) address (d) attribute
  33. 33.🔠 How many headings are in this code?
    <h1>The red kite</h1>
    <p>I love mangoes.</p>
    <p>The red kite</p>
  34. 34.🔠 Which heading shows the BIGGEST text: <h5>, <h2>, <h3> or <h1>? (a) <h3> (b) <h1> (c) <h2> (d) <h5>
  35. 35.🔍 Which line is missing its closing tag?
    line 1: <strong>My pets</strong>
    line 2: <h3>My best friend
    line 3: <i>Our school trip</i>
    (a) line 1 (b) line 3 (c) line 2
  36. 36.💬 How many paragraphs show on the page?
    <!-- <p>Good morning!</p> -->
    <p>My best friend</p>
    <p>Rain today</p>
    <!-- <p>Our school trip</p> -->
    <p>Fun facts</p>
  37. 37.Which of these goes in the body? (a) <p> (b) <link rel="stylesheet"> (c) <style> (d) <title>
  38. 38.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
  39. 39.🔗 Which words do you click on?
    <a href="art.html">Contact us</a>
    (a) Visit the site (b) href (c) Contact us (d) art.html
  40. 40.📝 On how many lines does the browser show this paragraph?
    <p>Sky is blue<br>Stars shine<br>Birds sing<br>Rivers flow</p>

Answer key

  1. I love mangoes.
  2. alt
  3. Yes
  4. has a closing tag
  5. <h1>
  6. quiz.html
  7. 2
  8. 4
  9. Yes
  10. a closing tag
  11. .html
  12. 7
  13. in the head
  14. Yes
  15. stores a website’s files
  16. </li>
  17. has a closing tag
  18. Good morning!
  19. 5
  20. 3
  21. 3
  22. 200
  23. -->
  24. True
  25. src
  26. <h6>
  27. 1
  28. </html>
  29. <ul>
  30. a code editor
  31. is where we type code
  32. element
  33. 1
  34. <h1>
  35. line 2
  36. 3
  37. <p>
  38. Yes
  39. Contact us
  40. 4

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