If you have any query feel free to chat us!
Happy Coding! Happy Learning!
CSS (Cascading Style Sheets) is a stylesheet language used for describing the look and formatting of a HTML document. CSS can be used to control the layout, font, color, and other visual aspects of a web page.
CSS can be added to a HTML document in three ways:
style
attribute. For example:cssCopy code
<p style="color: blue;">This is a blue paragraph.</p>
<head>
section of a HTML document using the <style>
tag. For example:phpCopy code
<head>
<style>
p {
color: blue;
}
</style>
</head>
<body>
<p>This is a blue paragraph.</p>
</body>
<link>
tag. For example:phpCopy code
<head>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<p class="blue">This is a blue paragraph.</p>
</body>
The content of style.css
file:
cssCopy code
.blue {
color: blue;
}
In CSS, styles are applied to HTML elements using selectors. Selectors can be based on the element type (e.g. p
), class (e.g. .blue
), or ID (e.g. #red
). For example:
cssCopy code
p {
color: blue;
}
.blue {
color: blue;
}
#red {
color: red;
}
CSS can also be used to control the layout of a web page using the display
, float
, position
, and flex
properties. For example:
cssCopy code
header {
background-color: lightgray;
display: flex;
justify-content: space-between;
align-items: center;
padding: 20px;
}
main {
display: flex;
justify-content: center;
}
aside {
width: 200px;
background-color: lightgray;
padding: 20px;
}
footer {
background-color: lightgray;
text-align: center;
padding: 20px;
}
Comments: 2
I am not able to access videos from second class and further. I have already completed first class
When will I get my course?
Now, Your query was resolved.