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
Front End Technology Articles - Page 579 of 860
189 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
993 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
180 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
197 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
146 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
HTML colspan Attribute
Updated on 30-Jul-2019 22:30:26
421 Views
The colspan attribute of the element is used to set the number of columns a header cell should span.Following is the syntax −Above, num is the count of columns a header cell should span.Let us now see an example to implement the colspan attribute of the element −Example Live Demo
table, th, td {
border: 2px solid green;
}
Product Expenses
Expenses
Product Development
500000
Marketing
500000
Services
100000
Support
100000
Maintenance
100000
Total Budget = INR 1300000
OutputIn the above example, we have set the column count to span the header cell −ExpensesThe count is 2, therefore two columns will span the header cell.
Updated on 30-Jul-2019 22:30:26
73 Views
The required attribute of the element in HTML is used to let visitors know that this textarea field is to be filled before submitting the form. If a visitor clicks on Submit, without filling the textarea set with required attribute, then the form won’t submit.Following is the syntax −Let us now see an example to implement the required attribute of the element −Example Live Demo Subject-wise rank Student: Subject: Rank: Marks: Remarks OutputIn the above example, we ... Read More
Updated on 12-Jun-2020 08:56:26
206 Views
The shadowBlur property of the HTML canvas is used to set the blur level for shadows. The default value is 0. The element allows you to draw graphics on a web page using JavaScript. Every canvas has two elements that describes the height and width of the canvas i.e. height and width respectively.Following is the syntax −ctx.shadowBlur=num;Above, the num represents the blur level for the shadow.Let us now see an example to implement the shadowBlur property of canvas −Example Live Demo var c = document.getElementById("newCanvas"); var ctx = c.getContext("2d"); ctx.shadowBlur = 20; ... Read More
Updated on 30-Jul-2019 22:30:26
166 Views
The disabled attribute of the is used to disable an option-group. After that, the option-group becomes unclickable. Following is the syntax −Let us now see an example to implement the disabled attribute of the element −Example Live Demo
Water Levels
Impurity Level
3:2
5:3
2L
5L
10L
20L
OutputIn the above example, we have set two option-groups −
3:2
5:3
2L
5L
10L
20L
We have set one of the option-group as disabled −
2L
5L
10L
20L
Now the above options will become disabled and visitors won’t be able to select them.
Updated on 30-Jul-2019 22:30:26
129 Views
The shadowOffsetY property of the HTML canvas is used to set the vertical distance of the shadow from the shape. The element allows you to draw graphics on a web page using JavaScript. Every canvas has two elements that describes the height and width of the canvas i.e. height and width respectively.Following is the syntax −context.shadowOffsetY=num;Here, num represents the vertical distance in pixels. Let us now see an example to implement the shadowOffsetY property of canvas −Example Live Demo var c = document.getElementById("newCanvas"); var ctx = c.getContext("2d"); ctx.shadowBlur = 30; ctx.shadowOffsetX = ... Read More
Advertisements
421 Views
The colspan attribute of the element is used to set the number of columns a header cell should span.Following is the syntax −Above, num is the count of columns a header cell should span.Let us now see an example to implement the colspan attribute of the element −Example Live Demo table, th, td { border: 2px solid green; } Product Expenses Expenses Product Development 500000 Marketing 500000 Services 100000 Support 100000 Maintenance 100000 Total Budget = INR 1300000 OutputIn the above example, we have set the column count to span the header cell −ExpensesThe count is 2, therefore two columns will span the header cell.
73 Views
The required attribute of the element in HTML is used to let visitors know that this textarea field is to be filled before submitting the form. If a visitor clicks on Submit, without filling the textarea set with required attribute, then the form won’t submit.Following is the syntax −Let us now see an example to implement the required attribute of the element −Example Live Demo Subject-wise rank Student: Subject: Rank: Marks: Remarks OutputIn the above example, we ... Read More
206 Views
The shadowBlur property of the HTML canvas is used to set the blur level for shadows. The default value is 0. The element allows you to draw graphics on a web page using JavaScript. Every canvas has two elements that describes the height and width of the canvas i.e. height and width respectively.Following is the syntax −ctx.shadowBlur=num;Above, the num represents the blur level for the shadow.Let us now see an example to implement the shadowBlur property of canvas −Example Live Demo var c = document.getElementById("newCanvas"); var ctx = c.getContext("2d"); ctx.shadowBlur = 20; ... Read More
166 Views
The disabled attribute of the is used to disable an option-group. After that, the option-group becomes unclickable. Following is the syntax −Let us now see an example to implement the disabled attribute of the element −Example Live Demo Water Levels Impurity Level 3:2 5:3 2L 5L 10L 20L OutputIn the above example, we have set two option-groups − 3:2 5:3 2L 5L 10L 20L We have set one of the option-group as disabled − 2L 5L 10L 20L Now the above options will become disabled and visitors won’t be able to select them.
129 Views
The shadowOffsetY property of the HTML canvas is used to set the vertical distance of the shadow from the shape. The element allows you to draw graphics on a web page using JavaScript. Every canvas has two elements that describes the height and width of the canvas i.e. height and width respectively.Following is the syntax −context.shadowOffsetY=num;Here, num represents the vertical distance in pixels. Let us now see an example to implement the shadowOffsetY property of canvas −Example Live Demo var c = document.getElementById("newCanvas"); var ctx = c.getContext("2d"); ctx.shadowBlur = 30; ctx.shadowOffsetX = ... Read More