WEEK 5 Flashcards

1
Q

This rule will render all the paragraphs in black if they are a direct child of the
element. Other paragraphs put inside other elements like or would not have any
effect of this rule.

body > p {
color: #000000;
}

A

Child Selectors

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

You can also apply styles to HTML elements with particular attributes. The style
rule below will match all the input elements having a type attribute with a value of
text:

input [type=”text”]{
color: #0000000;
}

A

Attribute Selectors

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Selects all paragraph elements whose lang attribute contains the
word “fr”.

A

p[lang~=”fr”]

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

There are following rules applied to attribute selector:

A
  1. p[lang]
  2. p[lang=”fr”]
  3. p[lang~=”fr”]
  4. p[lang|=”en”]
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Selects all paragraph elements with a lang attribute.

A

p[lang]

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Selects all paragraph elements whose lang attribute has a value of
exactly “fr”.

A

p[lang=”fr”]

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Selects all paragraph elements whose lang attribute contains
values that are exactly “en”, or begin with “en-“.

A

p[lang|=”en”]

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

You may need to define MULTIPLE STYLE RULES for a single element. You can define
these rules to combine multiple properties and corresponding values into a single
block.

Here all the property and value pairs are separated by a semicolon (;). You can
keep them in a single line or multiple lines. For better readability, we keep them in
separate lines.

A

Multiple Style Rules

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

You can apply a style to many selectors if you like. Just separate the selectors with
a comma, as given in the following example:

A

Group Selectors

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

You can use style attribute of any HTML
element to define style rules
. These rules will be applied to that element only.

A

Inline CSS – The <style> Attribute</style>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

The element can be used to include an
external stylesheet file in your HTML document. An external style sheet is a
separate text file with .css extension. You define all the Style rules within this text
file and then you can include this file in any HTML document using element.

A

External CSS – The <link></link> Element -

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

You can put your CSS rules into an
HTML document using the tags
. Rules defined using this syntax will be applied to
all the elements available in the document

A

Embedded CSS – The <style> Element</style>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

It is used to import an external
stylesheet
in a manner similar to the element.

A

Imported CSS - @import Rule

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Specifies the style sheet language as a content-type (MIME type). This is a required attribute

A

Attribute- type
Value- text/css

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Attributes of the Embedded CSS

A

Attribute- type
Value- text/css

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Specifies the device, the document will be displayed on. Default value is all. This is an optional attribute

A

Attribute- media
Value- screen, tty, tv, projection, handheld, print, braille

12
Q

Attributes of the Inline CSS

A

Attribute- style
Value- style, rules

13
Q

The value of style attribute is a combination of style declarations separated by semicolon (;)

A

Attribute- style
Value- style, rules

14
Q

Attributes of External CSS

A

Attribute- type
Value- text/css

Attribute- href
Value- URL

Attribute- media
Value- screen, tty, tv, projection, handheld, print, braille

15
Q

Specifies the style sheet file having Style rules. This attribute is required

A

Attribute- href
Value- URL