CSS Fundamentals Flashcards
CSS stands for __________.
Cascading Style Sheets
CSS describes the ______ and ______ of the content written in HTML.
visual style and presentation
CSS consists of countless _________ that developers use to format the content.
properties
Property and a value is a ________ or style.
declaration
All of the style/declaration make up the _________, basically all the code inside the curly braces.
declaration block
A declaration is consist of _______
property and value
All of this together, the selector plus the declaration block is what we call a _______.
CSS rule
There are three places where we can write CSS and these are ________
inline CSS, internal CSS, and external CSS
It’s basically writing CSS code inside of the element.
Inline CSS
We use the _____ attribute to write inline CSS
style
True or False: Inline CSS should never be used.
True
To write internal CSS, we will go inside the ______ element and then we declare the _______ element. From there we can now start writing some CSS rule.
<head> and <style>
</style></head>However, if we have a lot of CSS code, _______ is also not practical.
internal CSS
We never want to merge our HTML with CSS codes directly because it entangles two things in one file, we want to keep these two things separate, this principle is also called ______________.
separation of concerns.
With __________ we can separate things even more by putting all of our CSS code into a special CSS file.
External CSS
The main HTML should be named ___________ but when it comes to CSS, you can name the file whatever you want.
index.html
What element tag should we use to use our CSS file in our HTML? What are its two required attributes?
link element, href and rel attribute.
Determines the size of text
font-size
It sets whether a font should be styled with a normal, italic, or oblique face from itsfont-family.
font-style
This property allows you to uppercase a text element
text-transform
Specifies a prioritized list of one or more font family names and/or generic family names for the selected element.
font-family
True or false: You can make the h2 element for example bigger than the h1 element. It’s okay since h1 is all about semantics.
True
True or False: If we are selecting using an element as selector, it will select all of that element and in the page. It will also affect all of its child element (only if the style is about text).
True
The_______sets the height of a line box. It’s commonly used to set the distance between lines of text. On block-level elements, it specifies the minimum height of line boxes within the element.
line-height