Html, CSS, JS Quiz

  1. Where can you use “optgroup” tag in an HTML form?
    A. To group options when using the select
    B. To group radio buttons
    C. To group checkboxes
    D. To group input box

  2. Select the correct line of code that will create a form input to enter a
    message that spans multiple lines.
    A. input type=text name= “message”
    B. text name= ”message”
    C. textarea name= ”message”
    D. input type=textarea name= “message”

  3. For text-overflow: ellipsis to work which conditions need to be true?
    A. white-space: normal
    B. white-space: nowrap
    C. overflow: hidden
    D. overflow: visible

  4. What effect does happen on an element, if it’s left and right margin is set to
    ‘auto’?
    A. Element can be moved around by the mouse.
    B. Element inherits the left and right margin values of its parent element.
    C. The available space is split equally as margin on left and right.
    D. Element can allocate its left and right margin values to its sibling elements.

  5. How to take values as input from user?
    A. window.alert()
    B. window.prompt()
    C. window.confirm()
    D. window.input()

  6. What will be printed in the console?
    console.log(parseInt(false));
    console.log(Number(false));
    A. 0 and 0
    B. NaN and NaN
    C. NaN and 0
    D. Error

2 Likes

1.Ans:- A
2.Ans:- B
3.Ans:- B,C
4.Ans:- C
5.Ans:- B
6.Ans:- C

The answers are as follow
Q1 A
Q2 C
Q3 B
Q4 C
Q5 B
Q6 A

1.A
2.C
3.B
4.C
5.B
6.C


,
,
,
,
,
,s

1.A
2.D
3.B
4.C
5.B
6.C [quote=“kashif-ta-fsr, post:1, topic:2811, full:true”]

  1. Where can you use “optgroup” tag in an HTML form?
    A. To group options when using the select
    B. To group radio buttons
    C. To group checkboxes
    D. To group input box

  2. Select the correct line of code that will create a form input to enter a
    message that spans multiple lines.
    A. input type=text name= “message”
    B. text name= ”message”
    C. textarea name= ”message”
    D. input type=textarea name= “message”

  3. For text-overflow: ellipsis to work which conditions need to be true?
    A. white-space: normal
    B. white-space: nowrap
    C. overflow: hidden
    D. overflow: visible

  4. What effect does happen on an element, if it’s left and right margin is set to
    ‘auto’?
    A. Element can be moved around by the mouse.
    B. Element inherits the left and right margin values of its parent element.
    C. The available space is split equally as margin on left and right.
    D. Element can allocate its left and right margin values to its sibling elements.

  5. How to take values as input from user?
    A. window.alert()
    B. window.prompt()
    C. window.confirm()
    D. window.input()

  6. What will be printed in the console?
    console.log(parseInt(false));
    console.log(Number(false));
    A. 0 and 0
    B. NaN and NaN
    C. NaN and 0
    D. Error
    [/quote]

1.A
2.C
3.B,C
4.C
5.B
6.c