← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 802 · 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 words do you click on?
    <a href="contact.html">Play games</a>
    (a) href (b) contact.html (c) About us (d) Play games
  2. 2.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Space Facts</title>
    </head>
    <body>
      <h1>My drawings</h1>
      <p>Mars is red.</p>
    </body>
    </html>
    (a) My drawings (b) Space Facts (c) Mars is red. (d) index.html
  3. 3.🔗 Where does this link open?
    <a href="art.html">Art corner</a>
    (a) in a new tab (b) in the same tab
  4. 4.True or false: in <img>, src sets how tall it is. (a) False (b) True
  5. 5.📄 Can HTML on its own add up two numbers? (a) Yes (b) No
  6. 6.🖼️ Which attribute of <img> shows if the image fails? (a) width (b) src (c) alt (d) height
  7. 7.🌐 Which one opens web pages for us? (a) a code editor (b) a web server (c) a web browser
  8. 8.📋 Which list tag lists steps in order? (a) <li> (b) <ol> (c) <ul>
  9. 9.🔠 How many headings are in this code?
    <h1>Fun facts</h1>
    <p>Good morning!</p>
    <p>Cricket is fun.</p>
  10. 10.📝 What does <p> make? (a) a paragraph (b) a picture (c) a table (d) a link
  11. 11.True or false: a web browser shows pages from the web. (a) False (b) True
  12. 12.True or false: <hr> is an empty tag. (a) True (b) False
  13. 13.📝 How many paragraphs does this code make?
    <p>Good morning!</p>
    <p>My pets</p>
    <p>My best friend</p>
    <h2>Fun facts</h2>
  14. 14.🔍 Which is the odd one out? (a) shows line numbers (b) shows pages from the web (c) colours code to help us (d) saves our .html files
  15. 15.🔠 Which heading shows the BIGGEST text: <h6>, <h1>, <h5> or <h3>? (a) <h3> (b) <h6> (c) <h5> (d) <h1>
  16. 16.Which of these is true of a code editor? (a) has an address bar (b) shows pages from the web (c) colours code to help us (d) hosts websites online
  17. 17.True or false: <hr> has a closing tag. (a) True (b) False
  18. 18.🔗 Which address opens when you click this link?
    <a href="https://example.com">Take the quiz</a>
    (a) maths.html (b) art.html (c) https://example.com (d) Take the quiz
  19. 19.True or false: <li> shows bullet points. (a) False (b) True
  20. 20.📄 Can HTML on its own make tables? (a) Yes (b) No
  21. 21.🖼️ Why do we add alt text to an image? (a) to load it faster (b) to make it bigger (c) to describe the image (d) to colour it
  22. 22.🔠 Which heading shows the BIGGEST text: <h4>, <h1>, <h2> or <h3>? (a) <h2> (b) <h3> (c) <h4> (d) <h1>
  23. 23.🔠 Which tag is used for the main title on a page? (a) <p> (b) <h6> (c) <h1> (d) <br>
  24. 24.Which of these goes in the head? (a) <link rel="stylesheet"> (b) <img> (c) <ul> (d) <table>
  25. 25.🔗 Where does this link open?
    <a href="maths.html">Play games</a>
    (a) in the same tab (b) in a new tab
  26. 26.🔠 Are headings shown in bold by default? (a) Yes (b) No
  27. 27.💬 How many paragraphs show on the page?
    <!-- <p>My best friend</p> -->
    <p>Our school trip</p>
    <!-- <p>Good morning!</p> -->
    <p>Hello, world!</p>
    <p>The red kite</p>
  28. 28.True or false: a web browser stores a website’s files. (a) True (b) False
  29. 29.🔍 One closing tag is missing. Which one?
    <u>Cricket is fun.
    <small>Our school trip</small>
    <b>I love mangoes.</b>
    (a) </u> (b) </h3> (c) </b> (d) </small>
  30. 30.🔤 In “HTML”, what do the letters HT stand for? (a) Hot Tags (b) HyperText (c) Home Text (d) High Tech
  31. 31.💬 How many paragraphs show on the page?
    <!-- <p>I love mangoes.</p> -->
    <p>The red kite</p>
    <p>Good morning!</p>
  32. 32.🏷️ What does a closing tag have that an opening tag does not? (a) a dollar $ (b) a hash # (c) a slash / (d) a dot .
  33. 33.📋 Which list suits a shopping list in any order? (a) <ol> (b) <ul> (c) <hr> (d) <br>
  34. 34.🔗 Which address opens when you click this link?
    <a href="games.html">Take the quiz</a>
    (a) about.html (b) Take the quiz (c) games.html (d) contact.html
  35. 35.🌐 Which one shows line numbers? (a) a web server (b) a web browser (c) a code editor
  36. 36.💬 How many paragraphs show on the page?
    <!-- <p>Good morning!</p> -->
    <!-- <p>My pets</p> -->
    <!-- <p>I love mangoes.</p> -->
    <p>Hello, world!</p>
    <!-- <p>Our school trip</p> -->
  37. 37.📝 On how many lines does the browser show this paragraph?
    <p>Sky is blue<br>Kites fly high</p>
  38. 38.💬 How many paragraphs show on the page?
    <p>Our school trip</p>
    <!-- <p>Hello, world!</p> -->
    <!-- <p>My best friend</p> -->
    <!-- <p>Fun facts</p> -->
  39. 39.🔠 How many headings are in this code?
    <h1>Rain today</h1>
    <h4>Rain today</h4>
    <p>The red kite</p>
  40. 40.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="fort.jpg" alt="An old fort" width="50">
    (a) A tiger asleep (b) width (c) An old fort (d) fort.jpg

Answer key

  1. Play games
  2. Space Facts
  3. in the same tab
  4. False
  5. No
  6. alt
  7. a web browser
  8. <ol>
  9. 1
  10. a paragraph
  11. True
  12. True
  13. 3
  14. shows pages from the web
  15. <h1>
  16. colours code to help us
  17. False
  18. https://example.com
  19. False
  20. Yes
  21. to describe the image
  22. <h1>
  23. <h1>
  24. <link rel="stylesheet">
  25. in the same tab
  26. Yes
  27. 3
  28. False
  29. </u>
  30. HyperText
  31. 2
  32. a slash /
  33. <ul>
  34. games.html
  35. a code editor
  36. 1
  37. 2
  38. 1
  39. 2
  40. An old fort

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