(Fundamentals, Colors, and Styling) Flashcards
25 cards from real CSS practice questions. Tap to flip, then mark Knew It or Still Learning โ missed cards come back until you master them.
Read the first 20 (Fundamentals, Colors, and Styling) flashcards as text
The abbreviation CSS stands for __________
Answer: Cascading Style Sheets
CSS is an acronym that stands for Cascading Style Sheets. It is a style sheet language used for describing the presentation of a document written in HTML or XML. The 'Cascading' aspect refers to how styles are applied and overridden based on specificity, inheritance, and order within the stylesheet.
h1 is also known as_______ in CSS.
Answer: Selector
In CSS, `h1` refers to an HTML element type. When you write `h1 { color: blue; }`, `h1` acts as a type selector (or element selector) to target all `h1` elements on the page. Selectors are fundamental patterns used in CSS to choose the HTML elements that you want to style.
To embed CSS in an HTML page, which of the following tags is used?
Answer:
To embed CSS directly within an HTML page, the `` tag is used. This tag is typically placed within the `` section of the HTML document and contains the CSS rules that will be applied to the elements on that specific page, creating an internal stylesheet.
Text, list, box, margin, border, color, and background properties have been introduced by __________.
Answer: css
CSS (Cascading Style Sheets) is specifically designed to control the presentation and layout of web pages. Properties related to text formatting, list markers, the box model (margin, border), colors, and backgrounds are all core features introduced and managed by CSS, allowing for rich visual styling.
Which selector is used to specify a binding rule for a single unique element?
Answer: id
The `id` selector is used to apply styles to a single, unique element within an HTML document. An `id` attribute must have a unique value across the entire page, making the `#id` selector the most specific way to target and style one particular element.
The filter property blurs the images using which of the following elements?
Answer: blur()
The `filter` CSS property allows you to apply graphical effects to an element. The `blur()` function is a specific value for this property that applies a Gaussian blur effect, making the element appear out of focus to a specified degree.
Which of the following functions is used by the filter property to change the brightness of an element's color?
Answer: brightness()
The `filter` CSS property can modify the visual rendering of an element. The `brightness()` function is one of its available values, used to adjust the overall brightness level of an element's colors, making it appear lighter or darker.
Which of the following functions is used by the filter property to modify the difference between light and dark values?
Answer: contrast()
The `filter` property in CSS provides various functions for visual adjustments. The `contrast()` function specifically modifies the difference between the light and dark values of an element, allowing you to enhance or reduce the distinction between its colors.
Which of the following functions flips the colors of an element so that the filter property can use it?
Answer: invert()
The `invert()` function, when used with the CSS `filter` property, flips the colors of an element. This means that light colors become dark and dark colors become light, effectively creating a photographic negative effect on the element's appearance.
For use by the filter property, which of the following functions applies a saturation effect to an element's color, making it appear more or less vivid?
Answer: saturation()
The `filter` property in CSS allows for applying various visual effects to an element. The `saturate()` function (often referred to as saturation) is used to apply a saturation effect to an element's colors, making them appear more or less vivid and intense.
Which of the following are Webkit's CSS Extension Prefixes?
Answer: -webkit
Vendor prefixes are used by browser engines to implement experimental or non-standard CSS features before they are fully standardized. `-webkit-` is the specific prefix used by the WebKit rendering engine, which powers browsers like Safari and older versions of Chrome.
What CSS property is the equivalent of the attribute?
Answer: align
The deprecated HTML `` tag was used to horizontally center content. In modern CSS, the `text-align` property with a value of `center` is used to achieve this effect for inline content within a block element. For block elements, `margin: auto` is typically used for horizontal centering.
Which CSS property is the same as the attribute?
Answer: font-style
The deprecated HTML `` tag was used to control various aspects of text appearance, including font family, size, and style. In CSS, `font-style` is the property specifically used to set text to italic or oblique, which was one of the capabilities of the `` tag.
To give a line above the text, which of the following CSS properties is used?
Answer: text-decoration: overline
The `text-decoration` CSS property is used to add decorative lines to text. Setting its value to `overline` specifically draws a line directly above the text, providing a visual emphasis distinct from `underline` or `line-through`.
On February 25, 2004, _________ was designated as a Candidate Recommendation, but on June 13, 2005, it was reverted to a Working Draft for further evaluation.
Answer: CSS level 2.1
CSS level 2.1 (CSS 2.1) was a major revision of CSS2, intended to correct errors, clarify definitions, and incorporate widely implemented features. Its development involved a long process, including being designated as a Candidate Recommendation before being reverted to a Working Draft for further refinement.
___________ has a grammar, but it is not defined with a document type definition like regular (X)HTML.
Answer: CSS 2.1
CSS 2.1, while a robust styling language, defines its own grammar for its syntax and rules. Unlike some XML-based languages, its grammar is not formally defined using a Document Type Definition (DTD), which is typically associated with (X)HTML documents.
CSS properties for manipulating the position of "ruby," which are little annotations on top of or next to words that are particularly common in Chinese and Japanese, are described in ___________ .
Answer: ruby
The `ruby` CSS properties are specifically designed to control the presentation of 'ruby annotations.' These are small annotations, often used in East Asian typography (like Japanese furigana), that appear above or next to base text to provide pronunciation guides or additional information.
We don't have to reapply style information throughout the document or to external documents when using Inline Style.
Answer: A) False
This statement is false. Inline styles are applied directly to individual HTML elements using the `style` attribute. This approach requires reapplying the style information to every single element you want to affect, making it highly inefficient for styling multiple elements or maintaining consistency across a document or website.
Which of the following tags should be used to link information inside?
Answer:
The `` tag in an HTML document is used to contain metadata about the document, including its title, character set, and links to external resources. This is where you typically link external CSS stylesheets using the `` tag or embed internal CSS using the `` tag.
Which of the following measurements is used to define a measurement in relation to the x-height of a font?
Answer: ex
The `ex` unit in CSS is a relative length unit that is defined in relation to the x-height of the font. The x-height typically refers to the height of the lowercase 'x' in the current font, making `ex` useful for sizing elements relative to the font's lowercase characters.