UC San Diego Basic Javascript Html and Css Multiple Choice Questions

Save Time On Research and Writing
Hire a Pro to Write You a 100% Plagiarism-Free Paper.
Get My Paper

CSS:

1) What best describes the difference between these two selectors: #myElement & .myElement *

A
)The first selector is an ID and the second is a class

B)The second should only be used once

Save Time On Research and Writing
Hire a Pro to Write You a 100% Plagiarism-Free Paper.
Get My Paper

C)#myElement & .myElement do the same thing

D)The second selector is not a css selector

2) Which is an example of grouped selectors?

A)div .myClass

B)h1, h2, p

C)div > .myClass

D)div > div > #myId

3)What is true of an element with the CSS property display set to inline? *

A)An inline element only takes up as much width as necessary

B)An inline element starts on a new line

C)An inline element takes up as much width as possbile

D)An inline element must be displayed inside of another inline element

4)Which of these options correctly describes the behavior of the CSS properties margin & padding? *

A)padding is inside the border & margin is outside the border

B)margin is above & below the element, while padding is to the left and right of the element

C)padding is outside the border & margin is inside the border

D)padding is above & below the element, while margin is to the left and right of the element

5)Which selector correctly selects all p tags inside of a div tag?

A)div p

B)div > p

C)div + p

D)div ~ p

F)div .p

E)
div .all p

HTML

6)Which element(s) can exist inside of a block level element? Select all that apply *

A)

B)

C)

D)

E)

7)Which option best answers the following? valid attribute for any element *

A)id

B)class

C)title

D)data-*

E)all of the above

8)What is the valid way of commenting out this line of HTML code?

*

A)

B)/**

**/

C)“`

D)//

E) none of the above

9)Which elements are block level elements? Choose all that are correct *

A)

B)

C)

D)

E)

10)Which statement(s) are true about forms & form elements? *

A)Radio buttons let a user select ONE of a limited number of choices

B) defines a one-line input field for text input

C) defines a button for submitting a form to a form-handler

D)When a form is submitted, each input element’s value will be associated with its id attribute

E)The

  • element defines a drop-down list

    Which is the correct way to write a conditional statement?
    if (true) { console.log(“this will execute”); }
    conditional () { /* code to execute */ }
    O if () else () { /* code to execute */ }
    O function () { /* this is a conditional */ }
    while (true) { console.log(“Always and forever”); }
    I don’t know
    Which statement(s) are true about javascript in a browser? *
    JavaScript can change HTML Content
    JavaScript can change HTML Attributes
    Javascript can delete files from your comptuer
    JavaScript can change HTML styles (CSS)
    JavaScript can hide HTML elements
    I don’t know
    Which option is the correct way to declare variables in JS?*
    declare myVar;
    O myVar = “test”;
    var myVar;
    myVar = true;
    variable is declared;
    Select all valid datatypes in JS *
    boolean
    class
    number
    dynamic
    object
    I don’t know
    Which is the correct way to invoke a JS function?*
    function myFunction() { /* code */}
    call myFunction
    invoke.myFunction
    var myFunction () { /* code */ }
    O myFunction();
    var myFunction = function () { /* code */ }

  • Still stressed from student homework?
    Get quality assistance from academic writers!

    Order your essay today and save 25% with the discount code LAVENDER