Intro to CSS Flashcards
What does CSS stand for?
Cascading Style Sheets
What is CSS used for?
Styling HTML content on a web page
What does syntax mean?
Method
What are the two different syntaxes for writing CSS code?
Ruleset and Inline Style
Declaration
Apply a style to a selected element
Selector
Target the element that is styled
Declaration box
The code in between the curly brackets, contains declarations
Property
The first part of the declaration that tells what part of the element will be modified
Value
The value of the property
Style attribute
Used to add CSS inline code to an opening tag in an HTML element
Why is <em>inline style</em> good for CSS?
It allows you to write CSS code in an HTML document
How do you style an HTML element?
Using the <em>style</em> attribute, set it to the CSS styles you want to add
Example:
< p style = ‘ color : red ; ‘ > Text < / p >
How do you add more than one styles to a single element
Do it in the same attribute, but add a ; after each style
Example:
< p style= ‘ color : red ; font-size : 20px ‘ > Text < /p >
<em>Style element</em>
Put inside the head, it allows you to write CSS code in its own dedicated section
What is an internal stylesheet
CSS code inside the style document