WD PracticeQunit3
WD PracticeQunit3
CSS frameworks are libraries that make web page styling easier. Some of them are
Foundation, Bootstrap, Gumby, Ukit, Semantic UI, etc.
A universal selector is a selector that matches any element type's name instead of selecting
elements of a particular type.
Example:
<style>
*{
color: blue;
font-size: 10px;
</style>
The ruleset is used for the identification of selectors, which can be attached with other
selectors. The two parts of a ruleset are:
The main difference between CSS3 and CSS2 is that CSS divides different sections into
modules and supports many browsers. It also contains new General Sibling Combinators
responsible for matching similar elements.
There are three ways of integrating CSS into HTML: using style tags in the head section,
using inline-styling, writing CSS in a separate file, and linking into the HTML page by the
link tag.
With CSS, different documents can be controlled using a single site, styles can be grouped in
complex situations using selectors and grouping methods, and multiple HTML elements can
have classes.
RGB represents colors in CSS. The three streams are namely Red, Green, and Blue. The
intensity of colors is represented using numbers 0 to 256. This allows CSS to have a spectrum
of visible colors.
CSS was developed to define the visual appearances of websites. It allows developers to
separate the structure and content of a website that was not possible before.
speech
audio
visual
tactile media
interactive media
h3 {
background-repeat: none;
1. CSS cannot always assure compatibility with every browser; you need to be
cautious while choosing the style selector.
2. The parent selector tag is not available, thus you can’t select the parent selector
tag.
3. Some selectors can lead to cross-browser issues due to their less browser-friendly
behavior.
1. With the help of a link tag, you can include an external style sheet file as a CSS
file into your HTML file.
2. You can add CSS styles included within your HTML page and write it in the
stand-alone stylesheet form of CSS.
3. CSS can be included directly in the HTML tag by adding an inline style to HTML
elements.
4. One can import an external stylesheet file as a new CSS file by using the @import
rule.
Yes, it is the most crucial thing or the most important trial to do when you design a webpage
for the first time and make changes to it. Testing your website periodically in different
browsers will help you make every webpage compatible with it as browsers have been going
through many updates.
In this example, the color will be red on the anchor tag when it’s hovered.
a:hover {
color: #FFOOFF;
18. How do you specify units in the CSS? What are the different ways to do it?
There are mainly four different units in the CSS that are px, em, pt, and percentage (%).
1. Px (Pixel) is used for fine-grained control and alignment and not cascade. To get it sharp,
we can use 1px or multiple of px.
2. Em is used to maintain relative size and responsive fonts. 1em = 16px having also the
same font size. It is advisable to set the font size to 10px in common practice.
4. Percentage (%) is used to set the font size with respect to the font size of the body. Thus, it
is necessary to set the reasonable font size of the body.
No, mMargin-top or margin-bottom does not have an effect on the inline elements.
The font-family property is used for changing the font face that is applied to the element in
the DOM.
21. What are the differences between adaptive design and responsive design?
Adaptive Design:
It is very time-consuming and takes a lot of effort to build the best possible adaptive
design as examining it will need to go for many options with respect to the realities of the
end user.
There are six standard screen sizes for the appropriate layouts; they are 320px, 480px,
760px, 960px, 1200px, 1600px to design.
Responsive Design
It takes less time to build the design and there is no screen size issue irrespective of
content.
It uses CSS media queries to design the screen layouts with respect to specific devices and
property changes in the screen.
22. How are the CSS selectors matched against the elements by the browser?
Initially, there is a filtration of elements in the DOM via browsers with respect to key
selectors that are traversed until we get parents' elements to determine the matches. Then the
browser works on finding all the span elements present in the DOM and traverses them to
parent elements to check whether they are matched to paragraph p elements. At last, when the
browser finds all matches as parents, the matching process will be stopped and there will be
black color applied to the content.