@gauti123456
@geekygautam1997
š YOUTUBER & CODINGSHIKSHA.COM
šØāš» WEB DEVELOPER
šIndia
Answer: CSS outline the style of an HTML webpage, it is a language by which we can set the behavior of an HTML webpage. It describes how the HTML content will be shown on screen.
CSS controls the layout of several HTML web pages. CSS is referred to as the Cascading Style Sheet.
Answer: There are several modules in CSS as stated below:
There are three types of CSS as mentioned below.
External style sheet is very useful as we write all the styling codes in a single file and it can be used anywhere by just referencing the link of that external style sheet file.
Embedded style sheet gives us the privilege to define styles at one place in an HTML document.
<!DOCTYPE html>
<html>
<head>
<style type="text/css">
p {
font-family: georgia, serif;
font-size: x-large;
color:#ff9900;
}
a:hover {
color: LimeGreen;
text-decoration: none;
}
</style>
</head>
<body>
<p>Embedded style sheet gives us the privilege to define styles at one place in a HTML document.
We can generate multiple classes using embedded style sheet to use on multiple tag types a web page
and also there is no extra downloading required importing the information.
</p>
</body>
</html>By using CSS selector, we can choose the content which we want to style so that we can say that it is a bridge between the style sheet and the HTML files.
The syntax for CSS selector is āselectā HTML elements created on their id, class, type etc.
Tweening is the process in which we create intermediate frames between two images to get the appearance of the first image which develops into the second image.
It is mainly used for creating animation.
CSS image scripts is a group of images which is placed into one image.
It reduces the load time and request number to the server while projecting multiple images into a single web page.
It is a method in which we design and develop a web page according to the user activities and conditions which are based on various components like the size of the screen, portability of the web page on different device etc.
CSS counters are variables which can be incremented by rules of CSS that inspector track how many times the variable has been used.
CSS specificity is a score or rank that decides which style declaration has to be used to an element.
(*) this universal selector has low specificity while ID selectors have high specificity.
There are four categories in CSS which authorized the specificity level of the selector.
To calculate specificity we will start with 0, then we have to add 1000 for each ID and we have to add 10 to the attributes, classes or pseudo-classes with each element name or pseudo-element and later we have to add 1 to them.
h2
#content h2
<div id=ācontentā>
<h2 style=ācolor:#FF0000ā>heading</h2>
</div>
We can make a rounded corner by using the property āborder-radiusā. We can apply this property to any element.
#rcorners1 {
border-radius: 25px;
background: #715751;
padding: 20px;
width: 200px;
height: 150px;
}We can set the image to be used as the border image alongside an element by using the property of CSS āborder-imageā.
#borderimg {
border: 15px solid transparent;
padding: 20px;
border-image: url(border.png) 30 round;
}It is a property of CSS which allows you to display a smooth transformation between two or more than two specified colors.
There are two types of gradients that are present in CSS. They are:
It allows you to design a flexible responsive layout structure without using any float or positioning property of CSS. To use CSS flexbox you need to define a flex container initially.
<style>
.flex-container {
display: flex;
background-color: #f4b042;
}
.flex-container > div {
background-color: #d60a33;
margin: 10px;
padding: 20px;
font-size: 30px;
}
</style>It can be done by using the syntax verticle-align: middle in the <div1> element and even we can bind the two text spans around with another span and after this, we have to use verticle-align: middle in the content #icon.
In CSS, the margin is the property by which we can create space around elements. We can even create space to the exterior defined borders.
In CSS we have margin property as follows:
In CSS, padding is the property by which we can generate space around an elementās content as well as inside any known border.
CSS padding also has properties like,
In CSS, the box model is a box that binds all the HTML elements and it includes features like margins, border, padding, and the actual content.
By using box model we will get the authority to add the borders all around the elements and we can also define the space between the elements.
We can add icons to the HTML webpage by using an icon library like font-awesome.
We have to add the name of the given icon class to any inline HTML element. (<i> or <span>) . Icons in the icon libraries are scalable vectors that can be customized with CSS.
It is a class which is used to define a special state of an HTML element.
This class can be used by styling an element when a user snooped over it and also it can style an HTML element when it gets the focus.
selector:pseudo-class {
property:value;
}External style sheet is very useful as we write all the styling codes in a single file and it can be used anywhere by just referencing the link of that external style sheet file.
It is a class which is used to define a special state of an HTML element.
This class can be used by styling an element when a user snooped over it and also it can style an HTML element when it gets the focus.
selector:pseudo-class {
property:value;
}It is a feature of CSS which is used to style the given parts of an element.
selector::pseudo-element {
property:value;
}It is the property which elaborates the transparency of an element.
By this property, we can transparent the image that can take the values from 0.0-1.0, if the value is lower then the image is more transparent. IE8 and earlier version of the browser can take the values from 0-100
img {
opacity: 0.6;
filter: alpha(opacity=60); /* For IE8 and earlier */}In CSS, there are four position states as stated below:
By using navigation bars we can make an ordinary HTML page into a user-specific and more dynamic web page.
Basically, it is a list of links, hence use of <ul> and <li> elements makes the perfect sense.
ul {
list-style-type: none;
margin: 0;
padding: 0;
}The main difference between relative and absolute is that ārelativeā is used for the same tag in CSS and it means that if we write the left:10px then the padding will shift to 10px in the left while absolute is totally relative to the non-static parent.
It means if we write left:10px then the result will be 10px far from the left edge of the parent element.
Important declarations are defined as that declaration which is having more importance than the normal declaration.
While executing, these declarations override the declaration which is having less importance.
Example,Ā if there are two users Having important declaration then one of the declarations will override the declaration of another user.
For Example:
Body {background: #FF00FF !important; color: blue}
In this body background has more weight than the color.
thanks for watching