
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
Some text
Code:
<div style="border:1px solid">Some text</div>
Example 2: Solid Border with color
Some text
Code:
<div style="border:1px solid #00ff22">Some text</div>
Example 3: Dotted Border with color
Some text
Code:
<div style="border:1px dotted red">Some text</div>
Example 4: Dashed Border with color
Some text
Code:
<div style="border:1px dashed red">Some text</div>
Example 5: Double Border
Some text
Code:
<div style="border-style:double">Some text</div>
Example 6: Groove Border
Some text
Code:
<div style="border-style: groove">Some text</div>
Example 7: Ridge Border
Some text
Code:
<div style="border-style: ridge">Some text</div>
Example 8: Inset Border
Some text
Code:
<div style="border-style: inset">Some text</div>
Example 9: Outset Border
Some text
Code:
<div style="border-style: outset">Some text</div>
-
Have Questions? Post them here!
More Posts related to Html,
- 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?
More Posts:
- [Fix] Restricted View permission level missing in SharePoint Online site library - SharePoint
- Check SSH/OpenSSH version Command - Linux
- What does has notifications silenced in Messages App mean in iPhone - iOS
- Save Java Object as JSON file using Jackson Library - Java
- [javaScript] Convert text case to lowercase - JavaScript
- How to check if Java main thread is alive - Java
- Steps to Compare Two files in Sublime Text Side-by-Side - Sublime-Text
- AW3 CLI command to get list of all region names - AWS