- Trending Categories
- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Found 2416 Articles for HTML
121 Views
The HTML DOM Title Object in HTML represents the element.Creating a elementvar titleObject = document.createElement(“TITLE”)Here, “titleObject” can have the following properties −PropertyDescriptiontextItsets/returns the value of the element of thedocumentLet us see an example of Title text property −Example Live Demo HTML DOM Title text form { width:70%; margin: 0 auto; text-align: center; } * { padding: 2px; margin:5px; } input[type="button"] { border-radius: 10px; } ... Read More
201 Views
The HTML DOM timeStamp property returns elapsed time in milliseconds of when the event was created or triggered.Note: The timeStamp only works if the event system supports it for the particular event.Following is the syntax −Returning time value (in milliseconds)event.timeStampLet us see an example of HTML DOM timeStamp property −Example timeStamp Event * { padding: 2px; margin:5px; } form { width:70%; margin: 0 auto; text-align: center; } #outer { width:70%; margin: ... Read More
135 Views
The HTML DOM Time Object in HTML represents the element.Creating a elementvar timeObject = document.createElement(“TIME”)Here, “timeObject” can have the following properties −PropertyDescriptiondateTimeItsets/returns the value of the dateTime attribute of a elementLet us see an example of Time dateTime property −Example Live Demo Time dateTime form { width:70%; margin: 0 auto; text-align: center; } * { padding: 2px; margin:5px; } input[type="button"] { border-radius: 10px; } ... Read More
68 Views
The HTML DOM Time dateTime property returns/sets datetime attribute of time element.Following is the syntax −Returning string valuetimeObject.dateTimeSetting dateTime to string valuetimeObject.dateTime = YYYY-MM-DDThh:mm:ssTZDHere, “YYYY-MM-DDThh:mm:ssTZD” can be the following −stringValueDetailsYYYYIt defines year (eg:1998)MMIt defines month (eg: 05 for May)DDIt defines Day (eg: 24)TIt is a separator for date and timehhIt defines hour (eg:12)mmIt defines minutes (eg:48)ssIt defines seconds (eg:00)TZDTime Zone Designator (IST denotes Indian StandardTime)Let us see an example of Time dateTime property −Example Live Demo Time dateTime form { width:70%; margin: 0 auto; text-align: center; } ... Read More
93 Views
The HTML DOM textContent property returns/sets a string corresponding to the text (including whitespaces) of the node and all its child nodes as well.Following is the syntax −Returning string valueNode.textContentHere, the return value can be the following −‘Null’ for document nodesText of specified node and all its child nodesSet textContent to a string valueNode.textContent = stringNOTE: HTML DOM textContent property sets the text of node and child nodes as a single text string.Let us see an example of HTML DOM textContent property −Example Live Demo HTML DOM textContent form { width:70%; margin: 0 ... Read More
96 Views
The HTML DOM Ol type property sets/returns the value of the type attribute which corresponds to the type of marker used in an ordered list.Following is the syntax −Returning type propertyolObject.typeSetting type to a characterolObject.type = ‘1|a|A|i|I’Let us see an example of Ol type property −Example Live Demo HTML DOM Ol type form { width:70%; margin: 0 auto; text-align: center; } * { padding: 2px; margin:5px; } input[type="button"] { border-radius: 10px; } ol{ ... Read More
69 Views
The HTML DOM Ol start property sets/returns the value of the start attribute of an ordered list.Following is the syntax −Returning number valueolObject.startSetting start to numberolObject.start = numberLet us see an example of Ol start property −Example Live Demo HTML DOM Ol start form { width:70%; margin: 0 auto; text-align: center; } * { padding: 2px; margin:5px; } input[type="button"] { border-radius: 10px; } ol{ width: 30%; margin: ... Read More
105 Views
The HTML DOM Ol reversed property sets/returns whether the order of list should be descending or ascending (default).Following is the syntax −Returning boolean value - true/falseolObject.reversedSetting reversed to booleanValueolObject.reversed = booleanValueHere, “booleanValue” can be the following −booleanValueDetailstrueIt defines that order willbe descendingfalseIt defines that order willbe ascending which is defaultLet us see an example of Ol reversed property −Example Live Demo HTML DOM Ol reversed form { width:70%; margin: 0 auto; text-align: center; } * { padding: 2px; margin:5px; } ... Read More
122 Views
The HTML DOM Ol Object in HTML represents the element.Creating a elementvar olObject = document.createElement(“OL”)Here, “olObject” can have the following properties −PropertyDescriptionreversedItsets/returns whether the order of list should be descending orascending (default)startItsets/returns the value of the start attribute of an ordered listtypeItsets/returns the value of the type attribute of an ordered listLet us see an example of Ol start property −Example Live Demo HTML DOM Ol start form { width:70%; margin: 0 auto; text-align: center; } * { padding: 2px; ... Read More
108 Views
The HTML DOM offsetWidth property returns a number corresponding to the width of an element including its padding, border and scrollbar but not its margin.Following is the syntax −Returning number valueHTMLelement.offsetWidthLet us see an example of HTML DOM offsetWidth property −Example Live Demo HTML DOM offsetHeight form { width:70%; margin: 0 auto; text-align: center; } * { padding: 2px; margin:5px; } input[type="button"] { border-radius: 10px; } #containerDiv { margin: 0 ... Read More