← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 775 · 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 list shows the steps of a recipe best? (a) <ol> (b) <ul> (c) <br> (d) <hr>
  2. 2.🔠 Which heading shows the SMALLEST text: <h4>, <h5>, <h3> or <h6>? (a) <h6> (b) <h3> (c) <h5> (d) <h4>
  3. 3.True or false: <li> is one item of a list. (a) True (b) False
  4. 4.🔍 Which is the odd one out? (a) colours code to help us (b) hosts websites online (c) saves our .html files (d) is where we type code
  5. 5.🏷️ Which is the closing tag for <u>? (a) <u> (b) <u/> (c) <\u> (d) </u>
  6. 6.True or false: in <img>, width sets how wide it is. (a) True (b) False
  7. 7.🖼️ Does <img> need a closing tag? (a) No (b) Yes
  8. 8.🌐 Which one sends pages over the net? (a) a web server (b) a code editor (c) a web browser
  9. 9.📛 In <a href="x.html">, what is href? (a) a comment (b) a closing tag (c) an attribute (d) an element name
  10. 10.Which of these is an opening tag? (a) </p> (b) <li> (c) </body> (d) </b>
  11. 11.📋 Which list tag shows bullet points? (a) <li> (b) <ul> (c) <ol>
  12. 12.📝 What does <br> do? (a) adds a picture (b) makes a list (c) starts a new line (d) makes text bold
  13. 13.💬 How does an HTML comment start? (a) /* (b) // (c) # (d) <!--
  14. 14.🔗 Which tag makes a clickable link? (a) <p> (b) <a> (c) <link> (d) <img>
  15. 15.💬 Does the browser show comments on the page? (a) No (b) Yes
  16. 16.Which of these goes in the head? (a) <h1> (b) <ul> (c) <img> (d) <meta charset="utf-8">
  17. 17.💬 How many paragraphs show on the page?
    <!-- <p>Hello, world!</p> -->
    <!-- <p>I love mangoes.</p> -->
    <p>Fun facts</p>
    <p>Cricket is fun.</p>
    <p>The red kite</p>
  18. 18.💬 How many paragraphs show on the page?
    <p>Cricket is fun.</p>
    <!-- <p>Hello, world!</p> -->
    <p>Good morning!</p>
    <p>Our school trip</p>
  19. 19.🏷️ What does a closing tag have that an opening tag does not? (a) a dollar $ (b) a slash / (c) a hash # (d) a dot .
  20. 20.🔠 How many heading levels does HTML have? (a) 6 (b) 3 (c) 4 (d) 10
  21. 21.🖼️ Which attribute of <img> is read by screen readers? (a) width (b) height (c) alt (d) src
  22. 22.📝 On how many lines does the browser show this paragraph?
    <p>Sky is blue<br>Stars shine<br>Kites fly high<br>Rivers flow</p>
  23. 23.📄 Can HTML on its own make headings? (a) Yes (b) No
  24. 24.🔗 Where does this link open?
    <a href="https://example.com">Art corner</a>
    (a) in the same tab (b) in a new tab
  25. 25.🖼️ Which attribute of <img> names the picture file? (a) height (b) alt (c) src (d) width
  26. 26.💬 How many paragraphs show on the page?
    <p>Fun facts</p>
    <p>Good morning!</p>
    <!-- <p>The red kite</p> -->
    <!-- <p>I love mangoes.</p> -->
  27. 27.🔍 One closing tag is missing. Which one?
    <p>Good morning!</p>
    <small>Cricket is fun.
    <em>Rain today</em>
    (a) </small> (b) </strong> (c) </p> (d) </em>
  28. 28.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
  29. 29.🔗 Where does this link open?
    <a href="maths.html">Contact us</a>
    (a) in the same tab (b) in a new tab
  30. 30.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
  31. 31.🔠 How many headings are in this code?
    <h1>Good morning!</h1>
    <p>Hello, world!</p>
    <h3>Hello, world!</h3>
    <p>Fun facts</p>
    <p>Hello, world!</p>
  32. 32.True or false: in <img>, src sets how wide it is. (a) True (b) False
  33. 33.💬 How many paragraphs show on the page?
    <p>Hello, world!</p>
    <p>The red kite</p>
    <!-- <p>Cricket is fun.</p> -->
    <p>Fun facts</p>
  34. 34.🌐 Which one opens web pages for us? (a) a web browser (b) a code editor (c) a web server
  35. 35.📋 Which list suits a shopping list in any order? (a) <ul> (b) <br> (c) <hr> (d) <ol>
  36. 36.🖼️ Which attribute of <img> sets how tall it is? (a) height (b) alt (c) width (d) src
  37. 37.🔗 Which address opens when you click this link?
    <a href="maths.html">About us</a>
    (a) About us (b) news.html (c) art.html (d) maths.html
  38. 38.💬 How many paragraphs show on the page?
    <!-- <p>My pets</p> -->
    <!-- <p>Good morning!</p> -->
    <p>My best friend</p>
    <!-- <p>The red kite</p> -->
  39. 39.💬 Which text will NOT show on the page?
    <!-- <p>The red kite</p> -->
    <p>My best friend</p>
    <p>Rain today</p>
    <p>I love mangoes.</p>
    (a) I love mangoes. (b) The red kite (c) Rain today (d) My best friend
  40. 40.📋 Which list tag goes inside ul or ol? (a) <ol> (b) <ul> (c) <li>

Answer key

  1. <ol>
  2. <h6>
  3. True
  4. hosts websites online
  5. </u>
  6. True
  7. No
  8. a web server
  9. an attribute
  10. <li>
  11. <ul>
  12. starts a new line
  13. <!--
  14. <a>
  15. No
  16. <meta charset="utf-8">
  17. 3
  18. 3
  19. a slash /
  20. 6
  21. alt
  22. 4
  23. Yes
  24. in the same tab
  25. src
  26. 2
  27. </small>
  28. Yes
  29. in the same tab
  30. Yes
  31. 2
  32. False
  33. 3
  34. a web browser
  35. <ul>
  36. height
  37. maths.html
  38. 1
  39. The red kite
  40. <li>

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