← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 951 · 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.📋 How many items does this list show?
    <ol>
      <li>Grapes</li>
      <li>Orange</li>
    </ol>
  2. 2.True or false: a web browser is where we type code. (a) False (b) True
  3. 3.💬 Which text will NOT show on the page?
    <p>Hello, world!</p>
    <p>I love mangoes.</p>
    <p>Cricket is fun.</p>
    <!-- <p>Fun facts</p> -->
    (a) Cricket is fun. (b) Fun facts (c) Hello, world! (d) I love mangoes.
  4. 4.🖼️ Which attribute of <img> shows if the image fails? (a) width (b) src (c) alt (d) height
  5. 5.📄 What is the first line of an HTML5 page? (a) <body> (b) <html> (c) <!DOCTYPE html> (d) <head>
  6. 6.💬 How does an HTML comment end? (a) */ (b) // (c) >> (d) -->
  7. 7.🌐 Which one opens web pages for us? (a) a code editor (b) a web server (c) a web browser
  8. 8.🔗 Which words do you click on?
    <a href="about.html">Take the quiz</a>
    (a) Play games (b) href (c) about.html (d) Take the quiz
  9. 9.🏷️ HTML marks up text using ___. (a) tags (b) keys (c) wires (d) pixels
  10. 10.📋 How many items does this list show?
    <ul>
      <li>Banana</li>
      <li>Jamun</li>
    </ul>
  11. 11.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as 5 spaces (b) as one space (c) as a dot (d) as a new line
  12. 12.🔠 Which heading shows the BIGGEST text: <h1>, <h3>, <h6> or <h2>? (a) <h1> (b) <h6> (c) <h3> (d) <h2>
  13. 13.📋 Which list tag shows bullet points? (a) <ul> (b) <ol> (c) <li>
  14. 14.🌐 Which one hosts websites online? (a) a code editor (b) a web server (c) a web browser
  15. 15.📝 How many paragraphs does this code make?
    <p>Cricket is fun.</p>
    <h2>I love mangoes.</h2>
    <p>I love mangoes.</p>
  16. 16.🔗 Which words do you click on?
    <a href="art.html">Play games</a>
    (a) art.html (b) Play games (c) href (d) About us
  17. 17.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
  18. 18.🏷️ Every HTML tag starts with which sign? (a) { (b) ( (c) [ (d) <
  19. 19.📝 On how many lines does the browser show this paragraph?
    <p>Kites fly high<br>Sky is blue</p>
  20. 20.📝 How many paragraphs does this code make?
    <p>My pets</p>
    <p>I love mangoes.</p>
    <h2>Good morning!</h2>
  21. 21.🔗 Which attribute holds the address of a link? (a) href (b) src (c) alt (d) id
  22. 22.📝 On how many lines does the browser show this paragraph?
    <p>Roses are red<br>Rivers flow<br>Kites fly high<br>Stars shine</p>
  23. 23.🔠 How many headings are in this code?
    <h1>Hello, world!</h1>
    <p>Hello, world!</p>
    <h2>The red kite</h2>
  24. 24.📄 Where does the text of <title> appear? (a) nowhere (b) on the browser tab (c) in a big heading (d) at the bottom
  25. 25.🔗 Which address opens when you click this link?
    <a href="https://example.com">School news</a>
    (a) maths.html (b) art.html (c) School news (d) https://example.com
  26. 26.📝 Does <br> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  27. 27.📝 What does <p> make? (a) a table (b) a picture (c) a paragraph (d) a link
  28. 28.🧱 HTML gives a web page its ___. (a) sound (b) structure (c) speed (d) colours
  29. 29.🔍 Which is the odd one out? (a) turns HTML into a page (b) saves our .html files (c) shows pages from the web (d) opens web pages for us
  30. 30.🌐 Which one answers page requests? (a) a web browser (b) a code editor (c) a web server
  31. 31.📋 Does this list show bullets or numbers?
    <ol>
      <li>Mango</li>
      <li>Orange</li>
      <li>Jamun</li>
    </ol>
    (a) numbers (b) bullets
  32. 32.🔢 In a basic web page file, which comes LAST? (a) <body> (b) <html> (c) </html> (d) <!DOCTYPE html>
  33. 33.🔠 Which heading shows the BIGGEST text: <h6>, <h5>, <h3> or <h4>? (a) <h6> (b) <h5> (c) <h4> (d) <h3>
  34. 34.🔗 Where does this link open?
    <a href="about.html">Maths fun</a>
    (a) in the same tab (b) in a new tab
  35. 35.💬 How many paragraphs show on the page?
    <!-- <p>My pets</p> -->
    <!-- <p>Hello, world!</p> -->
    <p>Our school trip</p>
    <!-- <p>Cricket is fun.</p> -->
  36. 36.📄 Can HTML on its own add up two numbers? (a) No (b) Yes
  37. 37.🖼️ Why do we add alt text to an image? (a) to make it bigger (b) to colour it (c) to describe the image (d) to load it faster
  38. 38.True or false: HTML on its own cannot make bullet lists. (a) False (b) True
  39. 39.📝 Does <ul> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  40. 40.🔗 Which words do you click on?
    <a href="news.html">School news</a>
    (a) href (b) School news (c) news.html (d) Take the quiz

Answer key

  1. 2
  2. False
  3. Fun facts
  4. alt
  5. <!DOCTYPE html>
  6. -->
  7. a web browser
  8. Take the quiz
  9. tags
  10. 2
  11. as one space
  12. <h1>
  13. <ul>
  14. a web server
  15. 2
  16. Play games
  17. Yes
  18. <
  19. 2
  20. 2
  21. href
  22. 4
  23. 2
  24. on the browser tab
  25. https://example.com
  26. an empty tag
  27. a paragraph
  28. structure
  29. saves our .html files
  30. a web server
  31. numbers
  32. </html>
  33. <h3>
  34. in the same tab
  35. 1
  36. No
  37. to describe the image
  38. False
  39. has a closing tag
  40. School news

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