← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 124 · 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.🔗 What does target="_blank" do to a link? (a) opens it in a new tab (b) makes it blank (c) makes it bold (d) hides the link
  2. 2.🔗 Which words do you click on?
    <a href="about.html">Play games</a>
    (a) href (b) Play games (c) About us (d) about.html
  3. 3.📝 Does <hr> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  4. 4.True or false: in <img>, alt shows if the image fails. (a) False (b) True
  5. 5.🔍 One closing tag is missing. Which one?
    <strong>Hello, world!</strong>
    <u>I love mangoes.
    <b>Our school trip</b>
    (a) </b> (b) </u> (c) </strong> (d) </p>
  6. 6.🔠 Which heading shows the BIGGEST text: <h1>, <h4>, <h2> or <h5>? (a) <h4> (b) <h1> (c) <h2> (d) <h5>
  7. 7.🔠 Which heading shows the BIGGEST text: <h1>, <h5>, <h3> or <h6>? (a) <h3> (b) <h6> (c) <h5> (d) <h1>
  8. 8.📝 How many paragraphs does this code make?
    <p>Hello, world!</p>
    <p>I love mangoes.</p>
    <h2>Fun facts</h2>
    <p>Rain today</p>
  9. 9.Which of these is true of a code editor? (a) sends pages over the net (b) turns HTML into a page (c) shows line numbers (d) opens web pages for us
  10. 10.🧱 HTML gives a web page its ___. (a) speed (b) colours (c) sound (d) structure
  11. 11.🖼️ How many pixels wide is the picture drawn?
    <img src="cake.jpg" alt="Birthday cake" width="50">
  12. 12.Which of these is true of a web browser? (a) sends pages over the net (b) stores a website’s files (c) answers page requests (d) opens web pages for us
  13. 13.💬 Which text will NOT show on the page?
    <p>Our school trip</p>
    <p>Hello, world!</p>
    <!-- <p>My pets</p> -->
    (a) Hello, world! (b) My pets (c) Our school trip
  14. 14.🔠 How many headings are in this code?
    <h1>Our school trip</h1>
    <h2>Hello, world!</h2>
    <p>My pets</p>
  15. 15.Which of these is true of a code editor? (a) opens web pages for us (b) shows pages from the web (c) saves our .html files (d) answers page requests
  16. 16.True or false: HTML on its own cannot add up two numbers. (a) False (b) True
  17. 17.True or false: <li> goes inside ul or ol. (a) True (b) False
  18. 18.📝 Does <meta> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  19. 19.💬 How many paragraphs show on the page?
    <p>Fun facts</p>
    <!-- <p>Rain today</p> -->
    <p>Cricket is fun.</p>
    <!-- <p>My pets</p> -->
  20. 20.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="dog.jpg" alt="A happy dog" width="150">
    (a) dog.jpg (b) width (c) The full moon (d) A happy dog
  21. 21.True or false: <p> goes in the body. (a) True (b) False
  22. 22.📋 Which list tag lists things in any order? (a) <ol> (b) <li> (c) <ul>
  23. 23.True or false: <title> goes in the head. (a) False (b) True
  24. 24.True or false: a web server is where we type code. (a) False (b) True
  25. 25.🔗 Which address opens when you click this link?
    <a href="news.html">Play games</a>
    (a) games.html (b) news.html (c) Play games (d) quiz.html
  26. 26.🔠 Which heading shows the BIGGEST text: <h2>, <h6>, <h3> or <h4>? (a) <h6> (b) <h3> (c) <h4> (d) <h2>
  27. 27.True or false: <title> goes in the body. (a) True (b) False
  28. 28.🔠 Which heading shows the BIGGEST text: <h1>, <h4>, <h5> or <h6>? (a) <h4> (b) <h1> (c) <h6> (d) <h5>
  29. 29.💬 How does an HTML comment start? (a) <!-- (b) // (c) # (d) /*
  30. 30.Which of these has a closing tag? (a) <p> (b) <meta> (c) <br> (d) <hr>
  31. 31.🔗 Which address opens when you click this link?
    <a href="art.html">Contact us</a>
    (a) quiz.html (b) news.html (c) art.html (d) Contact us
  32. 32.🔠 How many headings are in this code?
    <h1>Rain today</h1>
    <h4>Our school trip</h4>
    <h3>I love mangoes.</h3>
    <h3>The red kite</h3>
    <p>My pets</p>
  33. 33.True or false: HTML on its own can keep a high score. (a) False (b) True
  34. 34.📄 Where does <a> go: in the head or in the body? (a) in the body (b) in the head
  35. 35.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as 5 spaces (b) as a dot (c) as a new line (d) as one space
  36. 36.🔍 One closing tag is missing. Which one?
    <h1>My pets
    <i>Our school trip</i>
    <strong>I love mangoes.</strong>
    (a) </u> (b) </h1> (c) </strong> (d) </i>
  37. 37.📝 What does <p> make? (a) a picture (b) a paragraph (c) a link (d) a table
  38. 38.💬 Why do coders write comments? (a) to add colour (b) to make links (c) to show pictures (d) to leave notes
  39. 39.🖼️ Which tag puts a picture on a page? (a) <p> (b) <pic> (c) <a> (d) <img>
  40. 40.🔗 Which address opens when you click this link?
    <a href="news.html">About us</a>
    (a) games.html (b) news.html (c) About us (d) quiz.html

Answer key

  1. opens it in a new tab
  2. Play games
  3. an empty tag
  4. True
  5. </u>
  6. <h1>
  7. <h1>
  8. 3
  9. shows line numbers
  10. structure
  11. 50
  12. opens web pages for us
  13. My pets
  14. 2
  15. saves our .html files
  16. True
  17. True
  18. an empty tag
  19. 2
  20. A happy dog
  21. True
  22. <ul>
  23. True
  24. False
  25. news.html
  26. <h2>
  27. False
  28. <h1>
  29. <!--
  30. <p>
  31. art.html
  32. 4
  33. False
  34. in the body
  35. as one space
  36. </h1>
  37. a paragraph
  38. to leave notes
  39. <img>
  40. news.html

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