English

Data-Info

                 

Style HTML CSS Border styles

2021.02.17 12:43

운영자 Views:312

CSS Syntax

border-style: none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset|initial|inherit;

Property Values

Value Description Play it
none Default value. Specifies no border Play it »
hidden The same as "none", except in border conflict resolution for table elements Play it »
dotted Specifies a dotted border Play it »
dashed Specifies a dashed border Play it »
solid Specifies a solid border Play it »
double Specifies a double border Play it »
groove Specifies a 3D grooved border. The effect depends on the border-color value Play it »
ridge Specifies a 3D ridged border. The effect depends on the border-color value Play it »
inset Specifies a 3D inset border. The effect depends on the border-color value Play it »
outset Specifies a 3D outset border. The effect depends on the border-color value Play it »
initial Sets this property to its default value. Read about initial Play it »
inherit Inherits this property from its parent element. Read about inherit  

More Examples

Example

A dashed border:

div {border-style: dashed;}

Try it Yourself »

Example

A solid border:

div {border-style: solid;}

Try it Yourself »

Example

A double border:

div {border-style: double;}

Try it Yourself »

Example

A groove border:

div {
  border-style: groove;
  border-color: coral;
  border-width: 7px;
}

Try it Yourself »

Example

A ridge border:

div {
  border-style: ridge;
  border-color: coral;
  border-width: 7px;
}

Try it Yourself »

Example

An inset border:

div {
  border-style: inset;
  border-color: coral;
  border-width: 7px;
}

Try it Yourself »

Example

An outset border:

div {
  border-style: outset;
  border-color: coral;
  border-width: 7px;
}

Try it Yourself »

Example

Set different borders on each side of an element:

p.one {border-style: dotted solid dashed double;}
p.two {border-style: dotted solid dashed;}
p.three {border-style: dotted solid;}
p.four {border-style: dotted;}

Try it Yourself »


Related Pages

CSS tutorial: CSS Border

HTML DOM reference: borderStyle property

No. Subject Author Date Last Update Views
Notice How to write your comments onto a webpage 운영자 2016.07.06 2019.12.31 5576
Notice How to Upload Pictures in webpages 운영자 2016.07.06 2019.12.31 547
Notice How to Write a Webpage 운영자 2016.06.28 2017.07.19 827
Notice Brief Instruction of using SNUMA Website 운영자 2008.04.28 2016.06.28 771
41 Another way of adding a background to a picture [1] file 운영자 2018.04.01 2019.11.12 415
40 When your computer is taken over by a virus 운영자 2011.06.19 2011.06.19 364
39 Mahjong Basics [1] 운영자 2010.12.23 2010.12.23 341
38 Buttons and Icons - Making by Table [1] Steven 2008.02.24 2008.02.24 335
» HTML CSS Border styles [1] 운영자 2021.02.17 2021.03.28 312
36 PhotoWorks Program file 운영자 2010.10.18 2010.10.18 312
35 Where To Find The Windows Wallpaper Location On Your PC 운영자 2021.02.13 2021.02.13 302
34 LW-SNUMAC Banner file 운영자 2019.05.14 2019.05.14 292
33 Using attached mp3 in the webpage 운영자 2021.03.13 2022.04.25 282
32 만년달력 - 음력과 양력 [1] YonnieC#65 2008.10.30 2008.10.30 277
31 Complex table frame with Legend and Fieldset [2] 운영자 2010.05.10 2010.05.10 267
30 Basic Frame Templates - 기본 테두리, 사진 넣기 [2] 운영자 2010.02.27 2010.02.27 261
29 Basic Frame Templates - 진한 밖 테두리, 엷은색 배경 [1] 운영자 2010.02.27 2010.02.27 254
28 Class website data 운영자 2008.05.17 2008.05.17 251
27 Flat Icons [1] 운영자 2021.06.30 2023.08.06 245
26 Basic Frame Templates - 단색 테두리와 배경 [1] 운영자 2010.02.27 2010.02.27 230
25 Basic Frame Templates - 어두운 배경-밝은 글자 [1] 운영자 2010.02.27 2010.02.27 229
24 Basic Frame Templates - 좀 복잡한 이중 테두리 [1] 운영자 2010.02.27 2010.02.27 226
23 How to embed video to websites 운영자 2021.06.29 2021.06.29 217
22 Basic Frame Templates - 단색 테두리와 단색 배경 [1] 운영자 2010.02.27 2010.02.27 212