- Get link
- X
- Other Apps
code of HTML and CSS -
1. How we take change color in css (color and border both property)
code -
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>color in css</title>
<style>
.color1{
background-color: green;
}
.color2{
color: yellow;
}
.color3{
border: 2px solid red;
}
</style>
</head>
<body>
<!-- lets take paragarph -->
<p class="color1">
In display property if we apply inline-block property on it we can be set their width and height and element was set next to a element in line it not take extra space so in easy word it is work as both block element who's width and height can be changed
</p>
<p class="color2">
In display property if we apply inline-block property on it we can be set their width and height and element was set next to a element in line it not take extra space so in easy word it is work as both block element who's width and height can be changed
</p>
<p class="color3">
In display property if we apply inline-block property on it we can be set their width and height and element was set next to a element in line it not take extra space so in easy word it is work as both block element who's width and height can be changed
</p>
</body>
</html>
output on web page -
In display property if we apply inline-block property on it we can be set their width and height and element was set next to a element in line it not take extra space so in easy word it is work as both block element who's width and height can be changed
In display property if we apply inline-block property on it we can be set their width and height and element was set next to a element in line it not take extra space so in easy word it is work as both block element who's width and height can be changed
In display property if we apply inline-block property on it we can be set their width and height and element was set next to a element in line it not take extra space so in easy word it is work as both block element who's width and height can be changed
2. HTML and CSS background code -
code -
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title> css</title>
<style>
.bac1{
/* In this paragraph we take simple color on background */
background-color: green;
border: 2px solid red;
}
.bac2{
/* In this we take a image on background */
background-image: url('folder_name/image_name with extension');
}
.bac3{
/* background image with opacity */
background-color: indigo;
opacity: 0.5;
}
</style>
</head>
<body>
<!-- lets take paragarph -->
<p class="bac1">
In display property if we apply inline-block property on it we can be set their width and height and element was set next to a element in line it not take extra space so in easy word it is work as both block element who's width and height can be changed
</p>
<p class="bac2">
In display property if we apply inline-block property on it we can be set their width and height and element was set next to a element in line it not take extra space so in easy word it is work as both block element who's width and height can be changed
</p>
<p class="bac3">
In display property if we apply inline-block property on it we can be set their width and height and element was set next to a element in line it not take extra space so in easy word it is work as both block element who's width and height can be changed
</p>
</body>
</html>
output on web page -
In display property if we apply inline-block property on it we can be set their width and height and element was set next to a element in line it not take extra space so in easy word it is work as both block element who's width and height can be changed
In display property if we apply inline-block property on it we can be set their width and height and element was set next to a element in line it not take extra space so in easy word it is work as both block element who's width and height can be changed
In display property if we apply inline-block property on it we can be set their width and height and element was set next to a element in line it not take extra space so in easy word it is work as both block element who's width and height can be changed
3. font , padding and margin in CSS
code -
<!DOCTYPE html><html lang="en">
<head>
<title> css</title>
<style>
.bac1{
/* font in html */
color: indigo;
font-family: Georgia, 'Times New Roman', Times, serif;
}
.bac2{
/* padding in html */
border: 4px solid blue ;
padding: 23px;
}
.bac3{
/* margin in html */
border: 4px solid brown ;
margin: 23px;
}
</style>
</head>
<body>
<!-- lets take paragarph -->
<p class="bac1">
In display property if we apply inline-block property on it we can be set their width and height and element was set next to a element in line it not take extra space so in easy word it is work as both block element who's width and height can be changed
</p>
<p class="bac2">
In display property if we apply inline-block property on it we can be set their width and height and element was set next to a element in line it not take extra space so in easy word it is work as both block element who's width and height can be changed
</p>
<p class="bac3">
In display property if we apply inline-block property on it we can be set their width and height and element was set next to a element in line it not take extra space so in easy word it is work as both block element who's width and height can be changed
</p>
</body>
</html>
output on web page -
In display property if we apply inline-block property on it we can be set their width and height and element was set next to a element in line it not take extra space so in easy word it is work as both block element who's width and height can be changed
In display property if we apply inline-block property on it we can be set their width and height and element was set next to a element in line it not take extra space so in easy word it is work as both block element who's width and height can be changed
In display property if we apply inline-block property on it we can be set their width and height and element was set next to a element in line it not take extra space so in easy word it is work as both block element who's width and height can be changed
Comments
Post a Comment