← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 753 · 40 questions
TalentJR

Code tip (Read it like a browser): Find the topic: HTML, CSS, JavaScript or how the web works. Read the code line by line, the way a browser would. For sums and loops, write each step down and check it again.

NameDateTime takenScore ___ / 40
  1. 1.🖼️ How many pixels wide is the picture drawn?
    <img src="cake.jpg" alt="Birthday cake" width="100">
  2. 2.🏷️ Every HTML tag starts with which sign? (a) [ (b) < (c) ( (d) {
  3. 3.🔍 Which line is missing its closing tag?
    line 1: <h3>My pets</h3>
    line 2: <p>Good morning!
    line 3: <small>Cricket is fun.</small>
    (a) line 3 (b) line 1 (c) line 2
  4. 4.📄 Where does <style> go: in the head or in the body? (a) in the head (b) in the body
  5. 5.⚖️ What colour is the text of this element?
    <p class="big" id="top">Hi</p>
    CSS:
    #top { color: red; }
    #top { color: purple; }
    (a) green (b) orange (c) purple (d) red
  6. 6.🔠 How many <h1> headings should a page usually have? (a) 6 (b) 1 (c) 10 (d) 3
  7. 7.Which of these is a strong password? (a) riya2014 (b) iloveyou (c) abcd1234 (d) S0lar!Pen#8
  8. 8.📱 max-width: 600px applies when the screen is ___. (a) 600px or wider (b) 600px or narrower (c) turned off (d) exactly 1000px
  9. 9.🔍 Which is the odd one out? (a) stores a website’s files (b) turns HTML into a page (c) hosts websites online (d) sends pages over the net
  10. 10.📦 How much space across (px) does this box take in all, margin included?
    .box {
      width: 50px;
      padding: 25px;
      border: 5px solid black;
      margin: 0px;
    }
  11. 11.♿ Does this help everyone, or make the page harder to use: add alt text to images? (a) makes it harder (b) helps everyone
  12. 12.🚀 Which file should this code go in: score = score + 1; (a) style.css (b) script.js (c) index.html
  13. 13.♿ Is this heading order correct (no level skipped)?
    <h1> → <h2> → <h2> → <h2>
    (a) Yes (b) No
  14. 14.⚖️ Which selector is the strongest? (a) an element selector (b) an id selector (c) a class selector
  15. 15.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="cake.jpg" alt="Birthday cake" width="350">
    (a) A happy dog (b) cake.jpg (c) Birthday cake (d) width
  16. 16.🚀 Which file is best for code that reacts to clicks? (a) notes.txt (b) index.html (c) style.css (d) script.js
  17. 17.🔁 How many times does this code print “Hello”?
    for (let i = 2; i < 7; i++) {
      console.log("Hello");
    }
  18. 18.🚀 Which file is best for the colours and fonts? (a) style.css (b) index.html (c) script.js (d) photo.jpg
  19. 19.🧭 Why use <nav> instead of <div> for a menu? (a) it makes text red (b) it loads faster (c) it adds pictures (d) it tells its meaning
  20. 20.🔢 To build and share your first web page, which comes first: “write the HTML” or “plan what to show”? (a) plan what to show (b) write the HTML
  21. 21.📝 Which tag makes a big box for many lines of text? (a) <br> (b) <textarea> (c) <input> (d) <p>
  22. 22.📊 How many cells are in each row?
    <table>
      <tr><th>Name</th><th>Fruit</th><th>Price</th><th>Day</th></tr>
      <tr><td>Banana</td><td>Papaya</td><td>Mango</td><td>Banana</td></tr>
      <tr><td>Orange</td><td>Papaya</td><td>Mango</td><td>Litchi</td></tr>
    </table>
  23. 23.🎯 Which element does the selector #intro style? (a) <div id="main"> (b) <span class="red"> (c) <div class="intro"> (d) <div id="intro">
  24. 24.Which of these is a strong password? (a) Rain#Drop_42! (b) riya2014 (c) qwerty (d) 111111
  25. 25.🛡️ Online: is it safe to use a strong password? (a) safe (b) not safe
  26. 26.What does justify-content: flex-end do? (a) packs boxes at the start (b) puts boxes in the middle (c) packs boxes at the end (d) equal gaps, none at ends
  27. 27.True or false: HTML on its own can add up two numbers. (a) True (b) False
  28. 28.🔍 One closing tag is missing. Which one?
    <h1>My pets</h1>
    <i>Cricket is fun.
    <small>My best friend</small>
    (a) </h1> (b) </i> (c) </strong> (d) </small>
  29. 29.Which of these is a closing tag? (a) <title> (b) </title> (c) <p> (d) <li>
  30. 30.💬 Which text will NOT show on the page?
    <p>Good morning!</p>
    <p>Hello, world!</p>
    <!-- <p>Our school trip</p> -->
    <p>My pets</p>
    (a) Our school trip (b) Hello, world! (c) Good morning! (d) My pets
  31. 31.🔁 Which word runs code only when something is true? (a) log (b) for (c) let (d) if
  32. 32.🖼️ Which attribute of <img> describes the picture? (a) height (b) src (c) width (d) alt
  33. 33.🔠 Which heading shows the SMALLEST text: <h6>, <h4>, <h3> or <h5>? (a) <h4> (b) <h3> (c) <h5> (d) <h6>
  34. 34.⚡ Where does console.log() show its output? (a) on the title bar (b) on the printer (c) in the address bar (d) in the console
  35. 35.🔠 Which tag is the least important heading? (a) <h3> (b) <h1> (c) <p> (d) <h6>
  36. 36.True or false: JavaScript gives the page structure. (a) False (b) True
  37. 37.⚡ What does this code show?
    let name = "Meera";
    alert("Hello, " + name + "!");
    (a) Meera (b) Hello, Meera! (c) name (d) Hello, name!
  38. 38.💪 Which flexbox property lines boxes up across? (a) display: flex (b) align-items (c) flex-direction (d) gap
  39. 39.📝 How many <input> tags are in this form?
    <form>
      <input type="text">
      <input type="date">
      <input type="submit" value="Send">
    </form>
  40. 40.🔠 Which tag is used for the main title on a page? (a) <br> (b) <p> (c) <h6> (d) <h1>

Answer key

  1. 100
  2. <
  3. line 2
  4. in the head
  5. purple
  6. 1
  7. S0lar!Pen#8
  8. 600px or narrower
  9. turns HTML into a page
  10. 110
  11. helps everyone
  12. script.js
  13. Yes
  14. an id selector
  15. Birthday cake
  16. script.js
  17. 5
  18. style.css
  19. it tells its meaning
  20. plan what to show
  21. <textarea>
  22. 4
  23. <div id="intro">
  24. Rain#Drop_42!
  25. safe
  26. packs boxes at the end
  27. False
  28. </i>
  29. </title>
  30. Our school trip
  31. if
  32. alt
  33. <h6>
  34. in the console
  35. <h6>
  36. False
  37. Hello, Meera!
  38. align-items
  39. 3
  40. <h1>

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