In my last blog, I wrote about styling html document with a separate CSS stylesheet.
Today we will learn about some more keywords and their uses in CSS.
Here is a link to my previous blog :- Creating and using a separate style sheet of CSS in HTML
Since there are many keywords in CSS, I'll define Keywords starting with each letter everyday. Keywords starting with b are described today because they are very basic and most used :)
Contents of today :-
- Different keywords used in CSS starting with B
- Use of those keywords
- Syntax of those keywords
Today blog is time consuming and will be a lot of hard work. Please upvote to keep me motivated :)
Different Basic Keywords, Function and Syntax in CSS :-
Keywords, Function and Syntax
border -- To add a border around an object
border:4px solid blue (adds a solid blue border with a width of 4px)
border-bottom -- To add a border in the bottom
border-bottom:4px solid blue (adds a solid blue bottom border with a width of 4px)
border-color -- To select the color of a border around an object
border-color:green (sets the color of border to green)
border-image -- To add an image as a border around an object
border-image:url(nameofimage.png); (sets selected image an a border)
border-image-repeat -- To specify the repetition of a border image
border-image-repeat: repeat; (The image selected as a border repeats itself)
border-image-width -- To set the width of an image as a border around an object
border-image-width:10px; (Sets the width of the image border to 10px)
border-spacing -- Sets border spacing
border-spacing:35px 70px; (sets border spacing to 35 and 75px)
border-style -- Sets border style
border-style:dotted; (adds a dotted border around an object)
border-top -- Adds border on the top
border-top:2px solid yellow; (adds a solid yellow border on the top)
border-width -- Sets border width
border-width:thin; (The added border is thin)
Explaining all the keywords of CSS is a lot of hard work but i make sure to define each letter everyday accoring to A-Z order :). But the keywords starting with B are very important that's why I preferred defining them first of all :) Some Keywords aren't described in this blog because they require a lot of explanation for beginners ! I will explain them in my upcoming blogs