Backgrounds style in CSS



Basic code for Colors Properties
<!DOCTYPE html>
<html>
<head>
    <title>Background </title>
<link  rel=" shortcut icon" href=" favicon.png" >
<link  rel=" stylesheet" href=" style.css" >
</head>
<body>
   <p class="para"> Mallu Coder Sugu</p>
</body>
</html>

Background Properties and source code :
Property Code
Background-color
  • We can simply add background color by color name, hex value, or RGB value.
  • In this, we can use predefined color names like red, green, blue, purple, orange, etc.
.para {
background-color:orange; color:white;
}
Background-image
  • we can also add images as a background.
  • To set images as background we will use the background-image property.
.para {
background-image: url('background.jpg');
}




Other Background Properties:


Property Description
background-position:
background-position is used to set the position of the background.
background-repeat:
Used to set the background repetition.
background-size:
It is used to set the size of the background.
background-attachment:
This property is used to sets whether a background image's position is fixed within the viewport.
background-origin:
The background-origin property specifies the origin position of the background.




Background Shorthand Property

p {
Background: #fafafa url("") no-repeat right top;
}

Introduction to CSS Part-2 PDF Click here to download

Easy Pickup


  • 1. CSS More Samples
  • 2. CSS Malayalam Classes
  • 3. CSS Malayalam Notes

New Post 



View Post


Acer Predator Neo (2023) Core i7 13700HX 13th Gen







ചന്ദ്രനുശേഷം സൂര്യൻ! അഭിമാനമാകാൻ ആദിത്യാ എല്‍1; ദൗത്യത്തെക്കുറിച്ച് അറിയേണ്ടതെല്ലാം...





മൈക്രോസോഫ്റ്റ് എക്സൽ ഉപയോഗിക്കുന്നുണ്ടോ?, ഇനി മാറ്റം ഇങ്ങനെ......



SYAMRAJ R

Founder and Developer of Mallu Coder Sugu.We provide the best Computer or Programming Related Content With Notes PDF, Amazing Designs, Easy to Readable for Learners.






Welcome to our Web Designing Studio! Stay and learn from here... Follow our social media for new updates