CSS Flashcards
What is CSS?
CSS stands for Cascading Style Sheet. It is a popular styling language which is used with HTML to design websites. It can also be used with any XML documents including plain XML, SVG, and XUL.
How can you integrate CSS on a web page?
Inline, Embedded, or External page.
What is Embedded Style Sheet?
When a stylings are ‘embedded’ in an HTML document using the < style > tags.
What is the use of CSS Opacity?
Opacity is used determine the transparency level of an object.
What is the difference between class selectors and id selectors?
ID’s are used to apply styles to one specific element. Classes can be used to apply to styles to multiples elements.
What is the CSS Box model and what are its elements?
The CSS box model is used to define the design and layout of elements of CSS.
The elements are:
Margin - It removes the area around the border. It is transparent.
Border - It represents the area around the padding
Padding - It removes the area around the content. It is transparent.
Content - It represents the content like text, images, etc.
What is the purpose of the z-index?
The z-index helps to specify the stack order of positioned elements that may overlap one another. The z-index default value is zero and can take on either a positive or negative number.
An element with a higher z-index is always stacked above than a lower index.
Explain the difference between visibility: hidden and display: none?
visibility: hidden hides the element, but it occupies space and affects the layout of the document.
display: none also hides the element but not occupy space. It will not affect the layout of the document.