webbprogrammering och databaser dugga 1

Réussis tes devoirs et examens dès maintenant avec Quizwiz!

Use the appropriate jQuery method to retrieve information from a form input field. (1p) $('#my-text-input')._________();

$('#my-text-input')._____val____();

Varför finns varianterna col-lg, col-md, col-sm och col-xs i Bootstrap? (2p)

De är avsedda för olika typer av device, xs-extra smått, s= smått, etc.

If you forget to enclose your CSS styles in curly braces { }, the browser will:

Fail to apply the styles to your web page.

Use the correct html attribute on the <a> to link a new web page. <a _______="new-page.html">This is a link to my new web page. </a>

href

Choose the preferred element to use when displaying text in italic font style when there is no special emphasis on the words in the text.

i (em funkar också)

Use the _______ element to code embedded styles on a web page

style

The new css unit rem (root em) is used to set the font-size relative to:

the HTML element

__________________ will cause an object not to display.

display: none;

When CSS is coded in the body of the web page as an attribute of an HTML tag it is called ________.

inline

The _______ is the area between the content and the border.

padding

. Is the following HTML code valid? <table> <tr> <td>cell 1</td> <td>cell 2</td> </tr> </table>

yes

Rita till höger hur griden (i kod nedan) kommer att se ut (2p): <div class="container"> <div class="row"> <div class="col-sm-12"></div> </div> <div class="row"> <div class="col-sm-3"></div> <div class="col-sm-4"></div> <div class="col-sm-3"></div> </div> <div class="row"> <div class="col-sm-12"></div> </div>

| 12 | | 3 | 4 | 3 | | 12 |

If you have a <p> element with a class called "left-column", which of the following selectors would you use to style it in the CSS?

. left-column

The CSS to create the class called myfloat that floats to the right of the other page content, has a 10px margin, and a solid border is:

.myfloat { float:right; margin:10px; border: 1px solid #000000; }

Whar tags do you need to put up a basic web page?

<!doctype html>, <html>, <head>, <body>

You have a stylesheet called styles.css in a folder called css. What file path would you put in the href?

<link rel="stylesheet" href="css/styles.css">

Beskriv vad följande kodexempel gör - Svaret skall vara strukturerat på ett bra sätt. @media (min-width: 320px) and (max-width: 640px) { Html { background: yellow; } }

Bredd sätts till devicets bred (skala 1 = ingen ut eller inzoomning. Breden som detta gäller för är 320-640 pixlar och då får man en gul bakgrund.

What best describes the concept "chaining" in jQuery? (1p)

Calling a series of jQuery methods on an element after you've selected it.

Beskriv vad följande kodexempel gör - Svaret skall vara strukturerat på ett bra sätt. (3p) @media screen and ( max-width: 1024px ) { #container { width: 650px; } #extras { clear: left; float: none; } }

Gäller för bredd upp till 1024, bredden på #container (spalten) sätts till 650 pixlar, clear:left stänger av floaten så texten hamnar under - det blir en enkolumnsdesign.

Beskriv vad följande kodexempel gör (Det finns flera paragrafer på aktuell sida) - Svaret skall vara strukturerat på ett bra sätt. (2p) $("p").click(function(){ $(this).slideUp(); });

P-tag slidear upp då man trycker på den.

What will the code: $('.product-description').text(); do? (1p)

Return the contents of $('.product-description') as plain text

Given the following code, what will appear in the browser's console? var x = 10; var y = 20; if ( x < 10 || y > 10 ) { console.log('The condition passes.'); } else { console.log('The condition fails.'); }

The condition passes

Av vilken anledning använder vi följande kodexempel i jQuery? (1p) $(document).ready(function(){ });

Väntar på att all kod laddat innan jacascriptfunktioner körs.

Which of the following two attributes are attached to the <form> element? a) action and method b) send and receive c) POST and GET d) FETCH and CATCH

a) action and method

Which of the following creates the variable message and stores a string value in it? a) var message = 'These are not the droids you're looking for'; b) var message = "These are not the droids you're looking for"; c) message = "These are not the droids you're looking for"; d) var message = "These are not the droids you're looking for';

b) var message = "These are not the droids you're looking for";

Which of the following code produces a random number from 1 to 6 and stores it inside a variable named dieRoll? a) var dieRoll = Math.floor( Math.random() * 6); b) var dieRoll = Math.ceil( Math.random() * 6); c) var dieRoll = Math.floor( Math.random() * 6 ) + 1; d) var dieRoll = Math.ceil( Math.random() * 6 ) - 1;

c) var dieRoll = Math.floor( Math.random() * 6 ) + 1;

You would like to conduct a survey and ask your web page visitors to indicate the computer operating systems that they use. Each visitor could use more than one computer operating system. Select the form control that is best to use for this purpose.

check box

Select the items below that can be used as a CSS Selector. a) an HTML element b) a class name c) an id name d) All of the above

d) All of the above

What can you do with HTML and CSS? a) Build an awesome personal portfolio. b) Add fun animations to your web page. c) Present web content in visually appealing ways. d) All of the above.

d) All of the above

Complete the code below so that either condition must be true for the alert message to appear: (write your answer above the box) if ( username === '' __________ password === '') { alert("Password or user name is missing"); }

if ( username === '' _____||_____ password === '') { alert("Password or user name is missing"); }

Cascading Style Sheet rules are comprised of:

selectors and declarations

Use the ________ property along with the left, right and/or top property to precisely configure the position of an element.

position: absolute;

Which background-repeat value repeats a background image horizontally?

repeat-X


Ensembles d'études connexes

Ramsey Classroom Chapter 5 video answers

View Set

Medical Terminology - Chapter 4 - Musculoskeletal System

View Set

MISY 5325 Excel Midterm Ultimate Review

View Set

(Chapter 24) South and Southeast Asia after 1200

View Set

Current Liabilities and Contingencies

View Set

Marketing Chapter 14: Engaging Customers and Communicating Customer Value

View Set

Both/And and Either/Or Approaches

View Set

Accounting 001 - Study questions chapters 11-14

View Set