← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 475 · 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 tag is an unordered list? (a) <ol> (b) <ul> (c) <li>
  2. 2.💬 Which text will NOT show on the page?
    <p>Hello, world!</p>
    <p>My pets</p>
    <!-- <p>Cricket is fun.</p> -->
    (a) Cricket is fun. (b) My pets (c) Hello, world!
  3. 3.🔗 Where does this link open?
    <a href="maths.html">Maths fun</a>
    (a) in a new tab (b) in the same tab
  4. 4.🔠 Which heading shows the SMALLEST text: <h1>, <h4>, <h5> or <h3>? (a) <h1> (b) <h4> (c) <h3> (d) <h5>
  5. 5.🌐 Which one colours code to help us? (a) a code editor (b) a web browser (c) a web server
  6. 6.Which of these is true of a web browser? (a) saves our .html files (b) stores a website’s files (c) shows pages from the web (d) is where we type code
  7. 7.🔠 Which heading shows the BIGGEST text: <h5>, <h3>, <h4> or <h1>? (a) <h3> (b) <h5> (c) <h4> (d) <h1>
  8. 8.🖼️ Which attribute of <img> shows if the image fails? (a) height (b) alt (c) width (d) src
  9. 9.💬 Which text will NOT show on the page?
    <!-- <p>Rain today</p> -->
    <p>Cricket is fun.</p>
    <p>Hello, world!</p>
    (a) Cricket is fun. (b) Hello, world! (c) Rain today
  10. 10.💬 Which text will NOT show on the page?
    <!-- <p>Cricket is fun.</p> -->
    <p>My best friend</p>
    <p>Rain today</p>
    (a) My best friend (b) Rain today (c) Cricket is fun.
  11. 11.📋 Which list tag goes inside ul or ol? (a) <ul> (b) <ol> (c) <li>
  12. 12.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="bus.jpg" alt="Our school bus" width="250">
    (a) An old fort (b) bus.jpg (c) Our school bus (d) width
  13. 13.🔤 In “HTML”, what does the M stand for? (a) Modern (b) Mouse (c) Markup (d) Machine
  14. 14.🔗 Which code links to about.html? (a) <a src="about.html"> (b) <a alt="about.html"> (c) <link about.html> (d) <a href="about.html">
  15. 15.🖼️ Which picture file does the browser load?
    <img src="dog.jpg" alt="A happy dog" width="150">
    (a) A happy dog (b) moon.png (c) dog.jpg (d) bus.jpg
  16. 16.💬 How many paragraphs show on the page?
    <p>Good morning!</p>
    <!-- <p>Hello, world!</p> -->
    <!-- <p>Our school trip</p> -->
    <!-- <p>My pets</p> -->
  17. 17.💬 Which text will NOT show on the page?
    <!-- <p>My best friend</p> -->
    <p>Our school trip</p>
    <p>I love mangoes.</p>
    (a) I love mangoes. (b) My best friend (c) Our school trip
  18. 18.🔍 Which line is missing its closing tag?
    line 1: <p>Cricket is fun.
    line 2: <small>Our school trip</small>
    line 3: <h3>I love mangoes.</h3>
    (a) line 3 (b) line 1 (c) line 2
  19. 19.🔍 One closing tag is missing. Which one?
    <u>My pets</u>
    <h2>Good morning!
    <b>Rain today</b>
    (a) </h2> (b) </h1> (c) </u> (d) </b>
  20. 20.🔗 Which words do you click on?
    <a href="https://example.com">Art corner</a>
    (a) href (b) Art corner (c) School news (d) https://example.com
  21. 21.🖼️ Which attribute of <img> names the picture file? (a) width (b) height (c) src (d) alt
  22. 22.Which of these is true of a web server? (a) opens web pages for us (b) turns HTML into a page (c) sends pages over the net (d) is where we type code
  23. 23.🖼️ Which attribute of <img> describes the picture? (a) src (b) alt (c) width (d) height
  24. 24.🔗 Where does this link open?
    <a href="https://example.com" target="_blank">Art corner</a>
    (a) in the same tab (b) in a new tab
  25. 25.💬 How many paragraphs show on the page?
    <p>The red kite</p>
    <!-- <p>Hello, world!</p> -->
    <p>Cricket is fun.</p>
  26. 26.🔠 Which tag is used for the main title on a page? (a) <p> (b) <h6> (c) <h1> (d) <br>
  27. 27.Which of these is an opening tag? (a) </li> (b) </b> (c) <h1> (d) </body>
  28. 28.💬 Which text will NOT show on the page?
    <p>Cricket is fun.</p>
    <p>Rain today</p>
    <p>Fun facts</p>
    <!-- <p>My pets</p> -->
    (a) Cricket is fun. (b) My pets (c) Rain today (d) Fun facts
  29. 29.📝 On how many lines does the browser show this paragraph?
    <p>Roses are red<br>Kites fly high</p>
  30. 30.🌐 Which one hosts websites online? (a) a code editor (b) a web browser (c) a web server
  31. 31.True or false: in <img>, width sets how wide it is. (a) True (b) False
  32. 32.🏷️ Is <b> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  33. 33.🔠 How many <h1> headings should a page usually have? (a) 3 (b) 6 (c) 1 (d) 10
  34. 34.📋 Does this list show bullets or numbers?
    <ol>
      <li>Banana</li>
      <li>Orange</li>
    </ol>
    (a) numbers (b) bullets
  35. 35.True or false: <title> goes in the body. (a) True (b) False
  36. 36.🔍 Which is the odd one out? (a) shows line numbers (b) shows pages from the web (c) opens web pages for us (d) has an address bar
  37. 37.📋 Does this list show bullets or numbers?
    <ol>
      <li>Papaya</li>
      <li>Orange</li>
      <li>Banana</li>
    </ol>
    (a) bullets (b) numbers
  38. 38.🌐 Which one opens web pages for us? (a) a web server (b) a web browser (c) a code editor
  39. 39.📋 Which list suits a shopping list in any order? (a) <br> (b) <hr> (c) <ul> (d) <ol>
  40. 40.🖼️ Which attribute of <img> sets how wide it is? (a) src (b) alt (c) width (d) height

Answer key

  1. <ul>
  2. Cricket is fun.
  3. in the same tab
  4. <h5>
  5. a code editor
  6. shows pages from the web
  7. <h1>
  8. alt
  9. Rain today
  10. Cricket is fun.
  11. <li>
  12. Our school bus
  13. Markup
  14. <a href="about.html">
  15. dog.jpg
  16. 1
  17. My best friend
  18. line 1
  19. </h2>
  20. Art corner
  21. src
  22. sends pages over the net
  23. alt
  24. in a new tab
  25. 2
  26. <h1>
  27. <h1>
  28. My pets
  29. 2
  30. a web server
  31. True
  32. an opening tag
  33. 1
  34. numbers
  35. False
  36. shows line numbers
  37. numbers
  38. a web browser
  39. <ul>
  40. width

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