
In this Tutorial, we will see ways in which we can add borders to div elements in HTML Style attributes border and border-style,
Example 1: Solid Border
Code:
<div style="border:1px solid">Some text</div>
Example 2: Solid Border with color
Code:
<div style="border:1px solid #00ff22">Some text</div>
Example 3: Dotted Border with color
Code:
<div style="border:1px dotted red">Some text</div>
Example 4: Dashed Border with color
Code:
<div style="border:1px dashed red">Some text</div>
Example 5: Double Border
Code:
<div style="border-style:double">Some text</div>
Example 6: Groove Border
Code:
<div style="border-style: groove">Some text</div>
Example 7: Ridge Border
Code:
<div style="border-style: ridge">Some text</div>
Example 8: Inset Border
Code:
<div style="border-style: inset">Some text</div>
Example 9: Outset Border
Code:
<div style="border-style: outset">Some text</div>
Have Questions? Post them here!
- remove div vertical scroll
- Create HTML button that looks like a href hyperlink
- Comprehensive 256 Ascii code table with Html Hex IBM Microsoft Key
- HTML5 HELLO WORLD Example
- Get HTML table td, tr or th inner content value with id or name attribute
- Adding Sub Headings to Bootstrap Header tags
- What is the doctype for HTML5?
- Chessboard with pieces using pure HTML and CSS
- Hyperlink in html (anchor tag) without a underline
- W3 : character data is not allowed here html validation error
- Fibonacci series from 1 to 500 table
- 9 Border to DIV Element in HTML Examples
- How to add multiple spaces between html page text
- How to turn off autocomplete in input fields in HTML Form
- Default speed of Marquee tag : SCROLLAMOUNT
- How to word wrap in HTML
- Force convert HTML text input to upper case
- HTML5 CSS3 Color Codes List
- How to remove old 404 pages ulrs from Google crawler
- reCaptcha Verification expired. Check the checkbox again
- All directional arrows codes for HTML
- Align html element at the center of page vertically and horizontally
- How to make a div tag clickable
- Remove Html head and body tags from ckeditor source
- Auto Refresh Webpage after every x Second or Minute using Meta Tag?
- List of Java JDBC Database Driver Jars, Classes and URLs Details - Java
- How to copy file name and path to clipboard in Notepad++ - NotepadPlusPlus
- The default username and password for RabbitMQ - HowTos
- Eclipse Error The JVM Shared Library JavaVirtualMachines does not contain the JNI_CreateJavaVM symbol - Eclipse
- How to see HTTP Request Response Headers in Google Chrome Browser - Chrome
- Java 8 foreach loop code examples - Java
- No Android device found : Android File Transfer App Mac OS X - Android
- How to Open and Use Microsoft Edge Console - Microsoft