← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 34 · 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.🌍 What do we call the computer that stores a website? (a) a keyboard (b) a mouse (c) a server (d) a printer
  2. 2.⚖️ Two rules with the same selector set a colour. Which one wins? (a) neither (b) the first one (c) the shorter one (d) the later one
  3. 3.💬 How many paragraphs show on the page?
    <p>Fun facts</p>
    <!-- <p>My best friend</p> -->
    <!-- <p>Our school trip</p> -->
    <!-- <p>Hello, world!</p> -->
    <!-- <p>Cricket is fun.</p> -->
  4. 4.What is <input type="number"> for? (a) lets you pick only one (b) picks a day (c) is for one line of words (d) takes only numbers
  5. 5.🔍 One closing tag is missing. Which one?
    <b>I love mangoes.
    <h2>Fun facts</h2>
    <h3>Hello, world!</h3>
    (a) </h3> (b) </h2> (c) </b> (d) </small>
  6. 6.🌈 Which colour is #00ff00? (a) red (b) yellow (c) bright green (d) white
  7. 7.🖌️ How big is the text, in px?
    h1 {
      background-color: green;
      font-size: 20px;
      color: white;
      text-align: left;
    }
  8. 8.🔠 Which tag is used for the main title on a page? (a) <br> (b) <h1> (c) <p> (d) <h6>
  9. 9.✍️ What is the selector in this CSS rule?
    h1 {
      padding: 8px;
      color: red;
      font-weight: bold;
      margin: 10px;
    }
    (a) h1 (b) red (c) p (d) padding
  10. 10.🎨 What does CSS stand for? (a) Creative Sheet System (b) Computer Style Sheets (c) Colourful Site Styles (d) Cascading Style Sheets
  11. 11.Which of these is a closing tag? (a) <li> (b) </li> (c) <h1> (d) <b>
  12. 12.🔗 Which code links to about.html? (a) <a alt="about.html"> (b) <link about.html> (c) <a src="about.html"> (d) <a href="about.html">
  13. 13.🔗 Which words do you click on?
    <a href="https://example.com">Visit the site</a>
    (a) Visit the site (b) https://example.com (c) href (d) Maths fun
  14. 14.🖼️ Which attribute of <img> shows if the image fails? (a) src (b) alt (c) width (d) height
  15. 15.⚡ What does this code print? (Look at the quotes!)
    let x = "1";
    let y = 8;
    console.log(x + y);
    (a) Error (b) 9 (c) 18
  16. 16.🛡️ Online: is it safe to download from pop-ups? (a) not safe (b) safe
  17. 17.📱 What does a media query check? (a) the battery level (b) the screen width (c) the page title (d) the time of day
  18. 18.🔍 Which is the odd one out? (a) makes headings and lists (b) puts a picture on a page (c) makes a form box (d) lays out the page
  19. 19.🔁 How many times does this code print “Hello”?
    for (let i = 1; i < 9; i++) {
      console.log("Hello");
    }
  20. 20.True or false: the server asks for a web page. (a) False (b) True
  21. 21.🔁 What does this code print?
    let marks = 4;
    if (marks > 41) {
      console.log("Pass");
    } else {
      console.log("Try again");
    }
    (a) Try again (b) Pass
  22. 22.🌈 In #007500 the green part is the hex number 75. What is it as a normal number?
  23. 23.🧩 Which language puts a picture on a page? (a) JavaScript (b) CSS (c) HTML
  24. 24.✍️ Which property is set to 2px solid in this rule?
    .note {
      padding: 8px;
      border: 2px solid;
    }
    (a) border (b) font-style (c) 2px solid (d) width
  25. 25.🔠 How many headings are in this code?
    <h1>The red kite</h1>
    <p>Fun facts</p>
    <p>Our school trip</p>
  26. 26.True or false: margin is space inside the border. (a) True (b) False
  27. 27.What is <input type="text"> for? (a) takes only numbers (b) hides what you type (c) is for one line of words (d) picks a day
  28. 28.📄 Can HTML on its own show paragraphs? (a) No (b) Yes
  29. 29.True or false: <h1> goes in the head. (a) True (b) False
  30. 30.⚡ Which tag holds JavaScript in a page? (a) <js> (b) <script> (c) <style> (d) <code>
  31. 31.🧩 Which language makes headings and lists? (a) JavaScript (b) HTML (c) CSS
  32. 32.📝 On how many lines does the browser show this paragraph?
    <p>Kites fly high<br>Sky is blue</p>
  33. 33.What does text-align do? (a) picks the font style (b) centres a heading (c) colours behind the text (d) sets the letter colour
  34. 34.🏷️ Is <b> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  35. 35.🔠 How many headings are in this code?
    <h1>Our school trip</h1>
    <h3>My pets</h3>
    <p>Good morning!</p>
    <h2>My best friend</h2>
  36. 36.📋 Which list tag is an unordered list? (a) <ol> (b) <ul> (c) <li>
  37. 37.True or false: <li> shows 1, 2, 3 numbers. (a) True (b) False
  38. 38.🌈 Which hex code is magenta? (a) #ffff00 (b) #00ffff (c) #ffffff (d) #ff00ff
  39. 39.📝 What do we need to write HTML? (a) a plain text editor (b) a printer (c) a microphone (d) a paintbrush
  40. 40.⚖️ What colour is the text of this element?
    <p class="menu" id="top">Hi</p>
    CSS:
    #top { color: orange; }
    p { color: red; }
    .menu { color: white; }
    (a) red (b) white (c) black (d) orange

Answer key

  1. a server
  2. the later one
  3. 1
  4. takes only numbers
  5. </b>
  6. bright green
  7. 20
  8. <h1>
  9. h1
  10. Cascading Style Sheets
  11. </li>
  12. <a href="about.html">
  13. Visit the site
  14. alt
  15. 18
  16. not safe
  17. the screen width
  18. lays out the page
  19. 8
  20. False
  21. Try again
  22. 117
  23. HTML
  24. border
  25. 1
  26. False
  27. is for one line of words
  28. Yes
  29. False
  30. <script>
  31. HTML
  32. 2
  33. centres a heading
  34. an opening tag
  35. 3
  36. <ul>
  37. False
  38. #ff00ff
  39. a plain text editor
  40. orange

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