
- HTML Tutorial
- HTML - Home
- HTML - Overview
- HTML - Basic Tags
- HTML - Elements
- HTML - Attributes
- HTML - Formatting
- HTML - Phrase Tags
- HTML - Meta Tags
- HTML - Comments
- HTML - Images
- HTML - Tables
- HTML - Lists
- HTML - Text Links
- HTML - Image Links
- HTML - Email Links
- HTML - Frames
- HTML - Iframes
- HTML - Blocks
- HTML - Backgrounds
- HTML - Colors
- HTML - Fonts
- HTML - Forms
- HTML - Embed Multimedia
- HTML - Marquees
- HTML - Header
- HTML - Style Sheet
- HTML - Javascript
- HTML - Layouts
- HTML References
- HTML - Tags Reference
- HTML - Attributes Reference
- HTML - Events Reference
- HTML - Fonts Reference
- HTML - ASCII Codes
- ASCII Table Lookup
- HTML - Color Names
- HTML - Entities
- HTML - Fonts Ref
- HTML - Events Ref
- MIME Media Types
- HTML - URL Encoding
- Language ISO Codes
- HTML - Character Encodings
- HTML - Deprecated Tags
How to set all the border bottom properties in one declaration in JavaScript DOM?
To set the border bottom properties in one declaration in JavaScript, use the borderBottom property. It allows you to set the border-bottom-width, border-bottom-style, and border-bottom-color.
Example
You can try to run the following code to learn how to set border bottom properties −
<!DOCTYPE html> <html> <head> <style> #box { border: 2px dashed blue; width: 120px; height: 120px; } </style> </head> <body> <button onclick="display()">Set border bottom color</button> <div id="box"> <p>Demo Text</p> <p>Demo Text</p> </div> <script> function display() { document.getElementById("box").style.borderBottom = "thin dashed #000000"; } </script> </body> </html>
- Related Articles
- How to set all the border left properties in one declaration with JavaScript?
- How to set all the border right properties in one declaration with JavaScript?
- How to set all the border top properties in one declaration with JavaScript?
- How to set all the background properties in one declaration with JavaScript DOM?
- Set all the top border properties in one declaration using CSS
- How to set all the outline properties in one declaration with JavaScript?
- How to set the color of the bottom border in JavaScript DOM?
- How to set border width, border style, and border color in one declaration with JavaScript?
- How to set all outline properties in a single declaration with JavaScript?
- How to set the CSS margin properties in one declaration?
- How to set all the four border radius properties at once with JavaScript?
- How to set the width of the bottom border with JavaScript?
- How to set the style of the bottom border with JavaScript?
- Set all border-radius properties with CSS
- How to set listStyleImage, listStylePosition, and listStyleType in one declaration with JavaScript?

Advertisements