Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
Front End Technology Articles
Page 621 of 652
How to execute the script when the page has finished parsing in HTML?
Use the defer attribute to execute the script when the page has finished parsing in HTML.Firstly, add a js file.Let us give it a name, new.js,function sayHello() { alert("Hello World") }ExampleLet’s add the HTML code now and execute the above script − This is demo text.
Read MoreHow do we display the visible width of a text area in HTML?
Use the cols attribute in HTML to display the visible width of a textarea. You can try to run the following code to implement cols attribute −Example This is a demo paragraph. This is a demo paragraph. This is a demo paragraph. This is a demo paragraph.
Read MoreHow do we display the thickness of the border of an element in HTML?
Use the border attribute in HTML to display the thickness of the border.Note − This attribute is not supported in HTML5.ExampleYou can try to run the following code to learn how to implement border attribute in HTML − Cricketers Name Sachin Tendulkar Virat Kohli Use CSS instead, since the border attribute deprecated in HTML5. table, th, td { border: 1px solid black; } Cricketers Indian Cricketers Name Sachin Tendulkar Virat Kohli
Read MoreHow do we specify that the audio/video will start playing as soon as it is ready in HTML?
Use the autoplay attribute to set that the audio or video will start playing automatically as the page loads.ExampleYou can try to run the following code to implement autoplay attribute in HTML − Your browser does not support the video element.
Read MoreHow to specify that the element should automatically get focus when the page loads in HTML?
Use the autofocus attribute to specify that the element should get focus automatically on page load in HTML −ExampleYou can try to run the following code to learn how to implement autofocus attribute in HTML − Click on the below button to generate an alert box. Result
Read MoreHow to set the script to be executed asynchronously in HTML?
Use the async attribute to set the script to execute asynchronously as and when it is available. It only uses the external script.Firstly, add a js file. Let us give it a name, new.js,function sayHello() { alert("Hello World") }Let’s add the HTML code now and execute the above script − This is demo text.
Read MoreHow to include an alternate text when the original element fails to display in HTML?
Use the alt attribute to add alternative text for an image. If the user fails to view it (loading issue), then the same text will be visible. In addition, the attribute helps screen readers in reading the content to the user.ExampleYou can try to run the following code to implement alt attribute in HTML − HTML alt attribute Simple Image Insert
Read MoreHow do we set the alignment according to surrounding elements in HTML?
Use the align attribute to set the alignment. You can try to run the following code to implement align attribute in HTML −Note − The align attribute deprecated in HTML5. Use CSS instead.Example A right-aligned paragraph. Note: The align attribute is not supported in HTML5. Use CSS instead.
Read MoreHow to specify where to send the form-data when a form is submitted in HTML?
Use the action attribute to add the file, where you want to reach after clicking Submit button. You can also add an email to send the data to that email-id.ExampleYou can try to run the following code to set where to send the form-data when a form is submitted in HTML − Student Contact Form Student Name: Student Subject:
Read MoreHow do we create preformatted text in HTML?
Use the tag to create preformatted text. Note − The tag deprecated.ExampleYou can try to run the following code to learn how to create preformatted text in HTML − HTML xmp Tag HTML tags include for bold text, for italic text.
Read More