CSS

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

What is an example of the CSS class Selector?

.center {text-align: center;color: red;} and p.center {text-align: center;color: red;} and <p class="center large"> This paragraph refers to two classes. </p>

What is an example of Inline CSS?

<!DOCTYPE html> <html> <body> <h1 style="color:blue;text-align:center;"> This is a heading</h1> <p style="color:red;">This is a paragraph.</p> </body> </html>

What is an example of external CSS?

<!DOCTYPE html> <html> <head> <link rel="stylesheet" href="mystyle.css"> </head> <body> <h1>This is a heading</h1> <p>This is a paragraph.</p> </body> </html> and body {background-color: lightblue;} h1 {color: navy;margin-left: 20px;}

What is an example of internal CSS?

<!DOCTYPE html> <html> <head> <style>body {background-color: linen;} h1 {color: maroon;margin-left: 40px;} </style> </head><body> <h1>This is a heading</h1> <p>This is a paragraph.</p> </body> </html>

Why use CSS?

define styles for web pages and variations in different devices and screen sizes

What are the five categories of selectors?

Simple selectors Combinator selectors Pseudo-class selectors Pseudo-elements selectors Attribute selectors

What is the CSS id selector?

The id selector uses the id attribute of an HTML element to select a specific element.

What is an example of the CSS id selector?

#para1 {text-align: center;color: red;}

What is an example of the CSS Universal Selector?

* {text-align: center;color: blue;}

What does a CSS rule-set consist of?

A selector and a declaration block

What is Cascading Order

All the styles in a page will "cascade" into a new "virtual" style sheet by the following rules, where number one has the highest priority: Inline style (inside an HTML element) External and internal style sheets (in the head section) Browser default

What is Inline CSS?

An inline style may be used to apply a unique style for a single element.

What is Internal CSS?

An internal style sheet may be used if one single HTML page has a unique style.

What are the three ways to insert CSS?

External CSS Internal CSS Inline CSS

What is Multiple Style Sheets?

If some properties have been defined for the same selector (element) in different style sheets, the value from the last read style sheet will be used.

What does the declaration block do?

It contains one or more declarations separated by semicolons

What problem did CSS solve?

It gave an easy and clear way to style webpages, since HTML was intended to be for the content of the webpage, not the style.

What does the selector do?

It point to the HTML element you want to style

What is the CSS element selector?

It selects HTML elements based on the element name.

What is CSS?

Style sheet language that provides the formatting and "look" of a Web page or document written in a markup language.

What is the CSS class Selector?

The class selector selects HTML elements with a specific class attribute.

What is the CSS Grouping Selector?

The grouping selector selects all the HTML elements with the same style definitions.

What is the CSS Universal Selector?

The universal selector (*) selects all HTML elements on the page.

What is External CSS?

With an external style sheet, you can change the look of an entire website by changing just one file!

What is an example of Multiple Style Sheets?

h1 {color: navy;} and h1 {color: orange; } and <head> <link rel="stylesheet" type="text/css" href="mystyle.css"><style> h1 {color: orange;} </style> </head> and <head> <style> h1 {color: orange;} </style> <link rel="stylesheet" type="text/css" href="mystyle.css"></head>

What is an example of the CSS Grouping Selector?

h1 {text-align: center;color: red;} h2 {text-align: center;color: red;} p {text-align: center;color: red;} and h1, h2, p {text-align: center;color: red;}

What is an example of the CSS element selector?

p {text-align: center;color: red;}


Ensembles d'études connexes

Microeconomics chapter 3 exam- J Baker -Online- Owens

View Set

ch 18 test answers and questions

View Set

Psych 1102 Exam 3 Study Guide, Ch. 3-6

View Set

' the impact of globalisation has transformed and improved places beyond recognition' with reference to your distant place, critically assess the statement (20)

View Set

Marketing Flashcards: Pre- and Post-Midterm Combined

View Set