Chapter 3 Quiz Flashcards
To further the effort to let HTML be used to define the structure of a document only, and not appearance, what was introduced?
Cascading style sheets
What is a cascading style sheet?
Code that specifies formatting based styles
What are three ways to apply CSS?
inline style, internal style, and external style
What is the simplest way to attach a tag?
Using inline styles
What is the correct syntax for displaying the level 1 heading “I’m so blue” in blue italics using inline style formatting?
h1 style=”color: blue; font-style: italic;” I’m so blue /h1
Where are inline styles defined?
Within the HTML tag
An inline style is created by adding what attribute to an HTML tag?
Style attribute
A CSS property is separated from its value by what?
Colon and a space
Multiple CSS property-value pairs are separated from each other by what?
Semi-colon and a space
What does the span tag do?
It allows us to set an inline style for all the content within the tag.
What is the drawback of inline styles?
They need to be created within each tag, one-time use, difficult to maintain, harder to read, need to be created everywhere and every time it is needed.
How are internal styles different from inline styles?
Internal styles are defined within the head section of the document and not in each individual tag. Internal styles affect the entire page while inline style only affects the tag it is in.
Internal styles are defined within what specific tag in the head section of an HTML document?
style
If internal styles aren’t defined within an HTML tag, how does the browser know where to apply the style?
By the selector.
Within the style tag, what is the type attribute set to in all cascading style sheets?
text/css
What are selectors?
Pieces of code that determine what sections of a page are affected by a specific style.