How To Create Border Style in CSS
buayaberdiri.blogspot.com - Sometimes on a web page we need a border for something else. These lines can be used as borders or to create rectangles or boxes or to create blocks of visible elements.
In CSS we can create a border with many types and can also change the line color, line thickness and others.
There are several types of borders in CSS such as:
- none
- dotted
- hidden
- double
- inset
- outlets
- dashed
- solid
- groove
- ridge
How do I add a border in CSS ? the following is how to write the css code to create a border :
Adds a border style in CSS
<!DOCTYPE html>
<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">
<script src="index01.js"></script>
<title>buayaberdiri.blogspot.com</title>
<style>
div{
margin: 10px;
padding: 2px;
}
.one{
border-style: none;
}
.two{
border-style: dotted;
}
.three{
border-style: hidden;
}
.four{
border-style: double;
}
.five{
border-style: inset;
}
.six{
border-style: outset;
}
.seven{
border-style: dashed;
}
.eight{
border-style: solid;
}
.nine{
border-style: groove;
}
.ten{
border-style: ridge;
}
</style>
</head>
<body>
<div class="one">
https://buayaberdiri.blogspot.com
</div>
<div class="two">
https://buayaberdiri.blogspot.com
</div>
<div class="three">
https://buayaberdiri.blogspot.com
</div>
<div class="four">
https://buayaberdiri.blogspot.com
</div>
<div class="five">
https://buayaberdiri.blogspot.com
</div>
<div class="six">
https://buayaberdiri.blogspot.com
</div>
<div class="seven">
https://buayaberdiri.blogspot.com
</div>
<div class="eight">
https://buayaberdiri.blogspot.com
</div>
<div class="nine">
https://buayaberdiri.blogspot.com
</div>
<div class="ten">
https://buayaberdiri.blogspot.com
</div>
</body>
</html>
Then the result will display like this:
Check out other articles about HTML & CSS:
- Learn Input Types In HTML For Login And Register Form
- Learn HTML List - How To Create Square, Circle, Number List
- How To Create Comments Line In HTML
- How to Add Text Formatting In HTML
- Adding The Fieldset Code To The Form In HTML
- How to Create a Search Box in Pure HTML
- Create Color Charts With Pure HTML
- How to change font size using CSS