Section 5 - Introduction to CSS Flashcards
What does CSS stand for?
Cascading Style Sheets
(applied like a waterfall)
What is Style Sheet (SS) language?
a type of language (similar to how HTML is a markup language)
What is the most important Style Sheet (SS) language to know for web developers?
Cascading Style Sheets (CSS)
What are the 3 ways we can add CSS to our HTML website?
- Inline
- Internal
- External
What is the style attribute?
an attribute that is globally available to all tags (not just HTML like image, break, etc)
With CSS, when is inline used?
when adding CSS style to a single element on your HTML page
Where do you place inline CSS?
goes in the same line as a particular HTML element in the opening tag
<html>
</html>
Attributes normally have what 2 defining characteristics?
- A name for the attribute
- A value for the attribute
<html>
style = name
background: blue = value
</html>
What do you add in the value section of an attribute (in terms of CSS?)
you add the CSS code
In the value section where we add our CSS code, what are the 2 ways it’s broken down?
- First part is the property you want to change (background)
- Second part is the value of that property that you want to set it to
<html>
</html>
background = property you want to change
blue = value you want to set it to
What is the special HTML tag to addinternal CSS?
<style>
</style>
When do you add internal CSS?
when you want to add CSS to a single HTML document (not a multi-page website)
[can apply to anywhere in our HTML, and inside target as many elements as we want]
Where do you add internal CSS?
Developers usually put it in the head section, but it can be applied anywhere within the HTML document
Besides adding the special HTML tag for internal CSS, what else do we need to add?
a selector
<style>
html { background: red; html = selector</style>
Where do you add a selector in internal CSS?
a selector comes before a set of curly brackets
<style>
html { background: red; html = selector</style>