← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 134 · 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 tag goes around each item of a list? (a) <li> (b) <p> (c) <ul> (d) <ol>
  2. 2.🖼️ How many pixels wide is the picture drawn?
    <img src="fort.jpg" alt="An old fort" width="400">
  3. 3.Which of these is true of a code editor? (a) shows pages from the web (b) opens web pages for us (c) has an address bar (d) is where we type code
  4. 4.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="cake.jpg" alt="Birthday cake" width="150">
    (a) A happy dog (b) Birthday cake (c) width (d) cake.jpg
  5. 5.🔢 In a basic web page file, which comes first: “<html>” or “</html>”? (a) <html> (b) </html>
  6. 6.🏷️ Which is the closing tag for <i>? (a) <i> (b) <i/> (c) </i> (d) <\i>
  7. 7.🔠 Which heading shows the SMALLEST text: <h2>, <h1>, <h5> or <h6>? (a) <h2> (b) <h5> (c) <h1> (d) <h6>
  8. 8.🔍 One closing tag is missing. Which one?
    <i>Rain today</i>
    <small>The red kite</small>
    <h1>Cricket is fun.
    (a) </i> (b) </h1> (c) </small> (d) </b>
  9. 9.📝 What does <br> do? (a) adds a picture (b) makes a list (c) starts a new line (d) makes text bold
  10. 10.🔍 One closing tag is missing. Which one?
    <i>Cricket is fun.</i>
    <h2>My pets
    <strong>Our school trip</strong>
    (a) </i> (b) </strong> (c) </h1> (d) </h2>
  11. 11.True or false: in <img>, alt tells which image to load. (a) False (b) True
  12. 12.📄 Where does <p> go: in the head or in the body? (a) in the head (b) in the body
  13. 13.🏷️ Is </title> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  14. 14.True or false: a code editor opens web pages for us. (a) True (b) False
  15. 15.🔗 What does target="_blank" do to a link? (a) opens it in a new tab (b) hides the link (c) makes it bold (d) makes it blank
  16. 16.🔠 Which heading shows the SMALLEST text: <h1>, <h2>, <h5> or <h3>? (a) <h5> (b) <h3> (c) <h2> (d) <h1>
  17. 17.🔠 How many headings are in this code?
    <h1>Cricket is fun.</h1>
    <p>Good morning!</p>
    <p>My pets</p>
    <h4>Fun facts</h4>
    <h3>The red kite</h3>
  18. 18.🔗 Which code links to about.html? (a) <a href="about.html"> (b) <link about.html> (c) <a alt="about.html"> (d) <a src="about.html">
  19. 19.💬 How does an HTML comment start? (a) // (b) <!-- (c) # (d) /*
  20. 20.True or false: <ol> goes inside ul or ol. (a) False (b) True
  21. 21.🏷️ Which is the closing tag for <h2>? (a) <h2/> (b) <h2> (c) <\h2> (d) </h2>
  22. 22.Which of these is true of a web browser? (a) shows line numbers (b) saves our .html files (c) stores a website’s files (d) turns HTML into a page
  23. 23.💬 Which text will NOT show on the page?
    <p>Our school trip</p>
    <p>Good morning!</p>
    <!-- <p>My best friend</p> -->
    <p>My pets</p>
    (a) Our school trip (b) Good morning! (c) My best friend (d) My pets
  24. 24.💬 How many paragraphs show on the page?
    <p>My pets</p>
    <p>Fun facts</p>
    <p>Rain today</p>
    <!-- <p>I love mangoes.</p> -->
  25. 25.True or false: <style> goes in the body. (a) False (b) True
  26. 26.🔗 Which address opens when you click this link?
    <a href="news.html">Contact us</a>
    (a) quiz.html (b) games.html (c) Contact us (d) news.html
  27. 27.📋 Which list tag is an ordered list? (a) <li> (b) <ul> (c) <ol>
  28. 28.💬 How many paragraphs show on the page?
    <p>My pets</p>
    <!-- <p>Good morning!</p> -->
    <p>Fun facts</p>
  29. 29.True or false: a code editor saves our .html files. (a) True (b) False
  30. 30.📋 What number does the browser show next to “Jamun”?
    <ol start="2">
      <li>Banana</li>
      <li>Guava</li>
      <li>Jamun</li>
      <li>Papaya</li>
    </ol>
  31. 31.🌐 Which one is where we type code? (a) a web server (b) a code editor (c) a web browser
  32. 32.📋 Does this list show bullets or numbers?
    <ul>
      <li>Banana</li>
      <li>Guava</li>
    </ul>
    (a) bullets (b) numbers
  33. 33.True or false: <ul> has a closing tag. (a) True (b) False
  34. 34.🔗 Which address opens when you click this link?
    <a href="about.html">Visit the site</a>
    (a) https://example.com (b) contact.html (c) about.html (d) Visit the site
  35. 35.💬 How many paragraphs show on the page?
    <!-- <p>My best friend</p> -->
    <!-- <p>My pets</p> -->
    <!-- <p>I love mangoes.</p> -->
    <!-- <p>Good morning!</p> -->
    <p>Cricket is fun.</p>
  36. 36.True or false: <li> is one item of a list. (a) True (b) False
  37. 37.🏷️ Is <p> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  38. 38.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
  39. 39.🔠 Which heading shows the BIGGEST text: <h1>, <h4>, <h5> or <h6>? (a) <h4> (b) <h5> (c) <h6> (d) <h1>
  40. 40.📄 Where does <h1> go: in the head or in the body? (a) in the body (b) in the head

Answer key

  1. <li>
  2. 400
  3. is where we type code
  4. Birthday cake
  5. <html>
  6. </i>
  7. <h6>
  8. </h1>
  9. starts a new line
  10. </h2>
  11. False
  12. in the body
  13. a closing tag
  14. False
  15. opens it in a new tab
  16. <h5>
  17. 3
  18. <a href="about.html">
  19. <!--
  20. False
  21. </h2>
  22. turns HTML into a page
  23. My best friend
  24. 3
  25. False
  26. news.html
  27. <ol>
  28. 2
  29. True
  30. 4
  31. a code editor
  32. bullets
  33. True
  34. about.html
  35. 1
  36. True
  37. an opening tag
  38. Yes
  39. <h1>
  40. in the body

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