← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 490 · 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.🌈 In #00002f the blue part is the hex number 2f. What is it as a normal number?
  2. 2.🔒 Is the connection to this address scrambled (encrypted)?
    https://www.example.com/about.html
    (a) Yes (b) No
  3. 3.📱 The screen is 540px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 16px;
    }
    @media (min-width: 768px) {
      p {
        font-size: 24px;
      }
    }
  4. 4.🧱 HTML gives a web page its ___. (a) speed (b) colours (c) structure (d) sound
  5. 5.📱 The screen is 375px wide. Does the rule inside @media apply?
    p {
      font-size: 16px;
    }
    @media (max-width: 600px) {
      p {
        font-size: 14px;
      }
    }
    (a) Yes (b) No
  6. 6.🔁 What does this code print?
    let age = 46;
    if (age > 7) {
      console.log("teen");
    } else {
      console.log("child");
    }
    (a) teen (b) child
  7. 7.True or false: <li> is an ordered list. (a) False (b) True
  8. 8.True or false: to meet an online stranger is not safe. (a) False (b) True
  9. 9.🎯 Which element does the selector li style? (a) <div> (b) <p id="hero"> (c) <span class="star"> (d) <li class="star">
  10. 10.📝 Which input type lets you tick many? (a) radio (b) date (c) submit (d) checkbox
  11. 11.Which of these is an empty tag? (a) <b> (b) <li> (c) <p> (d) <input>
  12. 12.🔢 When you open a web page, what comes right after “you type the URL”? (a) DNS finds the server (b) the browser shows it (c) the browser asks it (d) the server sends files
  13. 13.🌈 Hex digits go 0 to 9, then A to which letter? (a) G (b) F (c) J (d) Z
  14. 14.⚖️ Which selector is the strongest? (a) a class selector (b) an element selector (c) an id selector
  15. 15.🔁 What does this code print?
    let score = 48;
    if (score < 34) {
      console.log("You win");
    } else {
      console.log("Play again");
    }
    (a) Play again (b) You win
  16. 16.🖼️ Which picture file does the browser load?
    <img src="kite.png" alt="A red kite" width="350">
    (a) A red kite (b) cake.jpg (c) map.png (d) kite.png
  17. 17.Which of these is an opening tag? (a) </title> (b) </p> (c) <b> (d) </body>
  18. 18.🧭 Is <div> semantic or not semantic? (a) not semantic (b) semantic
  19. 19.🖌️ What colour is behind the letters?
    h1 {
      color: blue;
      background-color: black;
      text-align: right;
      font-size: 12px;
    }
    (a) red (b) blue (c) black
  20. 20.🔠 Which heading shows the SMALLEST text: <h4>, <h3>, <h5> or <h6>? (a) <h4> (b) <h6> (c) <h3> (d) <h5>
  21. 21.🔁 What number does this code print?
    let total = 0;
    for (let i = 1; i <= 3; i++) {
      total = total + i;
    }
    console.log(total);
  22. 22.🖌️ What colour are the letters?
    h1 {
      font-size: 20px;
      text-align: left;
      background-color: blue;
      color: purple;
    }
    (a) blue (b) orange (c) purple
  23. 23.💬 Which text will NOT show on the page?
    <p>My pets</p>
    <p>Fun facts</p>
    <p>I love mangoes.</p>
    <!-- <p>Hello, world!</p> -->
    (a) Hello, world! (b) My pets (c) I love mangoes. (d) Fun facts
  24. 24.💬 Which text will NOT show on the page?
    <!-- <p>Our school trip</p> -->
    <p>I love mangoes.</p>
    <p>Good morning!</p>
    <p>Cricket is fun.</p>
    (a) Good morning! (b) Our school trip (c) I love mangoes. (d) Cricket is fun.
  25. 25.True or false: <input type="text"> lets you pick only one. (a) True (b) False
  26. 26.🔗 What does target="_blank" do to a link? (a) hides the link (b) makes it bold (c) opens it in a new tab (d) makes it blank
  27. 27.⚖️ Which selector is the weakest? (a) a class selector (b) an element selector (c) an id selector
  28. 28.⚡ What number does this code print?
    let a = 12;
    let b = 10;
    console.log(a * b);
  29. 29.📝 How many paragraphs does this code make?
    <p>Fun facts</p>
    <p>Rain today</p>
    <p>Rain today</p>
    <p>Hello, world!</p>
    <p>I love mangoes.</p>
    <p>Fun facts</p>
  30. 30.True or false: <h1>My Site</h1> goes in index.html. (a) True (b) False
  31. 31.⚡ Which JavaScript word makes a new variable? (a) let (b) for (c) if (d) alert()
  32. 32.True or false: .menu is a class selector. (a) False (b) True
  33. 33.🛡️ Is it safe to use the same password on every site? (a) No (b) Yes
  34. 34.🔠 How many headings are in this code?
    <h1>Hello, world!</h1>
    <h2>Fun facts</h2>
    <p>Our school trip</p>
    <p>Hello, world!</p>
    <p>The red kite</p>
  35. 35.📋 Which list suits a shopping list in any order? (a) <ul> (b) <hr> (c) <ol> (d) <br>
  36. 36.📋 Which list tag is an ordered list? (a) <li> (b) <ul> (c) <ol>
  37. 37.🖌️ What colour is behind the letters?
    h2 {
      font-size: 32px;
      background-color: red;
      text-align: right;
      color: yellow;
    }
    (a) red (b) yellow (c) black
  38. 38.⚖️ What colour is the text of this element?
    <h1 class="big" id="intro">Hi</h1>
    CSS:
    .big { color: green; }
    .big { color: red; }
    (a) white (b) green (c) purple (d) red
  39. 39.⚡ Which JavaScript word writes in the console? (a) for (b) let (c) console.log() (d) if
  40. 40.🔒 What does the lock (HTTPS) in the address bar mean? (a) the site is a game (b) the site is free (c) the data is scrambled (d) the site is fast

Answer key

  1. 47
  2. Yes
  3. 16
  4. structure
  5. Yes
  6. teen
  7. False
  8. True
  9. <li class="star">
  10. checkbox
  11. <input>
  12. DNS finds the server
  13. F
  14. an id selector
  15. Play again
  16. kite.png
  17. <b>
  18. not semantic
  19. black
  20. <h6>
  21. 6
  22. purple
  23. Hello, world!
  24. Our school trip
  25. False
  26. opens it in a new tab
  27. an element selector
  28. 120
  29. 6
  30. True
  31. let
  32. True
  33. No
  34. 2
  35. <ul>
  36. <ol>
  37. red
  38. red
  39. console.log()
  40. the data is scrambled

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