← Web development final test lesson New set →

Web Development Worksheet: Final Test

HTML and CSS lesson 30: Web development final test · Set 833 · 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 is the closing tag for <i>? (a) <\i> (b) </i> (c) <i> (d) <i/>
  2. 2.🔠 How many headings are in this code?
    <h1>I love mangoes.</h1>
    <h2>The red kite</h2>
    <p>I love mangoes.</p>
  3. 3.⚡ What does this code show?
    let name = "Kabir";
    console.log("Well done, " + name + "!");
    (a) Kabir (b) Well done, name! (c) name (d) Well done, Kabir!
  4. 4.True or false: <td> gives the table a title. (a) True (b) False
  5. 5.Which of these is safe to do online? (a) download from pop-ups (b) use a strong password (c) share your password (d) click prize links
  6. 6.💬 Which text will NOT show on the page?
    <p>Rain today</p>
    <!-- <p>My best friend</p> -->
    <p>Fun facts</p>
    <p>The red kite</p>
    (a) Fun facts (b) My best friend (c) Rain today (d) The red kite
  7. 7.True or false: “colour as the only clue” makes the page harder to use. (a) False (b) True
  8. 8.Which of these is the border? (a) the gap to other boxes (b) space outside the border (c) space inside the border (d) a solid or dotted edge
  9. 9.🔠 Which heading shows the SMALLEST text: <h1>, <h2>, <h5> or <h3>? (a) <h2> (b) <h5> (c) <h1> (d) <h3>
  10. 10.Which of these is an opening tag? (a) </h1> (b) </b> (c) <b> (d) </p>
  11. 11.📦 How much space across (px) does this box take in all, margin included?
    .box {
      width: 290px;
      padding: 30px;
      border: 3px solid black;
      margin: 5px;
    }
  12. 12.♿ A part of the page is under a <h2> heading. Which tag should its sub-heading use? (a) <h1> (b) <h2> (c) <h4> (d) <h3>
  13. 13.🔠 Which heading shows the SMALLEST text: <h4>, <h1>, <h5> or <h2>? (a) <h4> (b) <h2> (c) <h1> (d) <h5>
  14. 14.📊 Which tag makes a heading cell? (a) <td> (b) <tr> (c) <caption> (d) <th>
  15. 15.🔢 When you open a web page, which comes first: “the browser shows it” or “you type the URL”? (a) the browser shows it (b) you type the URL
  16. 16.True or false: <ol> goes inside ul or ol. (a) True (b) False
  17. 17.🔁 What is the LAST number this code prints?
    for (let i = 0; i < 18; i = i + 4) {
      console.log(i);
    }
  18. 18.⚡ Which JavaScript word runs code when true? (a) alert() (b) console.log() (c) for (d) if
  19. 19.🔢 In a basic web page file, which comes LAST? (a) </body> (b) <!DOCTYPE html> (c) <html> (d) </html>
  20. 20.Which of these is true of a code editor? (a) opens web pages for us (b) saves our .html files (c) turns HTML into a page (d) answers page requests
  21. 21.📱 The screen is 414px wide. What font-size (px) does the paragraph get?
    p {
      font-size: 16px;
    }
    @media (min-width: 768px) {
      p {
        font-size: 18px;
      }
    }
  22. 22.🔠 How many heading levels does HTML have? (a) 10 (b) 4 (c) 6 (d) 3
  23. 23.✍️ CSS declarations go inside which brackets? (a) ( ) (b) [ ] (c) { } (d) < >
  24. 24.📋 Which list tag is one item of a list? (a) <ol> (b) <li> (c) <ul>
  25. 25.True or false: <nav> is the page’s key part. (a) False (b) True
  26. 26.🔗 Which address opens when you click this link?
    <a href="https://example.com">About us</a>
    (a) About us (b) maths.html (c) https://example.com (d) art.html
  27. 27.🔠 Are headings shown in bold by default? (a) No (b) Yes
  28. 28.📄 Where does the text of <title> appear? (a) on the browser tab (b) nowhere (c) in a big heading (d) at the bottom
  29. 29.💬 Which text will NOT show on the page?
    <p>Fun facts</p>
    <p>Hello, world!</p>
    <!-- <p>Cricket is fun.</p> -->
    (a) Hello, world! (b) Cricket is fun. (c) Fun facts
  30. 30.💬 Which text will NOT show on the page?
    <!-- <p>My best friend</p> -->
    <p>Good morning!</p>
    <p>My pets</p>
    (a) My pets (b) My best friend (c) Good morning!
  31. 31.📱 The screen is 540px wide. Does the rule inside @media apply?
    p {
      font-size: 12px;
    }
    @media (max-width: 600px) {
      p {
        font-size: 6px;
      }
    }
    (a) No (b) Yes
  32. 32.📄 Where does <title> go: in the head or in the body? (a) in the body (b) in the head
  33. 33.⚡ What number does this code print?
    let marks = 18;
    marks = marks + 15;
    marks = marks - 24;
    console.log(marks);
  34. 34.⚡ What does this code show?
    let name = "Meera";
    console.log("Hello, " + name + "!");
    (a) Hello, name! (b) name (c) Meera (d) Hello, Meera!
  35. 35.💬 How many paragraphs show on the page?
    <!-- <p>Cricket is fun.</p> -->
    <!-- <p>My pets</p> -->
    <!-- <p>Hello, world!</p> -->
    <p>Good morning!</p>
  36. 36.🔠 How many <h1> headings should a page usually have? (a) 3 (b) 6 (c) 10 (d) 1
  37. 37.What is <input type="password"> for? (a) lets you tick many (b) hides what you type (c) picks a day (d) lets you pick only one
  38. 38.🔗 Which address opens when you click this link?
    <a href="quiz.html">School news</a>
    (a) quiz.html (b) about.html (c) games.html (d) School news
  39. 39.Which of these has a closing tag? (a) <input> (b) <meta> (c) <title> (d) <img>
  40. 40.📛 In <a href="x.html">, what is href? (a) a closing tag (b) a comment (c) an attribute (d) an element name

Answer key

  1. </i>
  2. 2
  3. Well done, Kabir!
  4. False
  5. use a strong password
  6. My best friend
  7. True
  8. a solid or dotted edge
  9. <h5>
  10. <b>
  11. 366
  12. <h3>
  13. <h5>
  14. <th>
  15. you type the URL
  16. False
  17. 16
  18. if
  19. </html>
  20. saves our .html files
  21. 16
  22. 6
  23. { }
  24. <li>
  25. False
  26. https://example.com
  27. Yes
  28. on the browser tab
  29. Cricket is fun.
  30. My best friend
  31. Yes
  32. in the head
  33. 9
  34. Hello, Meera!
  35. 1
  36. 1
  37. hides what you type
  38. quiz.html
  39. <title>
  40. an attribute

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