CSS tutorial part-3

CSS Border:-

The CSS border is a property is used to set the border on an element.

The CSS border properties are use to specify the style, color and size of the border of an element. The CSS border properties are given below

  • border-style
  • border-color
  • border-width
  • border-radius

1.CSS border-style:- The Border style property is used to specify the border type which you want to display on the web page.

There are some border style values which are commenly used for boder-style property. Try it yourself:-

2. CSS border-width:- This property is used to set the border’s width. It is set in pixels. we can also use the one of the three pre-defined values, thin, medium or thick to set the width of the border. Example:-

3. CSS border-colour:- This property is used to set the border color. There are methods to set the color of the border.

  1. Name: It specifies the color name. For example:”red”.
  2. RGB: It specifies the RGB value of the color. For example: “rgb(255,0,0)”.
  3. Hex: It specifies the hex value of the color. For example: “#ff0000”

There is also a border color named “transparent”. If the border color is not set it is inherited from the color property of the element.

shashank K
Latest posts by shashank K (see all)
Tagged :
0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x