Podcast
Questions and Answers
Which CSS comment style is NOT supported in CSS?
Which CSS comment style is NOT supported in CSS?
- /** double asterisk comments **/
- /* multi-line comments */
- // double-slash comments (correct)
What does the 'font-style' property in CSS enable/disable?
What does the 'font-style' property in CSS enable/disable?
- Overline style
- Underline style
- Italic style (correct)
- Line-through style
Which CSS property determines how large the letters will be drawn on a webpage?
Which CSS property determines how large the letters will be drawn on a webpage?
- letter-spacing
- text-size
- font-weight
- font-size (correct)
In CSS, what should you do to enclose multi-word font names?
In CSS, what should you do to enclose multi-word font names?
Which generic font name ensures that every computer will use a valid font if the first specified font is not found?
Which generic font name ensures that every computer will use a valid font if the first specified font is not found?
What unit can be used for specifying font size in CSS?
What unit can be used for specifying font size in CSS?
What is the definition of 1 em in terms of font size?
What is the definition of 1 em in terms of font size?
Which CSS property is used to adjust the spacing between letters in text?
Which CSS property is used to adjust the spacing between letters in text?
What does the 'font-weight: bold;' CSS property do?
What does the 'font-weight: bold;' CSS property do?
Which unit of measurement specifies a number of pixels on the screen?
Which unit of measurement specifies a number of pixels on the screen?
What is the primary function of 'text-indent' in CSS?
What is the primary function of 'text-indent' in CSS?
How is 'text-align' commonly used in CSS?
How is 'text-align' commonly used in CSS?
What does the link tag in HTML specify?
What does the link tag in HTML specify?
How can a browser locate a specific element on a webpage using an ID?
How can a browser locate a specific element on a webpage using an ID?
What is the purpose of the ID attribute in HTML?
What is the purpose of the ID attribute in HTML?
What does using an ID selector like #mission in CSS allow you to do?
What does using an ID selector like #mission in CSS allow you to do?
Why must each page ID be unique in HTML?
Why must each page ID be unique in HTML?
What is the significance of specifying a link target with an ID at the end preceded by a #?
What is the significance of specifying a link target with an ID at the end preceded by a #?
What CSS property is used to define the border thickness and style?
What CSS property is used to define the border thickness and style?
Which of the following is not a valid border style in CSS?
Which of the following is not a valid border style in CSS?
When specifying width in CSS, which unit can be used?
When specifying width in CSS, which unit can be used?
What does the 'max-width' property in CSS define?
What does the 'max-width' property in CSS define?
Which CSS property is used to set margins on all four sides equally?
Which CSS property is used to set margins on all four sides equally?
What does the 'background-color' property in CSS define?
What does the 'background-color' property in CSS define?
What does the CSS context selector 'selector1 > selector2' achieve?
What does the CSS context selector 'selector1 > selector2' achieve?
In the CSS Box Model, what does 'margin' represent?
In the CSS Box Model, what does 'margin' represent?
What does the CSS property 'border: 5px solid red;' apply in the example given?
What does the CSS property 'border: 5px solid red;' apply in the example given?
In the example given, what does 'li strong { text-decoration: underline; }' apply?
In the example given, what does 'li strong { text-decoration: underline; }' apply?
Which statement best describes applying styles to output n in CSS?
Which statement best describes applying styles to output n in CSS?
What does 'HTML #ad li.important strong { text-decoration: underline; }' target in the more complex example?
What does 'HTML #ad li.important strong { text-decoration: underline; }' target in the more complex example?
Flashcards are hidden until you start studying
Study Notes
Border Properties
- Border thickness can be specified in px, pt, em, or thin, medium, or thick.
- Border style can be none, hidden, dotted, dashed, double, groove, inset, outset, ridge, or solid.
- Border color can be specified.
Dimensions
- Width and height properties specify the size of an element.
- Max-width, max-height, min-width, and min-height properties specify the maximum and minimum size of an element in a given dimension.
Margins
- Margin property specifies the margin on all four sides of an element.
- Margin-bottom, margin-left, margin-right, and margin-top properties specify the margin on a specific side of an element.
Fonts
- Font-family property specifies the font to use.
- Font-size property specifies the size of the font.
- Font-style property enables or disables italic style.
- Font-weight property enables or disables bold style.
Text Properties
- Text-align property specifies the alignment of text within its element.
- Text-decoration property specifies decorations such as underlining.
- Line-height, word-spacing, and letter-spacing properties specify gaps between the various portions of the text.
- Text-indent property indents the first letter of each paragraph.
CSS Comments
- CSS comments are not supported in the same way as programming languages like Java.
- The // single-line comment style is not supported in CSS.
- The HTML comment style is not supported in CSS.
ID Selectors
- ID selectors apply a style to an element with a unique ID.
- Each ID must be unique on a page.
Class Attribute
- The class attribute has no on-screen appearance, but you can apply a style or ID to it, which will be applied to the text inside the span.
Context Selectors
- Context selectors apply properties to an element only if it is inside another element on the page.
- The > symbol is used to specify a direct child element.
The CSS Box Model
- Every element is composed of content, border, padding, and margin.
- The width and height of an element are calculated by adding the content width/height, padding, border, and margin.
CSS Properties for Borders
- Border property can be used to specify the border thickness, style, and color.
Studying That Suits You
Use AI to generate personalized quizzes and flashcards to suit your learning preferences.