← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 287 · 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 code links to about.html? (a) <a href="about.html"> (b) <a src="about.html"> (c) <a alt="about.html"> (d) <link about.html>
  2. 2.📋 Does this list show bullets or numbers?
    <ul>
      <li>Mango</li>
      <li>Guava</li>
      <li>Orange</li>
    </ul>
    (a) numbers (b) bullets
  3. 3.🌐 Which one is where we type code? (a) a web browser (b) a web server (c) a code editor
  4. 4.True or false: in <img>, height is read by screen readers. (a) True (b) False
  5. 5.📝 Does <img> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  6. 6.💬 How many paragraphs show on the page?
    <p>Good morning!</p>
    <!-- <p>The red kite</p> -->
    <!-- <p>Rain today</p> -->
    <!-- <p>Fun facts</p> -->
  7. 7.🖼️ Which picture file does the browser load?
    <img src="dog.jpg" alt="A happy dog" width="150">
    (a) bus.jpg (b) dog.jpg (c) moon.png (d) A happy dog
  8. 8.🔠 Which tag is the least important heading? (a) <p> (b) <h3> (c) <h1> (d) <h6>
  9. 9.💬 How many paragraphs show on the page?
    <p>Rain today</p>
    <!-- <p>My pets</p> -->
    <p>The red kite</p>
    <p>Our school trip</p>
    <p>My best friend</p>
  10. 10.🔗 Where does this link open?
    <a href="news.html" target="_blank">School news</a>
    (a) in a new tab (b) in the same tab
  11. 11.Which of these is true of a web browser? (a) saves our .html files (b) has an address bar (c) is where we type code (d) shows line numbers
  12. 12.True or false: a code editor shows pages from the web. (a) False (b) True
  13. 13.📋 Which tag goes around each item of a list? (a) <li> (b) <p> (c) <ol> (d) <ul>
  14. 14.🔠 Which heading shows the BIGGEST text: <h6>, <h3>, <h1> or <h2>? (a) <h6> (b) <h3> (c) <h2> (d) <h1>
  15. 15.🔗 Which address opens when you click this link?
    <a href="https://example.com">Art corner</a>
    (a) maths.html (b) https://example.com (c) art.html (d) Art corner
  16. 16.🔍 Which line is missing its closing tag?
    line 1: <strong>Fun facts</strong>
    line 2: <u>Hello, world!</u>
    line 3: <h2>Good morning!
    (a) line 1 (b) line 2 (c) line 3
  17. 17.🔠 How many heading levels does HTML have? (a) 10 (b) 4 (c) 3 (d) 6
  18. 18.True or false: <h1> has a closing tag. (a) False (b) True
  19. 19.📝 What do we need to write HTML? (a) a plain text editor (b) a microphone (c) a paintbrush (d) a printer
  20. 20.🔗 Where does this link open?
    <a href="quiz.html" target="_blank">Maths fun</a>
    (a) in the same tab (b) in a new tab
  21. 21.📋 What number does the browser show next to “Guava”?
    <ol start="4">
      <li>Orange</li>
      <li>Jamun</li>
      <li>Litchi</li>
      <li>Guava</li>
      <li>Banana</li>
      <li>Grapes</li>
    </ol>
  22. 22.🔗 Which words do you click on?
    <a href="about.html">Play games</a>
    (a) about.html (b) About us (c) href (d) Play games
  23. 23.True or false: <ol> shows 1, 2, 3 numbers. (a) False (b) True
  24. 24.🔗 Which tag makes a clickable link? (a) <img> (b) <link> (c) <p> (d) <a>
  25. 25.🔗 Which attribute holds the address of a link? (a) href (b) src (c) id (d) alt
  26. 26.🔗 Where does this link open?
    <a href="news.html">Visit the site</a>
    (a) in the same tab (b) in a new tab
  27. 27.🏷️ Is <b> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  28. 28.🔗 Which address opens when you click this link?
    <a href="games.html">Take the quiz</a>
    (a) contact.html (b) about.html (c) Take the quiz (d) games.html
  29. 29.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as 5 spaces (b) as a new line (c) as a dot (d) as one space
  30. 30.💬 Which text will NOT show on the page?
    <!-- <p>Cricket is fun.</p> -->
    <p>My pets</p>
    <p>My best friend</p>
    <p>Fun facts</p>
    (a) My best friend (b) Fun facts (c) My pets (d) Cricket is fun.
  31. 31.🖼️ How many pixels wide is the picture drawn?
    <img src="map.png" alt="Map of India" width="100">
  32. 32.🔠 How many <h1> headings should a page usually have? (a) 10 (b) 6 (c) 1 (d) 3
  33. 33.🔠 How many headings are in this code?
    <h1>The red kite</h1>
    <h4>Hello, world!</h4>
    <h2>Cricket is fun.</h2>
    <p>My pets</p>
    <p>The red kite</p>
  34. 34.📝 On how many lines does the browser show this paragraph?
    <p>Kites fly high<br>Stars shine<br>Birds sing</p>
  35. 35.📄 Where does <p> go: in the head or in the body? (a) in the body (b) in the head
  36. 36.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Class 7 Blog</title>
    </head>
    <body>
      <h1>Welcome!</h1>
      <p>Thanks for visiting.</p>
    </body>
    </html>
    (a) Welcome! (b) Class 7 Blog (c) body (d) Thanks for visiting.
  37. 37.Which of these is true of a code editor? (a) has an address bar (b) saves our .html files (c) turns HTML into a page (d) shows pages from the web
  38. 38.📋 Which list suits a shopping list in any order? (a) <hr> (b) <ul> (c) <ol> (d) <br>
  39. 39.🌐 Which one has an address bar? (a) a web browser (b) a code editor (c) a web server
  40. 40.🔗 Which words do you click on?
    <a href="quiz.html">Art corner</a>
    (a) Art corner (b) href (c) quiz.html (d) School news

Answer key

  1. <a href="about.html">
  2. bullets
  3. a code editor
  4. False
  5. an empty tag
  6. 1
  7. dog.jpg
  8. <h6>
  9. 4
  10. in a new tab
  11. has an address bar
  12. False
  13. <li>
  14. <h1>
  15. https://example.com
  16. line 3
  17. 6
  18. True
  19. a plain text editor
  20. in a new tab
  21. 7
  22. Play games
  23. True
  24. <a>
  25. href
  26. in the same tab
  27. an opening tag
  28. games.html
  29. as one space
  30. Cricket is fun.
  31. 100
  32. 1
  33. 3
  34. 3
  35. in the body
  36. Welcome!
  37. saves our .html files
  38. <ul>
  39. a web browser
  40. Art corner

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