Skill Making

Always Increase Your Knowledge

How to Set Border Style in CSS | Use of CSS With HTML

How to Set Border Style in CSS | Use of CSS With HTML

In this article, I will tell you about a property of CSS. If you want to be a web developer then you should learn HTML and CSS. In this article, I will tell you that how can you set the border style in CSS.  If you want to know that how to set the border style in CSS then you should read this article till the end. Here you can get all information about it. With this functionality of CSS, you can make the more attractive webpage. You can use a border for a separate text or element. Here some key points are given below which may helpful for you to learn border style.



  • Every HTML element that consumes space in the webpage is a rectangular region.
  • This rectangular can be bordered using CSS properties.
  • The border-style property allows you to choose one from the various style of the border.
  • Some possible values of border style are given below.
    • Solid
    • Dotted
    • Double
    • Groove
    • Inset
    • Outset

Syntax:

ElementSelector{

                                Border-style:solid;

                                }




Example:

<!DOCTYPE html>

<html>

<head>

                <title>Border style</title>

                <style type="text/css">

                h1{

                                border-style: solid;

                }

                h2{

                                border-style: dotted;

                }

                h3{

                                border-style: dashed;

                }

                h4{

                                border-style: double;

                }

                h5{

                                border-style: groove;

                }

                h6{

                                border-style: inset;

                }

                #h{

                                border-style: outset;

                }

                </style>

</head>

<body>

<h1>WELCOME IN THIS ARTICLE.</h1>

<h2>Welcome in this article</h2>

<h3>Welcome in this article</h3>

<h4>Welcome in this article</h4>

<h5>Welcome in this article</h5>

<h6>Welcome in this article</h6>

<h6 id='h'>Welcome in this article</h6>

</body>

</html>




Output:

How to set border style in CSS

How to set border style in CSS. Use of CSS With HTML

Conclusion:

In this article, you read about a CSS property for web development. I hope you got information about how to set border style in CSS. Now you can use this property of CSS with HTML element. If you love this article then show me your love in the comment section below. If you have any question regarding this article then please write down below in comment section. I will try to give the answer to your question.



Leave a Reply

Your email address will not be published. Required fields are marked *

Skill Making © 2018 Frontier Theme