← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 916 · 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 headings are in this code?
    <h1>Our school trip</h1>
    <p>Rain today</p>
    <p>Rain today</p>
    <p>Fun facts</p>
    <p>Our school trip</p>
  2. 2.✍️ How many declarations (property: value pairs) are in this rule?
    body {
      width: 300px;
    }
  3. 3.🔁 How many times does this code print “Welcome”?
    for (let i = 3; i <= 6; i++) {
      console.log("Welcome");
    }
  4. 4.⚡ Which JavaScript word shows a pop-up box? (a) let (b) alert() (c) console.log() (d) for
  5. 5.🎨 What does CSS stand for? (a) Computer Style Sheets (b) Creative Sheet System (c) Colourful Site Styles (d) Cascading Style Sheets
  6. 6.🔗 Where does this link open?
    <a href="maths.html">Visit the site</a>
    (a) in a new tab (b) in the same tab
  7. 7.🌈 Which colour is rgb(255, 255, 0)? (a) yellow (b) cyan (c) magenta (d) white
  8. 8.⚖️ What colour is the text of this element?
    <p class="box" id="top">Hi</p>
    CSS:
    p { color: yellow; }
    p { color: white; }
    (a) red (b) purple (c) yellow (d) white
  9. 9.True or false: the browser shows the page to you. (a) False (b) True
  10. 10.🔐 Is abcd1234 a strong or a weak password? (a) weak (b) strong
  11. 11.What does justify-content: center do? (a) packs boxes at the end (b) equal gaps, none at ends (c) puts boxes in the middle (d) packs boxes at the start
  12. 12.🏷️ Which is the closing tag for <b>? (a) <\b> (b) <b/> (c) </b> (d) <b>
  13. 13.🌍 Which one asks for a web page? (a) the URL (b) HTTPS (c) the browser (d) the server
  14. 14.⚡ What does this code show?
    let name = "Zoya";
    alert("Well done, " + name + "!");
    (a) name (b) Well done, Zoya! (c) Zoya (d) Well done, name!
  15. 15.⚡ A JavaScript file usually ends with which extension? (a) .js (b) .jpg (c) .html (d) .css
  16. 16.💪 How much empty space (px) is before the first box?
    .row {
      display: flex;
      width: 220px;
      justify-content: flex-end;
    }
    Inside are 2 boxes, each 100px wide (no margins).
  17. 17.🔗 Which words do you click on?
    <a href="games.html">Visit the site</a>
    (a) href (b) Maths fun (c) games.html (d) Visit the site
  18. 18.📋 Which list tag is one item of a list? (a) <li> (b) <ul> (c) <ol>
  19. 19.🔠 Which tag is used for the main title on a page? (a) <br> (b) <p> (c) <h1> (d) <h6>
  20. 20.📝 Which tag makes a drop-down list? (a) <ol> (b) <ul> (c) <li> (d) <select>
  21. 21.Which of these is the content? (a) a solid or dotted edge (b) the gap to other boxes (c) the text or picture (d) the line round the box
  22. 22.Which of these is a strong password? (a) Rain#Drop_42! (b) abcd1234 (c) iloveyou (d) riya2014
  23. 23.🌈 Hex digits go 0 to 9, then A to which letter? (a) J (b) F (c) G (d) Z
  24. 24.📄 What is the first line of an HTML5 page? (a) <head> (b) <body> (c) <!DOCTYPE html> (d) <html>
  25. 25.🖼️ Which attribute of <img> shows if the image fails? (a) height (b) src (c) width (d) alt
  26. 26.♿ What does good colour contrast mean? (a) no colours at all (b) many bright colours (c) only red text (d) text stands out clearly
  27. 27.📋 What number does the browser show next to “Orange”?
    <ol start="2">
      <li>Jamun</li>
      <li>Orange</li>
      <li>Banana</li>
      <li>Mango</li>
    </ol>
  28. 28.📄 Where does the text of <title> appear? (a) in a big heading (b) on the browser tab (c) at the bottom (d) nowhere
  29. 29.✍️ What is the selector in this CSS rule?
    .note {
      text-align: center;
      font-style: italic;
    }
    (a) #top (b) italic (c) .note (d) text-align
  30. 30.True or false: a web browser stores a website’s files. (a) True (b) False
  31. 31.True or false: to type a password on http is not safe. (a) True (b) False
  32. 32.⚡ What number does this code print?
    let a = 34;
    let b = 4;
    console.log(a - b);
  33. 33.📝 At most, how many of these can be chosen at the same time?
    <form>
      <input type="radio" name="sport"> Cricket
      <input type="radio" name="sport"> Hockey
      <input type="radio" name="sport"> Football
      <input type="radio" name="sport"> Kabaddi
    </form>
  34. 34.Which of these is an opening tag? (a) </h1> (b) </p> (c) <p> (d) </title>
  35. 35.📝 How many <input> tags are in this form?
    <form>
      <input type="date">
      <input type="password">
      <input type="submit" value="Send">
    </form>
  36. 36.📱 min-width: 800px applies when the screen is ___. (a) exactly 100px (b) turned off (c) 800px or wider (d) 800px or narrower
  37. 37.📱 The screen is 414px wide. Does the rule inside @media apply?
    p {
      font-size: 24px;
    }
    @media (max-width: 480px) {
      p {
        font-size: 20px;
      }
    }
    (a) Yes (b) No
  38. 38.📝 Which input type is for an email address? (a) checkbox (b) email (c) submit (d) text
  39. 39.🌈 Which colour is #ffffff? (a) red (b) white (c) black (d) magenta
  40. 40.📋 What number does the browser show next to “Orange”?
    <ol start="5">
      <li>Banana</li>
      <li>Orange</li>
      <li>Guava</li>
      <li>Litchi</li>
      <li>Mango</li>
      <li>Papaya</li>
    </ol>

Answer key

  1. 1
  2. 1
  3. 4
  4. alert()
  5. Cascading Style Sheets
  6. in the same tab
  7. yellow
  8. white
  9. True
  10. weak
  11. puts boxes in the middle
  12. </b>
  13. the browser
  14. Well done, Zoya!
  15. .js
  16. 20
  17. Visit the site
  18. <li>
  19. <h1>
  20. <select>
  21. the text or picture
  22. Rain#Drop_42!
  23. F
  24. <!DOCTYPE html>
  25. alt
  26. text stands out clearly
  27. 3
  28. on the browser tab
  29. .note
  30. False
  31. True
  32. 30
  33. 1
  34. <p>
  35. 3
  36. 800px or wider
  37. Yes
  38. email
  39. white
  40. 6

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