Found 2416 Articles for HTML

HTML DOM designMode property

AmitDiwan
Updated on 20-Aug-2019 14:30:11

68 Views

The HTML DOM designMode property allows us to specify if the entire document is editable or not. This makes the HTML document act as a WYSIWYG (What You See Is What You Get) editor as we can edit the HTML document. This property is by default set to “off” and by setting it to “on” we can edit the document.SyntaxFollowing is the syntax for −Setting the designMode property −document.designMode = "on|off"Here, “off” is the default value and setting it to “on” allows us to edit the document.ExampleLet us look at an example for the HTML DOM designMode property − ... Read More

HTML DOM Del object

AmitDiwan
Updated on 15-Feb-2021 05:44:17

79 Views

The HTML DOM Del object is associated with the HTML element. It is used to represent the element. Using the Del object we can create and access a elememt.PropertiesFollowing are the properties for the Del object −Sr.NoProperties & Description1citeTo set or return the cite attribute value of the deleted text.2dateTimeTo set or return the datetime attribute value of the deleted text.SyntaxFollowing is the syntax for −Creating a Del object −var p = document.createElement("DEL");ExampleLet us look at an example for the HTML DOM Del object −Live Demo del object example Click on the below button to ... Read More

HTML DOM del dateTime Property

AmitDiwan
Updated on 15-Feb-2021 05:46:10

73 Views

The HTML DOM del dateTime property associated with the HTML element is used for telling the user when some text on the website was deleted. It tells the date and time of when the text was deleted.SyntaxFollowing is the syntax for −Setting the dateTime property −delObject.dateTime = YYYY -MM-DDThh:mm:ssTZDHere, YYYY=years , MM=months , DD=days, T=separator or a space, hh=hours , mm=minutes, ss=seconds, TZD=Time zone designatorExampleLet us look at an example for the del dateTime property −Live Demo del dateTime property example    #Sample{color:blue}; del dateTime property example Some text has been deleted Click ... Read More

HTML DOM del cite Property

AmitDiwan
Updated on 15-Feb-2021 05:48:45

77 Views

The HTML DOM del cite property associated with the HTML element is used for telling the user why some text on the website was deleted. It does so by specifying the url which states why the given text was deleted.The del cite property increases the accessibility of our website as it has no visual cues but can help the screen readers. The del cite property sets or returns the value of the cite attribute of the HTML element.SyntaxFollowing is the syntax for −Setting the cite property −delObject.cite = URLHere, URL specifies the URL of the document that states ... Read More

HTML DOM defaultView Property

AmitDiwan
Updated on 15-Feb-2021 05:55:16

34 Views

The HTML DOM defaultView property is used for returning the window object that is associated with the current document that is opened in the window.SyntaxFollowing is the syntax −document.defaultViewExampleLet us look at an example for the HTML DOM defaultView property −Live Demo defaultView Property example Click the below button to get information about the window Window Info    function winInfo() {       var win = document.defaultView;       var top = win.screenTop;       var left = win.screenLeft;       var name = win.name;       document.getElementById("Sample").innerHTML = "Distance from ... Read More

HTML DOM Style borderBottomColor Property

AmitDiwan
Updated on 15-Feb-2021 05:57:24

32 Views

The borderBottomColor property is used to set or get the bottom border color of an element. It is essential to declare the border-style as the element must have a border for this property to work.SyntaxFollowing is the syntax for setting the borderBottomColor property −object.style.borderBottomColor = "color|transparent|initial|inherit"Following is the syntax to return the borderBottomColor property −object.style.borderBottomColorValuesThe property values are explained as follows −Sr.NoValue & Description1colorFor specifying the bottom border color. The default color is black.2transparentFor making the bottom border transparent i.e. the content can be seen from the bottom.3InitialFor setting this property to initial value.4InheritTo inherit the parent property value.ExampleLet us ... Read More

HTML DOM Style borderBottom Property

AmitDiwan
Updated on 15-Feb-2021 05:58:58

30 Views

The borderBottom property is used for setting or getting the bottom border properties. The border-bottom property is a short hand for border-bottom-width, border-bottom-style, border-bottom-color.SyntaxFollowing is the syntax for −Setting the borderBottom property −object.style.borderBottom = "width style color|initial|inherit"ValuesFollowing are the above property values −Sr.NoParameters & Description1WidthFor setting the bottom border width.2StyleFor setting the bottom border style.3ColorFor setting the bottom border color.4InitialFor setting this property to initial value.5InheritTo inherit the parent property value.ExampleLet us look at the example for the borderBottom property −Live Demo    #IMG1 {       border-bottom: 7px solid orange;       box-shadow: 2px ... Read More

HTML DOM Style border Property

AmitDiwan
Updated on 20-Aug-2019 14:26:49

104 Views

The HTML DOM Style border property is used to get or set the border properties for an element. It is a shorthand property for border-width, border-style and border-color.SyntaxFollowing is the syntax for −Setting the border property −object.style.border = "width style color|initial|inherit"ParametersThe above properties as explained as follow −Sr.NoParameters & Description1WidthFor setting the border width2StyleFor setting the border width3ColorFor setting the border width4InitialFor setting this property to initial value.5InheritTo inherit the parent property value.ExampleLet us look at an example for the border property −    #IMG1 {       border: 2px solid orange;       box-shadow: ... Read More

HTML DOM Style backgroundSize Property

AmitDiwan
Updated on 15-Feb-2021 06:02:28

84 Views

The HTML DOM style background-size property is used to set or get the size of background image.SyntaxFollowing is the syntax for −Setting the backgroundSize property −object.style.backgroundSize = "auto|length|cover|contain|intial|inherit"PropertiesThe above properties are explained as follows −Sr.NoProperties & Description1autoThe background image displays at full size and it is the default value.2lengthFor setting the width and height of the background image. The first value is for width and the second is for height. If only one value is given then the missing value defaults to auto.3percentageFor setting the width and height of the background image in percentage. The percentage is calculated based on ... Read More

HTML DOM Style backgroundRepeat Property

AmitDiwan
Updated on 20-Aug-2019 08:52:42

35 Views

The style backgroundRepeat property is used to set or get how the background image repeats itself.SyntaxFollowing is the syntax for −Setting the backgroundRepeat property −object.style.backgroundRepeat = "repeat|repeat-x|repeat-y|no-repeat|initial|inherit"ValuesFollowing are the above property values −Sr.NoValue & Description1repeatThis is the default value. It repeats the background image vertically and horizontally both.2repeat-xThis repeats the background image horizontally only.3repeat-yThis repeats the background image vertically only4no-repeatDoes not repeats the background image.ExampleLet us look at an example for the backgroundRepeat property −    body {       background-image: url("https://www.tutorialspoint.com/power_bi/images/power-bi-minilogo.jpg");       background-repeat: repeat-x;       color:black;       font-size:20px;   ... Read More

Advertisements