← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 960 · 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.🛡️ Online: is it safe to share your OTP? (a) safe (b) not safe
  2. 2.🖼️ Which attribute of <img> tells which image to load? (a) width (b) alt (c) src (d) height
  3. 3.🔠 How many headings are in this code?
    <h1>I love mangoes.</h1>
    <p>Good morning!</p>
    <h2>Fun facts</h2>
  4. 4.📛 In <a href="x.html">, what is href? (a) a closing tag (b) an attribute (c) a comment (d) an element name
  5. 5.📝 On how many lines does the browser show this paragraph?
    <p>Stars shine<br>Roses are red<br>Sky is blue<br>Kites fly high<br>Birds sing</p>
  6. 6.🎯 Which sign starts an id selector? (a) . (b) & (c) # (d) @
  7. 7.📝 On how many lines does the browser show this paragraph?
    <p>Kites fly high<br>Roses are red<br>Stars shine<br>Rivers flow<br>Birds sing</p>
  8. 8.🖼️ Does <img> need a closing tag? (a) Yes (b) No
  9. 9.🔠 How many headings are in this code?
    <h1>Rain today</h1>
    <h4>Our school trip</h4>
    <p>Rain today</p>
  10. 10.🔠 How many headings are in this code?
    <h1>Our school trip</h1>
    <h2>I love mangoes.</h2>
    <p>The red kite</p>
    <h4>Hello, world!</h4>
    <p>I love mangoes.</p>
  11. 11.🔁 When does the else part run? (a) never (b) when if is true (c) always (d) when if is false
  12. 12.⚖️ Which selector is the weakest? (a) an id selector (b) a class selector (c) an element selector
  13. 13.🔍 Which is the odd one out? (a) gives the page structure (b) makes a form box (c) lays out the page (d) makes headings and lists
  14. 14.True or false: <td> makes a heading cell. (a) True (b) False
  15. 15.True or false: a code editor hosts websites online. (a) False (b) True
  16. 16.📋 Which list tag lists things in any order? (a) <ul> (b) <li> (c) <ol>
  17. 17.🌍 Which one is the page’s address? (a) the browser (b) the server (c) HTTPS (d) the URL
  18. 18.🖌️ Which CSS property makes the text bold? (a) text-align (b) font-weight (c) background-color (d) color
  19. 19.⚡ Which word makes a new variable? (a) put (b) make (c) let (d) give
  20. 20.🔐 Is riya2014 a strong or a weak password? (a) weak (b) strong
  21. 21.🖼️ Which picture file does the browser load?
    <img src="dog.jpg" alt="A happy dog" width="350">
    (a) dog.jpg (b) A happy dog (c) moon.png (d) bus.jpg
  22. 22.📄 Can HTML on its own make tables? (a) No (b) Yes
  23. 23.⚖️ What colour is the text of this element?
    <h1 class="menu" id="intro">Hi</h1>
    CSS:
    h1 { color: purple; }
    h1 { color: red; }
    (a) yellow (b) blue (c) purple (d) red
  24. 24.✍️ What is the selector in this CSS rule?
    li {
      padding: 8px;
      font-weight: bold;
    }
    (a) padding (b) body (c) li (d) bold
  25. 25.✍️ In color: blue; which part is the value? (a) ; (b) : (c) color (d) blue
  26. 26.True or false: “label every form box” helps everyone use the page. (a) True (b) False
  27. 27.What does font-size do? (a) makes the text bold (b) colours behind the text (c) sets the letter colour (d) makes letters bigger
  28. 28.🌈 In #000800 the green part is the hex number 08. What is it as a normal number?
  29. 29.🔍 Which is the odd one out? (a) colours code to help us (b) is where we type code (c) opens web pages for us (d) shows line numbers
  30. 30.🖼️ Which attribute of <img> sets how tall it is? (a) alt (b) height (c) src (d) width
  31. 31.✍️ What value is given to font-style in this rule?
    p {
      font-style: italic;
      background-color: yellow;
    }
    (a) italic (b) font-style (c) red (d) 20px
  32. 32.⚡ A JavaScript file usually ends with which extension? (a) .jpg (b) .js (c) .html (d) .css
  33. 33.Which of these is the content? (a) the text or picture (b) the gap to other boxes (c) space inside the border (d) space outside the border
  34. 34.🔁 What does this code print?
    let marks = 48;
    if (marks >= 38) {
      console.log("Pass");
    } else {
      console.log("Try again");
    }
    (a) Try again (b) Pass
  35. 35.🔠 Which tag is the least important heading? (a) <h6> (b) <h3> (c) <p> (d) <h1>
  36. 36.⚡ What number does this code print?
    let a = 13;
    let b = 12;
    console.log(a - b);
  37. 37.🎯 Can many elements share the same class? (a) No (b) Yes
  38. 38.✍️ Which sign ends each CSS declaration? (a) : (b) , (c) . (d) ;
  39. 39.🔍 Which is the odd one out? (a) colours code to help us (b) saves our .html files (c) shows line numbers (d) has an address bar
  40. 40.📝 How many <input> tags are in this form?
    <form>
      <input type="password">
      <input type="text">
      <input type="number">
      <input type="checkbox">
      <input type="date">
      <input type="submit" value="Send">
    </form>

Answer key

  1. not safe
  2. src
  3. 2
  4. an attribute
  5. 5
  6. #
  7. 5
  8. No
  9. 2
  10. 3
  11. when if is false
  12. an element selector
  13. lays out the page
  14. False
  15. False
  16. <ul>
  17. the URL
  18. font-weight
  19. let
  20. weak
  21. dog.jpg
  22. Yes
  23. red
  24. li
  25. blue
  26. True
  27. makes letters bigger
  28. 8
  29. opens web pages for us
  30. height
  31. italic
  32. .js
  33. the text or picture
  34. Pass
  35. <h6>
  36. 1
  37. Yes
  38. ;
  39. has an address bar
  40. 6

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