← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 513 · 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 of these is a closing tag? (a) <b> (b) </p> (c) <title> (d) <h1>
  2. 2.📝 What does <p> make? (a) a table (b) a link (c) a picture (d) a paragraph
  3. 3.💬 Does the browser show comments on the page? (a) Yes (b) No
  4. 4.🔍 Which is the odd one out? (a) saves our .html files (b) turns HTML into a page (c) shows line numbers (d) colours code to help us
  5. 5.🖼️ Which attribute of <img> sets how tall it is? (a) alt (b) width (c) src (d) height
  6. 6.💬 How many paragraphs show on the page?
    <p>My best friend</p>
    <p>The red kite</p>
    <!-- <p>Our school trip</p> -->
  7. 7.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="bus.jpg" alt="Our school bus" width="200">
    (a) width (b) Our school bus (c) bus.jpg (d) An old fort
  8. 8.💬 How does an HTML comment start? (a) /* (b) // (c) # (d) <!--
  9. 9.🖼️ Which attribute of <img> names the picture file? (a) width (b) src (c) alt (d) height
  10. 10.🔗 Which attribute holds the address of a link? (a) href (b) id (c) src (d) alt
  11. 11.Which of these is true of a code editor? (a) answers page requests (b) stores a website’s files (c) turns HTML into a page (d) shows line numbers
  12. 12.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
  13. 13.Which of these goes in the body? (a) <img> (b) <title> (c) <meta charset="utf-8"> (d) <style>
  14. 14.📝 How many paragraphs does this code make?
    <p>Fun facts</p>
    <p>My pets</p>
    <p>Rain today</p>
    <p>Our school trip</p>
  15. 15.🔗 Which address opens when you click this link?
    <a href="contact.html">Take the quiz</a>
    (a) Take the quiz (b) https://example.com (c) maths.html (d) contact.html
  16. 16.🔗 Where does this link open?
    <a href="art.html" target="_blank">Art corner</a>
    (a) in a new tab (b) in the same tab
  17. 17.🔍 One closing tag is missing. Which one?
    <i>Cricket is fun.
    <small>I love mangoes.</small>
    <h2>My pets</h2>
    (a) </h3> (b) </small> (c) </i> (d) </h2>
  18. 18.True or false: <ul> shows bullet points. (a) True (b) False
  19. 19.💬 How does an HTML comment end? (a) // (b) --> (c) >> (d) */
  20. 20.🔗 Which address opens when you click this link?
    <a href="games.html">Maths fun</a>
    (a) about.html (b) games.html (c) Maths fun (d) contact.html
  21. 21.🌐 Which one opens web pages for us? (a) a web browser (b) a code editor (c) a web server
  22. 22.🔠 How many headings are in this code?
    <h1>Hello, world!</h1>
    <p>Our school trip</p>
    <p>My best friend</p>
    <h4>Good morning!</h4>
    <p>Good morning!</p>
  23. 23.True or false: <input> is an empty tag. (a) True (b) False
  24. 24.📝 What do we need to write HTML? (a) a microphone (b) a plain text editor (c) a paintbrush (d) a printer
  25. 25.🖼️ Does <img> need a closing tag? (a) Yes (b) No
  26. 26.🖼️ Which attribute of <img> describes the picture? (a) src (b) height (c) width (d) alt
  27. 27.True or false: a web browser is where we type code. (a) False (b) True
  28. 28.💬 How many paragraphs show on the page?
    <!-- <p>Good morning!</p> -->
    <p>Hello, world!</p>
    <p>Fun facts</p>
  29. 29.📄 Where does <p> go: in the head or in the body? (a) in the head (b) in the body
  30. 30.📋 What number does the browser show next to “Banana”?
    <ol start="6">
      <li>Mango</li>
      <li>Banana</li>
      <li>Jamun</li>
    </ol>
  31. 31.💬 How many paragraphs show on the page?
    <!-- <p>Cricket is fun.</p> -->
    <!-- <p>My best friend</p> -->
    <p>Good morning!</p>
    <!-- <p>Rain today</p> -->
  32. 32.True or false: <li> is an empty tag. (a) True (b) False
  33. 33.📋 Which tag goes around each item of a list? (a) <p> (b) <ol> (c) <li> (d) <ul>
  34. 34.True or false: HTML on its own cannot keep a high score. (a) False (b) True
  35. 35.📋 Which list tag is an ordered list? (a) <li> (b) <ul> (c) <ol>
  36. 36.🔠 How many heading levels does HTML have? (a) 10 (b) 3 (c) 6 (d) 4
  37. 37.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
  38. 38.📋 Which list shows the steps of a recipe best? (a) <hr> (b) <ol> (c) <ul> (d) <br>
  39. 39.🔗 Where does this link open?
    <a href="about.html" target="_blank">Art corner</a>
    (a) in a new tab (b) in the same tab
  40. 40.🏷️ Every HTML tag starts with which sign? (a) ( (b) < (c) { (d) [

Answer key

  1. </p>
  2. a paragraph
  3. No
  4. turns HTML into a page
  5. height
  6. 2
  7. Our school bus
  8. <!--
  9. src
  10. href
  11. shows line numbers
  12. Yes
  13. <img>
  14. 4
  15. contact.html
  16. in a new tab
  17. </i>
  18. True
  19. -->
  20. games.html
  21. a web browser
  22. 2
  23. True
  24. a plain text editor
  25. No
  26. alt
  27. False
  28. 2
  29. in the body
  30. 7
  31. 1
  32. False
  33. <li>
  34. True
  35. <ol>
  36. 6
  37. Yes
  38. <ol>
  39. in a new tab
  40. <

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