CSS Basics Flashcards

2
Q

What is CSS?

A

Cascading Style Sheets. A language developed to control the presentation of markup language documents.

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

What are style sheets?

A

collection of formatting rules

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

In CSS cascade means?

A

styles are applied to pages in the order they are found

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

What are some benefits of user control (users overriding the styles)?

A

Enhances accessibility. Prevents rendering issues from restricting access to content. Users with disabilities can override smaller text sizes. On the web being able to access content matters more.

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

what is syntax?

A

arrangement of words and phrases to create well-formed sentences in a language

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

parts of CSS Syntax

A

Selector
Declaration
Property
Value

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

what is a css selector?

A

patterns used to select the element(s) you want to style

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

what is a css decleration?

A

formatting instructions enclosed in curly braces

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

css declaration rule

A

property: value;

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

whitespaces?

A

Important within a selector. not important in declarations.

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

good way to learn css syntax?

A

focus on basic elements first. explore thee css specifications. read through css from other sites.

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

universal selector

A
  • matches any element
    ex: * { property:value;}
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

what is element type selector?

A

global selector matches elements with the corresponding element type name. they are case insensitive in HTML but are case sensitive in XML. -ex: p {declarations;}

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

what is class selectors?

A

they are HTML attributes that can be set on any HTML element and can be used on as many elements and as many times as needed. -ex: .className {declarations}

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

what is ID selectors?

A

HTML attributes that can be set on any HTML element and must be unique to the page. -ex: #idSelector {declarations}

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

what is element-specific selectors?

A

modified class or ID selector which limits application to a specific element -ex: h2.subheading {declarations} or div#sidebar {declarations}

18
Q

class & ID naming conventions

A

no whitespace or special characters. CSS is case-sensitive. establish standards for your CSS and stay consistent with them.

19
Q

Descendent Selectors

A

Highly specific selectors that target elements based on their location within other elements. -ex: div p span {declarations}

20
Q

Grouping Selectors

A

Allows you to group selectors together that share formatting. separated by comma.

21
Q

tips for structure

A

start with well-structured HTML. use meaningful classes and IDS. use consistent HTML structure.

22
Q

Guidelines for Writing HTML

A

Focus on writing clean efficient code. Structure the HTML so that it adds meaning to the content. Don’t focus on styling when initially structuring code.

23
Q

Style Locations

A

Three options: External style sheet. Embedded Style. Inline Style.

24
Q

Authoring Considerations

A

Most projects will rely heavily on external styles. Embedded styles are mainly used to overwrite external styles. You should plan on overall site strategy for style replacement.

25
Q

How Browsers Read Selectors

A

right to left -ex: #mainContent div p span {declarations} : browser will first find all the span in the document then eliminate the ones that are not within p tag etc.

26
Q

The Cascade

A

no matter where the styles are found the last rule applied wins. Styles are applied in the order they are found.

27
Q

Inheritance

A

some values are inherited by the children of an element in the document tree.

28
Q

Specificity

A

is a way to describe how specific a rule is. if cascade or inheritance resolves a conflict then the more specific rule wins.

29
Q

Rendering Engine

A

aka web browser engine or layout engine. it is a software component laying out the content.

30
Q

Common Rendering Engines

A

Trident (IE AOL) Presto (Opera) Gecko (Firefox) WebKit(Safari Chrome)

31
Q

Web Standards

A

Web Standards Project / W3C / Mozilla Foundation

32
Q

Importance of Standards

A

ensures consistent design and user experience across multiple browsers