Use CSS3 in applications (25%) Flashcards Preview

Exam 70-480: Programming in HTML5 with JavaScript and CSS3 > Use CSS3 in applications (25%) > Flashcards

Flashcards in Use CSS3 in applications (25%) Deck (118)
Loading flashcards...
1

Why do HTML elements usually appear differently in different browsers?

The browsers are applying different default styles

2

Which CSS property is used to specify the text color?

color

3

What three ways can you specify a color for the CSS color property?

hex, color name, and rgb values

h1 {
color:#00FF00;
}
h2 {
color: green;
}
h3 {
color: rgb(0,255,0);
}

4

How do you make text appear in bold?

Set the CSS font-weight property to bold.

p {
font-weight: bold;
}

5

What values can be specified for the CSS font-weight property?

lighter, normal, bold and bolder

or

100 (lighter), 200, 300, 400, 500, 600, 700, 800, 900 (darker)

6

How do you make text appear in italics?

Set the CSS font-weight property to italic.

p {
font-style:italic;
}

7

How do you specify the font to use for text?

Set the CSS font-family property.

p {
font-family:Arial,'Times New Roman',Webdings;
}

8

How do you use a font that may not be installed on the client?

Add a @font-face rule and provide a WOFF (Web Open Font Format) for download.

@font-face {
font-family: "My Nicer Font";
src: url('fonts/my_woff_font.eot');
src: url('fonts/my_woff_font.woff');
}

p {
font-family: 'My Nicer Font';
}

9

How do you change the size of text relative to the default text size of the browser?

Set the CSS font-size property to one of these values: xx-small, x-small, smaller, small, medium, large, larger, x-large, and xx-large.

p {
font-size: x-large;
}

10

How do you change the horizontal alignment for text?

Set the CSS text-align property.

p {
text-align: center;
}

11

What are the possible values for the CSS text-align property (other than initial and inherit)?

left, center, right, justify

12

What does the value initial for a CSS property signify?

That the property use its default value.

13

What does the value inherit for a CSS property signify?

That the property get its value from the parent element.

14

What CSS property is used to indent text?

text-indent

p {
text-indent: 50px;
}

15

What CSS property is used to change the amount of spacing between letters?

letter-spacing

p {
letter-spacing: 8px;
}

16

What CSS property is used to change the amount of spacing between words?

word-spacing

p {
word-spacing: 8px;
}

17

What CSS property is used to change how a sentence or word wraps or breaks at the end of the line?

hyphens

div {
hyphens: none;
}

18

What are the possible values for the CSS hyphens property?

none, auto, manual

19

What CSS properties are used to change an element's size?

height and width

table {
height: 50%;
width: 50%;
}

div {
width: 200px;
height: 100px;
}

20

What CSS properties are used to change an element's border?

border, border-style, border-color, border-spacing, border-width

p{
border-style: solid ;
border-color: black;
border-spacing: 250px;
border-width: 5px;
}

div {
border: 5px solid black;
}

21

What is the order that values must be specified for the CSS border property?

size style color

div {
border: 5px solid black;
}

22

What is the space surrounding an element outside its border called?

margin

23

What is the space inside an element's border surrounding its content called?

padding

24

From inside to outside, what are the CSS properties that affect the spacing of elements?

padding, border, margin

25

What CSS property is used to change the transparency of an element?

opacity

p {
opacity: 0.4;
}

26

What CSS property is used to change the opacity of an element?

opacity

p {
opacity: 0.4;
}

27

What is the range of values for the CSS opacity property?

0.0 to 1.0

28

In a CSS file, how are partial URL's interpreted?

They are interpreted relative to the location of the style sheet (.css file), not relative to the document.

p {
background-image: url('orange.jpg'); /* assumes orange.jpg is in the same directory as the file containing this CSS definition */
color: white;
}

29

What CSS property is used to specify a background image for an element?

background-image

p {
background-image: url('orange.jpg'); /* assumes orange.jpg is in the same directory as the file containing this CSS definition */
color: white;
}

30

What configuration options are available for the CSS background-image property?

size, repeat, clip, position-x/position-y