← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 206 · 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.💾 A web page file usually ends with which extension? (a) .html (b) .mp3 (c) .txt (d) .png
  2. 2.Which of these is true of a web server? (a) colours code to help us (b) turns HTML into a page (c) is where we type code (d) answers page requests
  3. 3.🔗 Which words do you click on?
    <a href="quiz.html">Visit the site</a>
    (a) quiz.html (b) Maths fun (c) href (d) Visit the site
  4. 4.🔢 In a basic web page file, which comes first: “</html>” or “<!DOCTYPE html>”? (a) </html> (b) <!DOCTYPE html>
  5. 5.🔍 Which line is missing its closing tag?
    line 1: <h2>Our school trip</h2>
    line 2: <b>Good morning!</b>
    line 3: <h1>The red kite
    (a) line 1 (b) line 3 (c) line 2
  6. 6.🌐 Which one shows pages from the web? (a) a code editor (b) a web server (c) a web browser
  7. 7.🔗 Where does this link open?
    <a href="https://example.com" target="_blank">Play games</a>
    (a) in a new tab (b) in the same tab
  8. 8.📝 On how many lines does the browser show this paragraph?
    <p>Rivers flow<br>Kites fly high<br>Birds sing<br>Stars shine</p>
  9. 9.🔍 Which line is missing its closing tag?
    line 1: <u>Rain today
    line 2: <p>Cricket is fun.</p>
    line 3: <h3>My best friend</h3>
    (a) line 2 (b) line 3 (c) line 1
  10. 10.💬 How many paragraphs show on the page?
    <!-- <p>Our school trip</p> -->
    <p>Good morning!</p>
    <!-- <p>Rain today</p> -->
    <!-- <p>My best friend</p> -->
  11. 11.🔠 Which heading shows the BIGGEST text: <h1>, <h2>, <h4> or <h6>? (a) <h6> (b) <h1> (c) <h4> (d) <h2>
  12. 12.📋 Does this list show bullets or numbers?
    <ol>
      <li>Mango</li>
      <li>Papaya</li>
      <li>Guava</li>
    </ol>
    (a) numbers (b) bullets
  13. 13.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
  14. 14.🖼️ Which attribute of <img> tells which image to load? (a) alt (b) height (c) width (d) src
  15. 15.🏷️ Is </li> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  16. 16.True or false: a code editor is where we type code. (a) False (b) True
  17. 17.🖼️ Which attribute of <img> shows if the image fails? (a) alt (b) src (c) width (d) height
  18. 18.🏷️ Is <p> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  19. 19.💬 Which text will NOT show on the page?
    <p>Hello, world!</p>
    <!-- <p>Good morning!</p> -->
    <p>Fun facts</p>
    <p>I love mangoes.</p>
    (a) I love mangoes. (b) Hello, world! (c) Fun facts (d) Good morning!
  20. 20.💬 Which text will NOT show on the page?
    <p>My pets</p>
    <p>I love mangoes.</p>
    <!-- <p>Cricket is fun.</p> -->
    (a) Cricket is fun. (b) My pets (c) I love mangoes.
  21. 21.True or false: <img> has a closing tag. (a) True (b) False
  22. 22.💬 Why do coders write comments? (a) to add colour (b) to leave notes (c) to make links (d) to show pictures
  23. 23.🔗 Where does this link open?
    <a href="maths.html">Maths fun</a>
    (a) in the same tab (b) in a new tab
  24. 24.📝 Does <input> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  25. 25.🔗 Which attribute holds the address of a link? (a) id (b) href (c) src (d) alt
  26. 26.📝 What does <br> do? (a) starts a new line (b) adds a picture (c) makes text bold (d) makes a list
  27. 27.📝 What does <hr> draw? (a) a table (b) a link (c) a picture (d) a line across the page
  28. 28.📋 Does this list show bullets or numbers?
    <ol>
      <li>Litchi</li>
      <li>Jamun</li>
      <li>Guava</li>
    </ol>
    (a) bullets (b) numbers
  29. 29.True or false: HTML on its own can make tables. (a) True (b) False
  30. 30.💬 Which text will NOT show on the page?
    <!-- <p>My pets</p> -->
    <p>I love mangoes.</p>
    <p>Hello, world!</p>
    (a) My pets (b) Hello, world! (c) I love mangoes.
  31. 31.💬 Does the browser show comments on the page? (a) No (b) Yes
  32. 32.🔗 Which words do you click on?
    <a href="games.html">School news</a>
    (a) games.html (b) Take the quiz (c) School news (d) href
  33. 33.🔠 How many <h1> headings should a page usually have? (a) 1 (b) 10 (c) 6 (d) 3
  34. 34.True or false: <img> is an empty tag. (a) False (b) True
  35. 35.🔗 Which address opens when you click this link?
    <a href="art.html">Visit the site</a>
    (a) quiz.html (b) art.html (c) Visit the site (d) news.html
  36. 36.📋 Which list suits a shopping list in any order? (a) <ol> (b) <hr> (c) <br> (d) <ul>
  37. 37.🏷️ Is <body> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  38. 38.🔠 Which tag is used for the main title on a page? (a) <br> (b) <h6> (c) <p> (d) <h1>
  39. 39.🔗 Which address opens when you click this link?
    <a href="maths.html">Visit the site</a>
    (a) art.html (b) Visit the site (c) news.html (d) maths.html
  40. 40.🔗 Which words do you click on?
    <a href="maths.html">Take the quiz</a>
    (a) href (b) Play games (c) Take the quiz (d) maths.html

Answer key

  1. .html
  2. answers page requests
  3. Visit the site
  4. <!DOCTYPE html>
  5. line 3
  6. a web browser
  7. in a new tab
  8. 4
  9. line 1
  10. 1
  11. <h1>
  12. numbers
  13. Yes
  14. src
  15. a closing tag
  16. True
  17. alt
  18. an opening tag
  19. Good morning!
  20. Cricket is fun.
  21. False
  22. to leave notes
  23. in the same tab
  24. an empty tag
  25. href
  26. starts a new line
  27. a line across the page
  28. numbers
  29. True
  30. My pets
  31. No
  32. School news
  33. 1
  34. True
  35. art.html
  36. <ul>
  37. an opening tag
  38. <h1>
  39. maths.html
  40. Take the quiz

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