The document outlines key concepts of CSS, including the box model, advantages of CSS, RGB color system, and differences between classes and IDs. It explains various CSS selectors, viewport units (vh/vw), and distinctions between inline and block elements. Additionally, it compares CSS Grid and Flexbox layout systems and discusses CSS specificity.
Download as TXT, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
3 views
CSS assignment
The document outlines key concepts of CSS, including the box model, advantages of CSS, RGB color system, and differences between classes and IDs. It explains various CSS selectors, viewport units (vh/vw), and distinctions between inline and block elements. Additionally, it compares CSS Grid and Flexbox layout systems and discusses CSS specificity.
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1
1.What are the elements of the CSS Box Model?
The CSS box model is essentially a box that wraps around every HTML element. It consists of: content, padding, borders and margins.
2.Explain a few advantages of CSS.
. Separation of Content from Design CSS allows you to separate your HTML content from styling, making your code cleaner and easier to maintain and manage. . CSS style Consistency CSS styles can be reused across multiple pages, saving time and effort.
3.What is meant by RGB color?
RGB is a color system based on the additive mixture of three primary colors: Red , Green and Blue , hence the acronym RGB.
4.What is the difference between a class and an ID?
id has higher specificity in CSS compared to class, meaning styles applied using id will override styles applied using class.
5.What are the different types of Selectors in CSS?
6.What is VH/VW (viewport height/ viewport width) in CSS?
The vh unit in CSS stands for viewport height, representing 1% of the viewport's total height. It's used for responsive design, dynamically scaling elements based on the user's viewport height.The vw unit in CSS stands for viewport width, representing 1% of the viewport's total width. It's used for responsive design, scaling elements dynamically based on the width of the user's viewport.
7.What is the difference between inline and block?
Block elements: They consume the entire width available irrespective of their sufficiency. They always start in a new line and have top and bottom margins. It does not contain any other elements next to it.Examples: <h1>-<h6>,<div>,<p> Inline elements: Inline elements occupy only enough width that is sufficient to it and allows other elements next to it which are inline. Examples: <a>,<input>,<img>
8.What are Pseudo classes?
A pseudo-class is used to define a special state of an element.
9.Difference between CSS grid vs flexbox?
CSS Grid Layout, is a two-dimensional grid-based layout system with rows and columns. It makes easier to design web pages without having to use floats and positioning. Like tables, grid layout allow us to align elements into columns and rows. The CSS Flexbox offers one-dimensional layout. It is helpful in allocating and aligning the space among items in a container (made of grids). It works with all kinds of display devices and screen sizes
10.Explain CSS specificity.
If there are two or more CSS rules that point to the same element, the selector with the highest specificity will "win", and its style declaration will be applied to that HTML element.
Building a Future Proof Cloud Infrastructure A Unified Architecture for Network Security and Storage Services 1st Edition Gai - Download the ebook now to start reading without waiting