Front End Technology Articles

Page 621 of 652

How to execute the script when the page has finished parsing in HTML?

Rishi Rathor
Rishi Rathor
Updated on 03-Mar-2020 432 Views

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 More

How do we display the visible width of a text area in HTML?

Arjun Thakur
Arjun Thakur
Updated on 03-Mar-2020 224 Views

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 More

How do we display the thickness of the border of an element in HTML?

Chandu yadav
Chandu yadav
Updated on 02-Mar-2020 197 Views

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 More

How do we specify that the audio/video will start playing as soon as it is ready in HTML?

Ankith Reddy
Ankith Reddy
Updated on 02-Mar-2020 371 Views

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 More

How to specify that the element should automatically get focus when the page loads in HTML?

mkotla
mkotla
Updated on 02-Mar-2020 302 Views

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 More

How to set the script to be executed asynchronously in HTML?

Abhinanda Shri
Abhinanda Shri
Updated on 02-Mar-2020 165 Views

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 More

How to include an alternate text when the original element fails to display in HTML?

Giri Raju
Giri Raju
Updated on 02-Mar-2020 181 Views

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 More

How do we set the alignment according to surrounding elements in HTML?

Anvi Jain
Anvi Jain
Updated on 02-Mar-2020 740 Views

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 More

How to specify where to send the form-data when a form is submitted in HTML?

George John
George John
Updated on 02-Mar-2020 683 Views

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 More

How do we create preformatted text in HTML?

Chandu yadav
Chandu yadav
Updated on 02-Mar-2020 216 Views

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
Showing 6201–6210 of 6,517 articles
« Prev 1 619 620 621 622 623 652 Next »
Advertisements