← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 86 · 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.🔢 In a basic web page file, which comes FIRST? (a) <!DOCTYPE html> (b) <html> (c) <body> (d) <head>
  2. 2.💬 Which text will NOT show on the page?
    <!-- <p>My best friend</p> -->
    <p>I love mangoes.</p>
    <p>Fun facts</p>
    (a) My best friend (b) I love mangoes. (c) Fun facts
  3. 3.🌍 Which program shows a web page to us? (a) a calculator (b) a web browser (c) a music player (d) a paint program
  4. 4.🏷️ Which is the closing tag for <h3>? (a) <h3/> (b) </h3> (c) <\h3> (d) <h3>
  5. 5.🔍 Which is the odd one out? (a) opens web pages for us (b) turns HTML into a page (c) hosts websites online (d) shows pages from the web
  6. 6.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
  7. 7.🔠 Are headings shown in bold by default? (a) Yes (b) No
  8. 8.True or false: in <img>, src describes the picture. (a) True (b) False
  9. 9.🔗 Which address opens when you click this link?
    <a href="news.html">Maths fun</a>
    (a) quiz.html (b) Maths fun (c) games.html (d) news.html
  10. 10.💬 Why do coders write comments? (a) to show pictures (b) to make links (c) to leave notes (d) to add colour
  11. 11.🔗 Which address opens when you click this link?
    <a href="maths.html">Art corner</a>
    (a) Art corner (b) art.html (c) news.html (d) maths.html
  12. 12.Which of these is an opening tag? (a) </p> (b) <li> (c) </h1> (d) </title>
  13. 13.📋 Which list tag is an unordered list? (a) <ul> (b) <ol> (c) <li>
  14. 14.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>My Hobbies</title>
    </head>
    <body>
      <h1>Welcome!</h1>
      <p>Here is my best one.</p>
    </body>
    </html>
    (a) Here is my best one. (b) Welcome! (c) My Hobbies (d) body
  15. 15.True or false: in <img>, alt shows if the image fails. (a) False (b) True
  16. 16.📄 Where does <ul> go: in the head or in the body? (a) in the body (b) in the head
  17. 17.🔍 Which line is missing its closing tag?
    line 1: <h2>Hello, world!</h2>
    line 2: <h3>My best friend
    line 3: <b>My pets</b>
    (a) line 1 (b) line 2 (c) line 3
  18. 18.📋 What number does the browser show next to “Grapes”?
    <ol start="3">
      <li>Papaya</li>
      <li>Orange</li>
      <li>Mango</li>
      <li>Grapes</li>
      <li>Guava</li>
      <li>Jamun</li>
    </ol>
  19. 19.Which of these has a closing tag? (a) <img> (b) <b> (c) <br> (d) <hr>
  20. 20.💬 Which text will NOT show on the page?
    <!-- <p>My pets</p> -->
    <p>Cricket is fun.</p>
    <p>Good morning!</p>
    <p>The red kite</p>
    (a) The red kite (b) Cricket is fun. (c) My pets (d) Good morning!
  21. 21.Which of these is true of a web server? (a) hosts websites online (b) colours code to help us (c) is where we type code (d) has an address bar
  22. 22.Which of these has a closing tag? (a) <br> (b) <hr> (c) <img> (d) <li>
  23. 23.🔠 How many headings are in this code?
    <h1>Good morning!</h1>
    <h2>I love mangoes.</h2>
    <h4>My pets</h4>
    <p>I love mangoes.</p>
    <p>My best friend</p>
  24. 24.Which of these is an empty tag? (a) <li> (b) <h1> (c) <ul> (d) <br>
  25. 25.🏷️ Is <title> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  26. 26.🏷️ Which is the closing tag for <em>? (a) <em/> (b) <em> (c) </em> (d) <\em>
  27. 27.🔗 Which attribute holds the address of a link? (a) href (b) id (c) src (d) alt
  28. 28.🔠 Which heading shows the SMALLEST text: <h4>, <h2>, <h1> or <h6>? (a) <h2> (b) <h6> (c) <h4> (d) <h1>
  29. 29.🖼️ Why do we add alt text to an image? (a) to load it faster (b) to describe the image (c) to make it bigger (d) to colour it
  30. 30.📄 Where does <img> go: in the head or in the body? (a) in the head (b) in the body
  31. 31.🔠 How many headings are in this code?
    <h1>Our school trip</h1>
    <p>Our school trip</p>
    <p>My pets</p>
  32. 32.🔗 Which code links to about.html? (a) <a href="about.html"> (b) <a alt="about.html"> (c) <link about.html> (d) <a src="about.html">
  33. 33.📋 Does this list show bullets or numbers?
    <ol>
      <li>Banana</li>
      <li>Litchi</li>
    </ol>
    (a) bullets (b) numbers
  34. 34.True or false: <li> goes inside ul or ol. (a) True (b) False
  35. 35.🌐 Which one saves our .html files? (a) a web browser (b) a web server (c) a code editor
  36. 36.Which of these goes in the head? (a) <table> (b) <a> (c) <p> (d) <title>
  37. 37.True or false: in <img>, width is read by screen readers. (a) False (b) True
  38. 38.🔍 Which is the odd one out? (a) stores a website’s files (b) saves our .html files (c) hosts websites online (d) sends pages over the net
  39. 39.📋 Which list tag shows 1, 2, 3 numbers? (a) <ol> (b) <ul> (c) <li>
  40. 40.💬 How many paragraphs show on the page?
    <!-- <p>My pets</p> -->
    <p>I love mangoes.</p>
    <p>Good morning!</p>

Answer key

  1. <!DOCTYPE html>
  2. My best friend
  3. a web browser
  4. </h3>
  5. hosts websites online
  6. Yes
  7. Yes
  8. False
  9. news.html
  10. to leave notes
  11. maths.html
  12. <li>
  13. <ul>
  14. Welcome!
  15. True
  16. in the body
  17. line 2
  18. 6
  19. <b>
  20. My pets
  21. hosts websites online
  22. <li>
  23. 3
  24. <br>
  25. an opening tag
  26. </em>
  27. href
  28. <h6>
  29. to describe the image
  30. in the body
  31. 1
  32. <a href="about.html">
  33. numbers
  34. True
  35. a code editor
  36. <title>
  37. False
  38. saves our .html files
  39. <ol>
  40. 2

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