- 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 2417 Articles for HTML
![karthikeya Boyini](https://www.tutorialspoint.com/assets/profiles/13518/profile/60_31598-1537784993.jpg)
110 Views
The HTML DOM input button type property returns the type of the input button i.e. whether it is of “button”, “submit” or “reset” type.SyntaxFollowing is the syntax −object.typeExampleLet us see an example of input button type property − Live Demo HTML DOM type Property body{ text-align:center; } .btn{ display:block; margin:1rem auto; background-color:#db133a; color:#fff; border:1px solid #db133a; padding:0.5rem; border-radius:50px; width:40%; } .show-type{ font-weight:bold; ... Read More
![karthikeya Boyini](https://www.tutorialspoint.com/assets/profiles/13518/profile/60_31598-1537784993.jpg)
144 Views
The HTML DOM innerText property returns and allow us to modify inner text content of an HTML element.SyntaxFollowing is the syntax −1. Returning inner textobject.innerText2. Setting inner textobject.innerText=”text”ExampleLet us see an example of innerText property − Live Demo body{ text-align:center; } .box{ background-color:#347924; width:100px; padding:10px; text-align:center; font-weight:bold; font-size:1.5rem; color:white; margin:1rem auto; } innerText property Example Write Hi Write Hello function ... Read More
![Sharon Christine](https://www.tutorialspoint.com/assets/profiles/13517/profile/60_82215-1512649681.jpg)
261 Views
The HTML DOM innerHTML property returns and allow us to modify inner HTML of an element. The inner HTML is the content.SyntaxFollowing is the syntax −1. Returning innerHTMLobject.innerHTML2. Setting inner HTMLobject.innerHTML=”value”Here, “value” represents the content or nested HTML elements.ExampleLet us see an example of innerHTML property − Live Demo body{ text-align:center; } .outer-box{ background-color:#347924; width:200px; height:200px; padding:10px; text-align:center; font-weight:bold; color:white; margin:1rem auto; } .inner-box{ ... Read More
![Sharon Christine](https://www.tutorialspoint.com/assets/profiles/13517/profile/60_82215-1512649681.jpg)
139 Views
The HTML DOM id property returns and allow us to set id of an HTML element.SyntaxFollowing is the syntax −1. Returning idobject.id2. Setting idobject.id=”value”Here, “value” represents the id of an element.ExampleLet us see an example of id property − Live Demo p{ background-color:#347924; color:#fff; padding:8px; } .show{ margin:8px; color:#347924; font-size:18px; font-weight:bold; } id property Example This is a paragraph with some text and this para has an id "Awesome-para" Show ... Read More
![Sharon Christine](https://www.tutorialspoint.com/assets/profiles/13517/profile/60_82215-1512649681.jpg)
60 Views
The HTML DOM paddingLeft property returns and add left padding to an HTML element.SyntaxFollowing is the syntax −1. Returning left paddingobject.style.paddingLeft2. Adding left paddingobject.style.paddingLeft=”value”ValuesHere, “value” can be the following −ValueDetailslengthIt defines value padding in length unit.initialIt defines padding to its default value.inheritIn this padding gets inherited from its parent element.percentage(%)It defines padding in percentage of the width of parent element.ExampleLet us see an example of paddingLeft property − Live Demo HTML DOM paddingLeft property .outer-box{ background-color:#db133a; width:300px; height:300px; margin:1rem auto; } ... Read More
![Ankith Reddy](https://www.tutorialspoint.com/assets/profiles/22328/profile/60_142162-1519038074.jpg)
117 Views
The HTML DOM Object type Property is used to set or return the value of the type attribute of an object. However, the type attribute is used to set the media type like the object.Following is the syntax to set the type property −obj.type = type_of_mediaAbove, type_of_media is the standard media type, for example, image/bmp, image/tiff, image/tff, etc.Following is the syntax to return the type property −obj.typeLet us now see an example to implement the DOM Object type property −Example Live Demo Display the media type function display() { var x = document.getElementById("obj").type; ... Read More
![George John](https://www.tutorialspoint.com/assets/profiles/13511/profile/60_58410-1512537824.png)
819 Views
Videos can be easily from YouTube to your web page. You need to just embed the videos. At first, get the Video id − Step1: Go to the Video and right click on it. Select “Stats for nerds” − On clicking, you will get the following dialog box displaying the stats − Above you can see the video id is F6m0ghjadlw. Now, we will embed the same video using its id − Example Learn WordPress WordPress Installation Following is the video demonstrating how to install WordPress on localhost ... Read More
![Chandu yadav](https://www.tutorialspoint.com/assets/profiles/22330/profile/60_142811-1519038104.jpg)
105 Views
Whenever you create an HTML document, the doctype is the first thing placed in the document.It conveys the web browser about the version of the HTML, this page is written on. It is not casesensitive.Let us see an example displaying DOCTYPE on the top −Example Live Demo Document Title comes here Demo Heading This is the demo text. OutputNow let us see some of the declarations for doctype −HTML5 DeclarationExampleHTML 4 StrictThis document type includes all HTML elements except those that have been deprecated, and those that appear in frameset documents.HTML 4 ... Read More
![Arjun Thakur](https://www.tutorialspoint.com/assets/profiles/13574/profile/60_74441-1560315595.jpg)
113 Views
The HTML DOM Anchor hash property is used to set or return the anchor part of the href attribute value. The part of the URL after the # is what we call the anchor part of a link.Following is the syntax to set the hash property −anchorObject.hash = anchor_partAbove, anchor_part is the anchor part of the URL.Following is the syntax to return the hash property −anchorObject.hashLet us now see an example to implement the DOM Anchor hash property −Example Live Demo Company Our Team Get the anchor part... Display Anchor Part function display() { ... Read More
![Ankith Reddy](https://www.tutorialspoint.com/assets/profiles/22328/profile/60_142162-1519038074.jpg)
91 Views
The HTML DOM download property is used to set or return the value of the download attribute of a link.Following is the syntax to set the download property −anchorObject.download = fileAbove, file represents the file name you can set for the file to be downloaded. The actual extension will get suffixed.Following is the syntax to return the download property: anchorObject.downloadLet us now see an example to implement the DOM Anchor download property −Example Live Demo ReactJS Display the value function display() { var val = document.getElementById("myid").download; document.getElementById("demo").innerHTML = val; ... Read More