Podcast
Questions and Answers
Which CSS property is used to specify the font family that should be applied to an element?
Which CSS property is used to specify the font family that should be applied to an element?
- font-size
- font-family (correct)
- font-weight
- font-style
How should multiple font names be separated in CSS?
How should multiple font names be separated in CSS?
- With semicolons
- With spaces
- With hyphens
- With commas (correct)
Which CSS property sets the size of the text?
Which CSS property sets the size of the text?
- font-weight
- font-style
- font-family
- font-size (correct)
If the font name contains more than one word, how should it be formatted in CSS?
If the font name contains more than one word, how should it be formatted in CSS?
Which of the following is not a valid value for the CSS font-size property?
Which of the following is not a valid value for the CSS font-size property?
What value would you use with the font-weight property to make text bold?
What value would you use with the font-weight property to make text bold?
Which CSS property would you use to make text italic?
Which CSS property would you use to make text italic?
Which value of the font-style property is not commonly supported?
Which value of the font-style property is not commonly supported?
Which one of these values is not valid for the CSS font-weight property?
Which one of these values is not valid for the CSS font-weight property?
Which CSS property is used to apply text decoration such as underline or overline?
Which CSS property is used to apply text decoration such as underline or overline?
How would you turn off underlines that appear automatically under linked text using CSS?
How would you turn off underlines that appear automatically under linked text using CSS?
What value does the text-transform property need to convert all text to lowercase?
What value does the text-transform property need to convert all text to lowercase?
Which of these options is not a valid value for the CSS text-align property?
Which of these options is not a valid value for the CSS text-align property?
Flashcards are hidden until you start studying
Study Notes
CSS Text Formatting
- CSS text formatting properties include text-align, text-transform, and color properties.
CSS Styling Font
- In CSS, fonts are specified using a bundle of font-related properties for typeface, size, weight, and font style.
The font-family Property
- Specifies one or more font or generic font family names, separated by commas.
- Uses a "fallback" system to ensure maximum compatibility between browsers/operating systems.
- Font names with more than one word must be in quotation marks, e.g. "Times New Roman".
The font-size Property
- Specifies the size of the text.
- Values can be length units (e.g. px), percentages, or predefined values (e.g. xx-small, small, medium, large, etc.).
- Always use proper HTML tags for headings and paragraphs.
The font-style Property
- Specifies italic text.
- Has three values: normal, italic, and oblique.
- Oblique is similar to italic but less supported.
Font Weight (Boldness)
- Specifies the boldness of text.
- Values can be normal, bold, bolder, lighter, or a numerical value from 100 to 900.
- Example:
<p style="font-weight:bold;">
CSS Text Formatting
- CSS text formatting properties include text-align, text-transform, and color properties.
CSS Fonts
- Fonts in CSS are specified using a bundle of font-related properties for typeface, size, weight, and font style.
The font-family Property
- The font-family property takes one or more font or generic font family names separated by commas as values.
- The font names should be separated by commas, and if the font name is more than one word, it must be in quotation marks.
- Example:
p {font-family: "Times New Roman", Times, serif;}
The font-size Property
- The font-size property sets the size of the text.
- Values can be a length unit, percentage, or keyword (xx-small, x-small, small, medium, large, x-large, xx-large, smaller, larger).
- Always use proper HTML tags for headings and paragraphs.
- Example:
h1 {font-size: 40px;} h2 { font-size: 30px;}
The font-style Property
- The font-style property specifies italic text.
- Values can be normal, italic, or oblique.
- Example:
p{font-style: normal;} h1 {font-style: italic;}
Font Weight (Boldness)
- The font-weight property adjusts the boldness of type.
- Values can be normal, bold, bolder, lighter, or a numeric value (100-900).
- Example: ``
Studying That Suits You
Use AI to generate personalized quizzes and flashcards to suit your learning preferences.