1AKIFT MEDT Test (Group A)

2023-11-21

Max. 100 points

Name:

Task Max. Achieved
1 24
2 24
3 24
4 28
Sum 100
Grading: > 87.5: 1, >75: 2, >62.5 : 3, >50: 4, <=50: 5
  1. Answer the following statements indicating whether they are True or False.
    0-4 correct: 0 points, 5 correct: 6 points, 6 correct: 12 points, 7 correct: 18 points, 8 correct: 24 points.
    HTML
    Statement True False
    HTML is used to create the structure and content of a web page.
    The <ul> tag is used to create an ordered list.
    The <li> tag denotes a list item.
    The <hyperlink> tag defines a hyperlink, which is used to link from one page to another.
    The <css> tag is used to define how a website looks.
    The type attribute is is relevant for html form elements.
  2. Answer the following statements indicating whether they are True or False.
    0-3 correct: 0 points, 4 correct: 8 points, 5 correct: 16 points, 6 correct: 24 points.
    CSS
    Statement True False
    CSS code is used to define the behavior of a web page.
    `color: red;` sets the background color to red.
    CSS can change the font color of an HTML element.
    CSS can be used to change the size of an HTML element.
    CSS can be used to create the structure of an HTML document.
    Margin and padding are the same thing.
  3. Answer the following statements indicating whether they are True or False.
    0-3 correct: 0 points, 4 correct: 8 points, 5 correct: 16 points, 6 correct: 24 points.
    JavaScript
    Statement True False
    function f(a) { return a / 2; } is valid JavaScript
    JavaScript is a programming language.
    The result of 8 % 3 is 2.
    The result of 1 == "1" is true.
    Math.randint() returns a random integer.
    let s = "first "; s += "second"; leads to an error.
  4. Create a small web form in HTML. In the form, add an element that allows entereing a person's first name. Before this element, add a description and link the description and the input field together. That means, clicking on the description should activate the input field. Also, add a control that allows a person to confirm they are over 18 years of age. Finally, add a button to submit the form.
    Note that you don't need to write anything surrounding the form (ie no doctype, html, body etc).
    5 points for the form tag
    5 points for input type text
    3 points for the label
    5 points for the input id and label for
    5 points for the checkbox
    5 points for the submit button
    <form>
    <p>
      <label for="firstname">First name:</label>
      <input type="text" id="firstname" name="firstname" />
    </p>
    <p>
      <input type="checkbox" id="full_age" name="full_age" checked />
      <label for="full_age">18+ years old</label>
    </p>
    <p>
      <input type="submit" value="submit">
    </p>
    </form>