← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 287 · 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.📋 Which list suits a shopping list in any order? (a) <hr> (b) <ol> (c) <br> (d) <ul>
  2. 2.📄 Where does <ul> go: in the head or in the body? (a) in the body (b) in the head
  3. 3.📝 On how many lines does the browser show this paragraph?
    <p>Sky is blue<br>Roses are red</p>
  4. 4.🔠 How many headings are in this code?
    <h1>I love mangoes.</h1>
    <h3>My pets</h3>
    <p>Rain today</p>
  5. 5.Which of these is true of a web browser? (a) turns HTML into a page (b) colours code to help us (c) is where we type code (d) stores a website’s files
  6. 6.True or false: alert(score); goes in index.html. (a) False (b) True
  7. 7.🔁 What does i++ do? (a) adds 1 to i (b) takes 1 from i (c) doubles i (d) prints i
  8. 8.🔠 Which heading shows the BIGGEST text: <h2>, <h5>, <h4> or <h6>? (a) <h5> (b) <h2> (c) <h6> (d) <h4>
  9. 9.📋 Does this list show bullets or numbers?
    <ul>
      <li>Papaya</li>
      <li>Orange</li>
    </ul>
    (a) bullets (b) numbers
  10. 10.📝 Which input type is for one line of words? (a) password (b) date (c) text (d) submit
  11. 11.True or false: in <img>, src shows if the image fails. (a) False (b) True
  12. 12.♿ Does this help everyone, or make the page harder to use: use headings in order? (a) helps everyone (b) makes it harder
  13. 13.🔁 Which loop repeats code a set number of times? (a) let (b) else (c) for (d) if
  14. 14.🖼️ Which picture file does the browser load?
    <img src="map.png" alt="Map of India" width="350">
    (a) Map of India (b) cake.jpg (c) dog.jpg (d) map.png
  15. 15.🔁 How many numbers does this code print?
    for (let i = 0; i < 13; i = i + 4) {
      console.log(i);
    }
  16. 16.🛡️ Online: is it safe to check for https first? (a) safe (b) not safe
  17. 17.✍️ In color: blue; which part is the value? (a) : (b) ; (c) blue (d) color
  18. 18.🔍 Which is the odd one out? (a) gives the page structure (b) lays out the page (c) makes a form box (d) makes headings and lists
  19. 19.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="cake.jpg" alt="Birthday cake" width="100">
    (a) width (b) A happy dog (c) cake.jpg (d) Birthday cake
  20. 20.🔁 What number does this code print?
    let total = 0;
    for (let i = 1; i <= 3; i++) {
      total = total + i;
    }
    console.log(total);
  21. 21.🚀 Which tag loads script.js into a page? (a) <a href="script.js"> (b) <link script.js> (c) <js src="script.js"> (d) <script src="script.js">
  22. 22.📋 Which list tag is an unordered list? (a) <ol> (b) <ul> (c) <li>
  23. 23.What is <input type="radio"> for? (a) hides what you type (b) is for one line of words (c) is for an email address (d) lets you pick only one
  24. 24.📱 What does a media query check? (a) the screen width (b) the battery level (c) the page title (d) the time of day
  25. 25.📝 Does <img> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  26. 26.💬 Which text will NOT show on the page?
    <p>My pets</p>
    <p>Our school trip</p>
    <p>Good morning!</p>
    <!-- <p>Hello, world!</p> -->
    (a) Hello, world! (b) My pets (c) Our school trip (d) Good morning!
  27. 27.🔠 How many headings are in this code?
    <h1>Good morning!</h1>
    <h2>Our school trip</h2>
    <h3>Cricket is fun.</h3>
  28. 28.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="tiger.jpg" alt="A tiger asleep" width="400">
    (a) width (b) A red kite (c) A tiger asleep (d) tiger.jpg
  29. 29.🎯 Which element does the selector .big style? (a) <h2 id="big"> (b) <h2 class="big"> (c) <li class="box"> (d) <h2 class="red">
  30. 30.⚖️ What colour is the text of this element?
    <h1 class="box" id="hero">Hi</h1>
    CSS:
    #hero { color: black; }
    h1 { color: blue; }
    (a) black (b) purple (c) green (d) blue
  31. 31.🔗 What does target="_blank" do to a link? (a) makes it blank (b) makes it bold (c) opens it in a new tab (d) hides the link
  32. 32.🚀 What is the home page file of a website usually called? (a) home.css (b) start.js (c) main.png (d) index.html
  33. 33.⚡ Which JavaScript word repeats code? (a) for (b) let (c) console.log() (d) alert()
  34. 34.💪 How much empty space (px) is before the first box?
    .row {
      display: flex;
      width: 180px;
      justify-content: flex-end;
    }
    Inside are 4 boxes, each 40px wide (no margins).
  35. 35.📊 How many rows does this table have?
    <table>
      <tr><td>Papaya</td><td>Banana</td></tr>
      <tr><td>Guava</td><td>Banana</td></tr>
      <tr><td>Mango</td><td>Guava</td></tr>
    </table>
  36. 36.📱 The screen is 540px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 12px;
    }
    @media (max-width: 768px) {
      p {
        font-size: 10px;
      }
    }
  37. 37.📱 Which tag helps phones show a page at the right size? (a) the title tag (b) the br tag (c) the viewport meta tag (d) the hr tag
  38. 38.True or false: a web server has an address bar. (a) False (b) True
  39. 39.🖌️ Which CSS property colours behind the text? (a) background-color (b) color (c) font-size (d) font-family
  40. 40.📝 Which tag gives a form box a name you can click? (a) <label> (b) <title> (c) <hr> (d) <h1>

Answer key

  1. <ul>
  2. in the body
  3. 2
  4. 2
  5. turns HTML into a page
  6. False
  7. adds 1 to i
  8. <h2>
  9. bullets
  10. text
  11. False
  12. helps everyone
  13. for
  14. map.png
  15. 4
  16. safe
  17. blue
  18. lays out the page
  19. Birthday cake
  20. 6
  21. <script src="script.js">
  22. <ul>
  23. lets you pick only one
  24. the screen width
  25. an empty tag
  26. Hello, world!
  27. 3
  28. A tiger asleep
  29. <h2 class="big">
  30. black
  31. opens it in a new tab
  32. index.html
  33. for
  34. 20
  35. 3
  36. 10
  37. the viewport meta tag
  38. False
  39. background-color
  40. <label>

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