← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 145 · 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 makes a clickable link? (a) <link> (b) <a> (c) <img> (d) <p>
  2. 2.🔠 How many <h1> headings should a page usually have? (a) 1 (b) 10 (c) 3 (d) 6
  3. 3.True or false: <a> goes in the head. (a) True (b) False
  4. 4.🏷️ Is <b> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  5. 5.True or false: <ul> is one item of a list. (a) True (b) False
  6. 6.💬 Which text will NOT show on the page?
    <p>My best friend</p>
    <!-- <p>My pets</p> -->
    <p>The red kite</p>
    (a) The red kite (b) My best friend (c) My pets
  7. 7.True or false: <ul> goes in the head. (a) False (b) True
  8. 8.🔗 Which code links to about.html? (a) <link about.html> (b) <a alt="about.html"> (c) <a href="about.html"> (d) <a src="about.html">
  9. 9.🔠 Which heading shows the SMALLEST text: <h1>, <h4>, <h2> or <h6>? (a) <h1> (b) <h2> (c) <h6> (d) <h4>
  10. 10.🖼️ Which tag puts a picture on a page? (a) <a> (b) <pic> (c) <img> (d) <p>
  11. 11.📝 On how many lines does the browser show this paragraph?
    <p>Stars shine<br>Roses are red</p>
  12. 12.🔍 Which line is missing its closing tag?
    line 1: <h2>The red kite</h2>
    line 2: <h1>I love mangoes.</h1>
    line 3: <em>Good morning!
    (a) line 1 (b) line 2 (c) line 3
  13. 13.🔠 Which heading shows the SMALLEST text: <h3>, <h2>, <h6> or <h5>? (a) <h3> (b) <h5> (c) <h2> (d) <h6>
  14. 14.Which of these is true of a code editor? (a) stores a website’s files (b) is where we type code (c) turns HTML into a page (d) shows pages from the web
  15. 15.📄 Can HTML on its own keep a high score? (a) No (b) Yes
  16. 16.🔍 Which line is missing its closing tag?
    line 1: <h2>Good morning!</h2>
    line 2: <h3>I love mangoes.</h3>
    line 3: <u>Our school trip
    (a) line 1 (b) line 3 (c) line 2
  17. 17.🖼️ Which picture file does the browser load?
    <img src="kite.png" alt="A red kite" width="250">
    (a) kite.png (b) A red kite (c) cake.jpg (d) map.png
  18. 18.🌐 Which one saves our .html files? (a) a web server (b) a code editor (c) a web browser
  19. 19.💬 Which text will NOT show on the page?
    <p>My best friend</p>
    <p>The red kite</p>
    <p>Fun facts</p>
    <!-- <p>My pets</p> -->
    (a) The red kite (b) My best friend (c) My pets (d) Fun facts
  20. 20.🔗 Where does this link open?
    <a href="news.html">Play games</a>
    (a) in the same tab (b) in a new tab
  21. 21.💬 How many paragraphs show on the page?
    <p>My best friend</p>
    <p>Cricket is fun.</p>
    <p>Rain today</p>
    <!-- <p>My pets</p> -->
  22. 22.🔍 One closing tag is missing. Which one?
    <em>The red kite</em>
    <i>My best friend
    <p>Our school trip</p>
    (a) </i> (b) </em> (c) </p> (d) </strong>
  23. 23.🔠 Which heading shows the SMALLEST text: <h5>, <h2>, <h4> or <h6>? (a) <h2> (b) <h4> (c) <h5> (d) <h6>
  24. 24.🔠 How many heading levels does HTML have? (a) 10 (b) 4 (c) 6 (d) 3
  25. 25.Which of these is a closing tag? (a) <title> (b) <h1> (c) <b> (d) </p>
  26. 26.🖼️ Which attribute of <img> describes the picture? (a) height (b) width (c) src (d) alt
  27. 27.🔠 How many headings are in this code?
    <h1>My best friend</h1>
    <p>My pets</p>
    <h3>My best friend</h3>
    <h3>My best friend</h3>
    <h4>Cricket is fun.</h4>
  28. 28.🖼️ Which picture file does the browser load?
    <img src="bus.jpg" alt="Our school bus" width="150">
    (a) Our school bus (b) tiger.jpg (c) fort.jpg (d) bus.jpg
  29. 29.📝 What does <p> make? (a) a table (b) a link (c) a picture (d) a paragraph
  30. 30.🔤 In “HTML”, what does the M stand for? (a) Markup (b) Mouse (c) Modern (d) Machine
  31. 31.Which of these is an empty tag? (a) <h1> (b) <b> (c) <li> (d) <br>
  32. 32.📛 In <a href="x.html">, what is href? (a) a closing tag (b) a comment (c) an element name (d) an attribute
  33. 33.🔠 Are headings shown in bold by default? (a) Yes (b) No
  34. 34.🏷️ Which is the closing tag for <u>? (a) <u> (b) </u> (c) <\u> (d) <u/>
  35. 35.🔗 Which words do you click on?
    <a href="contact.html">About us</a>
    (a) contact.html (b) href (c) Contact us (d) About us
  36. 36.💬 How many paragraphs show on the page?
    <p>Fun facts</p>
    <!-- <p>Cricket is fun.</p> -->
    <p>Hello, world!</p>
  37. 37.🖼️ Why do we add alt text to an image? (a) to make it bigger (b) to colour it (c) to load it faster (d) to describe the image
  38. 38.📝 How many paragraphs does this code make?
    <p>My pets</p>
    <p>I love mangoes.</p>
    <h2>Fun facts</h2>
    <h2>Fun facts</h2>
    <p>Cricket is fun.</p>
  39. 39.🖼️ How many pixels wide is the picture drawn?
    <img src="map.png" alt="Map of India" width="250">
  40. 40.True or false: <li> shows bullet points. (a) True (b) False

Answer key

  1. <a>
  2. 1
  3. False
  4. an opening tag
  5. False
  6. My pets
  7. False
  8. <a href="about.html">
  9. <h6>
  10. <img>
  11. 2
  12. line 3
  13. <h6>
  14. is where we type code
  15. No
  16. line 3
  17. kite.png
  18. a code editor
  19. My pets
  20. in the same tab
  21. 3
  22. </i>
  23. <h6>
  24. 6
  25. </p>
  26. alt
  27. 4
  28. bus.jpg
  29. a paragraph
  30. Markup
  31. <br>
  32. an attribute
  33. Yes
  34. </u>
  35. About us
  36. 2
  37. to describe the image
  38. 3
  39. 250
  40. False

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