CSS Basics Flashcards
What is CSS?
Cascading Style Sheets. A language developed to control the presentation of markup language documents.
What are style sheets?
collection of formatting rules
In CSS cascade means?
styles are applied to pages in the order they are found
What are some benefits of user control (users overriding the styles)?
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.
what is syntax?
arrangement of words and phrases to create well-formed sentences in a language
parts of CSS Syntax
Selector
Declaration
Property
Value
what is a css selector?
patterns used to select the element(s) you want to style
what is a css decleration?
formatting instructions enclosed in curly braces
css declaration rule
property: value;
whitespaces?
Important within a selector. not important in declarations.
good way to learn css syntax?
focus on basic elements first. explore thee css specifications. read through css from other sites.
universal selector
- matches any element
ex: * { property:value;}
what is element type selector?
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;}
what is class selectors?
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}
what is ID selectors?
HTML attributes that can be set on any HTML element and must be unique to the page. -ex: #idSelector {declarations}