
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- 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 2202 Articles for HTML

194 Views
The HTML DOM Form enctype property is associated with the enctype attribute of the form element. This property sets or returns the enctype attribute value of the form. The enctype attribute is only used if the method attribute value is “POST”. The enctype property is used for specifying the data in the form to be submitted should be encoded.SyntaxFollowing is the syntax for −Setting the enctype property −formObject.enctype = encodingHere, encoding can be “application/x-www-form-urlencoded”, which means all characters are encoded before it is sent and this is the default encoding.Another one is “multipart/form-data”, which specifies that no character should be ... Read More

176 Views
The HTML DOM Form autocomplete property is associated with the autocomplete attribute of the form element. Using the autocomplete property we can set or return autocomplete attribute value of the given form. This property specifies if the input field should autocomplete text being written by the user based on the text that was previously written in the text field.The autocomplete property can be turned off for specific input fields if autocomplete is set on for the form and it is true for vice-versa also.SyntaxFollowing is the syntax for −Set the autocomplete property −formObject.autocomplete = on|offHere, “on” is by default and ... Read More

334 Views
The HTML DOM Form action property is associated with the action attribute of the form element. The form action property specifies the web page to send the form data after being submitted by the user. This attribute is called after the form has been submitted to specify where to submit the form.SyntaxFollowing is the syntax for −Set the Form action property −formObject.action = URLHere, the URL specifies the address to send the form data to. It can be an absolute URL or a relative URL.ExampleLet us look at an example of the form action property − ... Read More

123 Views
The HTML DOM Form acceptCharset property is associated with the accept-Charset attribute of the element. This property is used for setting and getting the accept-Charset attribute value of a form. It returns the character encoding in the string type.If accept-Charset value is not specified it will return UNKNOWN which indicate that the character encoding is set to the character encoding of the current HTML document.SyntaxFollowing is the syntax for −Setting the acceptCharset property −formObject.acceptCharset = character-setHere, the character-set is the list separated by semicolon or space indicating one or more of the character encoding value. Some of the most ... Read More

650 Views
The HTML DOM Footer object is associated with the HTML element. The element is a type of semantic tag and introduced in the HTML5. Using the Footer object we can create and get the element using the createElement() and getElementById() method respectively.SyntaxFollowing is the syntax for −Creating a footer object −var p = document.createElement("FOOTER");ExampleLet us look at an example of the Footer object −Live Demo function createFoot() { var f = document.createElement("FOOTER"); document.body.appendChild(f); var p = document.createElement("P"); var txt = document.createTextNode("Copyright ... Read More

134 Views
The HTML DOM Figure object is used for reperesenting the HTML element. We can dynamically create and access a figure element using the figure object.SyntaxFollowing is the syntax for creating a Figure object −var p = document.createElement("FIGURE");ExampleFollowing is how you can create Figure object − function createFigure(){ var fig = document.createElement("FIGURE"); fig.setAttribute("id", "Figure1"); document.body.appendChild(fig); var i = document.createElement("IMG"); i.setAttribute("src", "https://www.tutorialspoint.com/servlets/images/servletsmini-logo.jpg"); i.setAttribute("width", "250"); i.setAttribute("height", "200"); i.setAttribute("alt", "Eiffel Tower"); fig.appendChild(i); ... Read More

114 Views
The HTML DOM Figcaption object is used for representing the HTML5 element. You can create or access a figcaption element using createElement() and getElementById() method respectively.SyntaxFollowing is the syntax for −Creating a Figcaption object −var p = document.createElement("FIGCAPTION");ExampleLet us look at an example for the Figcaption object −Live Demo function createCaption() { var caption = document.createElement("FIGCAPTION"); var txt = document.createTextNode("Learn Java Servlets"); caption.appendChild(txt); var f=document.getElementById("Figure1"); f.appendChild(caption); } Caption Create a caption for the below image by ... Read More

153 Views
The HTML DOM Fieldset type property is used for returning the fieldset element type. It will always be of type fieldset for a fieldset element. It is a read-only property.SyntaxFollowing is the syntax for Fieldset type property −fieldsetObject.typeExampleLet us take a look at an example for the Fieldset type property −Live Demo function FieldType() { var field = document.getElementById("FieldSet1").type; document.getElementById("Sample").innerHTML = "The fieldset element is of type "+field; } Sample FORM User Data: Name: Address: Age: GET TYPE ... Read More

163 Views
The HTML DOM Fielset object represents the element.PropertiesFollowing are the properties for Fieldset object −PropertyDescriptiondisabledTo set or return if the fieldset is disabled, or notformTo return the reference to the form that contains the given fieldset.nameTo set or return the name attribute value of a fieldset.typeTo return the fieldset element type.SyntaxFollowing is the syntax for −Creating a fieldset element −var p = document.createElement("FIELDSET");ExampleLet us look at an example for the HTML DOM Fieldset object −Live Demo function createField() { var f = document.createElement("FIELDSET"); var txt = document.createTextNode("FIELDSET element created"); ... Read More

224 Views
The HTML DOM Fieldset name property is used for getting or setting the name attribute value of a element. The name attribute helps in identifying the form data after the form has been submitted or for simply referencing the form elements.SyntaxFollowing is the syntax for −Setting the fieldset name property −fieldsetObject.name = nameHere, name specifies the fieldset name.ExampleLet us look at an example for the Fieldset name property −Live Demo function fieldName() { var field = document.getElementById("FieldSet1").name; document.getElementById("Sample").innerHTML = "The fieldset name is "+field; } ... Read More