Found 2417 Articles for HTML

HTML DOM Style overflow Property

AmitDiwan
Updated on 01-Jul-2020 12:27:05

68 Views

The DOM style overflow property returns and modify the overflow CSS property of an element in an HTML document.SyntaxFollowing is the syntax −Returning overflowobject.style.overflowModifying overflowobject.style.overflow = “value”ValuesHere value can be −ValueExplanationscrollIt clips the content and scroll bars are added when necessary.inheritIt inherits this property value from its parent element.initialIt set this property value to its default value.autoIt clip the content and add scroll bars when necessary.hiddenIt hides the content flow outside the element box.visibleIt doesn’t clip the content and content will flow outside the element box.ExampleLet us see an example of style overflow property − Live Demo   ... Read More

HTML DOM Style width Property

AmitDiwan
Updated on 01-Jul-2020 12:28:32

80 Views

The HTML DOM style width property returns and modify the width CSS property of an element in an HTML document.SyntaxFollowing is the syntax −Returning widthobject.style.widthModifying widthobject.style.width = “value”ExampleLet us see an example of style width property − Live Demo    body {       color: #000;       background: lightblue;       height: 100vh;    }    p {       border: 2px solid #fff;       margin: 1.5rem auto;    }    .btn {       background: #db133a;       border: none;       height: 2rem;       ... Read More

HTML DOM Style textAlign Property

AmitDiwan
Updated on 01-Jul-2020 12:31:06

69 Views

The DOM style textAlign property returns and modify the horizontal alignment of text in a block level element in an HTML document.SyntaxFollowing is the syntax −Returning textAlignobject.style.textAlign2. Modifying textAlignobject.style.textAlign = “value”ExampleLet us see an example of style textAlign property − Live Demo    body {       color: #000;       background: lightblue;       height: 100vh;    }    p {       border: 2px solid #fff;       margin: 1.5rem auto;    }    .btn {       background: #db133a;       border: none;       height: 2rem; ... Read More

HTML DOM Style outlineOffset Property

AmitDiwan
Updated on 01-Jul-2020 12:32:24

37 Views

The DOM style outlineOffset property returns and offsets the outline around an element in an HTML document.SyntaxFollowing is the syntax −Returning outlineOffsetobject.style.outlineOffsetModifying outlineOffsetobject.style.outlineOffset = “value”ExampleLet us see an example of style outlineOffset property − Live Demo    body {       color: #000;       background: lightblue;       height: 100vh;    }    p {       background-color: seagreen;       height: 200px;       width: 200px;       outline: 3px solid #000;       border: 3px solid #fff;       margin: 1.5rem auto;    }    .btn ... Read More

HTML DOM Style outlineStyle Property

AmitDiwan
Updated on 01-Jul-2020 12:07:42

35 Views

The DOM style outlineStyle property returns and modify the style of the outline around an element in an HTML document.SyntaxFollowing is the syntax −Returning outlineStyleobject.style.outlineStyleModifying outlineStyleobject.style.outlineStyle = “value”ExampleLet us see an example of style outlineStyle property − Live Demo    body {       color: #000;       background: lightblue;       height: 100vh;    }    p {       background-color: seagreen;       height: 200px;       width: 200px;       outline: 2px solid #000;    }    .btn {       background: #db133a;       border: ... Read More

HTML DOM Style outlineWidth Property

AmitDiwan
Updated on 01-Jul-2020 12:15:09

26 Views

The DOM style outlineWidth property returns and modify the width of the outline around an element in an HTML document.SyntaxFollowing is the syntax −Returning outlineWidthobject.style.outlineWidthModifying outlineWidthobject.style.outlineWidth = “value”ExampleLet us see an example of style outlineWidth property − Live Demo    body {       color: #000;       background: lightblue;       height: 100vh;    }    p {       background-color: seagreen;       height: 200px;       width: 200px;       outline: 2px solid #000;    }    .btn {       background: #db133a;       border: ... Read More

HTML DOM Style outlineColor Property

AmitDiwan
Updated on 01-Jul-2020 12:16:24

21 Views

The DOM style outlineColor property returns and modify the color of the outline around an element in an HTML document.SyntaxFollowing is the syntax −Returning outlineColorobject.style.outlineColorModifying outlineColorobject.style.outlineColor = “color”ExampleLet us see an example of style outlineColor property − Live Demo    body {       color: #000;       background: lightblue;       height: 100vh;    }    p {       background-color: seagreen;       height: 200px;       width: 200px;       outline: 2px solid #000;    }    .btn {       background: #db133a;       border: ... Read More

HTML DOM Style outline Property

AmitDiwan
Updated on 01-Jul-2020 11:40:52

84 Views

The DOM style outline property returns and modify the outline of an element in an HTML document.SyntaxFollowing is the syntax −1. Returning outlineobject.style.outlineModifying outlineobject.style.outline = “width style color”ExampleLet us see an example of HTML DOM style outline property − Live Demo    body {       color: #000;       background: lightblue;       height: 100vh;    }    p {       background-color: seagreen;       height: 200px;       width: 200px;    }    .btn {       background: #db133a;       border: none;       height: ... Read More

HTML DOM Style paddingLeft Property

AmitDiwan
Updated on 01-Jul-2020 11:42:46

50 Views

The DOM style paddingLeft property returns and modify the left padding of an element in an HTML document.SyntaxFollowing is the syntax −Returning paddingLeftobject.style.paddingLeftModifying paddingLeftobject.style.paddingLeft = “value”ExampleLet us see an example of style paddingLeft property − Live Demo    body {       color: #000;       background: lightblue;       height: 100vh;    }    p {       border: 2px solid #fff;    }    .btn {       background: #db133a;       border: none;       height: 2rem;       border-radius: 2px;       width: 40%;   ... Read More

HTML DOM Style paddingBottom Property

AmitDiwan
Updated on 01-Jul-2020 11:48:42

51 Views

The HTML DOM style paddingBottom property returns and modify the bottom padding of an element in an HTML document.SyntaxFollowing is the syntax −Returning paddingBottomobject.style.paddingBottomModifying paddingBottomobject.style.paddingBottom = “value”ExampleLet us see an example of style paddingBottom property − Live Demo    body {       color: #000;       background: lightblue;       height: 100vh;    }    p {       border: 2px solid #fff;    }    .btn {       background: #db133a;       border: none;       height: 2rem;       border-radius: 2px;       width: 40%; ... Read More

Advertisements