Found 2202 Articles for HTML

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

Abhinanda Shri
Updated on 02-Mar-2020 12:41:44

136 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.    

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

George John
Updated on 02-Mar-2020 12:39:42

633 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:                    

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

Anvi Jain
Updated on 02-Mar-2020 12:40:23

699 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.    

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

Giri Raju
Updated on 02-Mar-2020 12:41:03

150 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          

Set the character encodings that are used for form submission in HTML

Govinda Sai
Updated on 02-Mar-2020 12:39:07

234 Views

The accept-charset attribute in HTML is used to include the character encodings for form submission.ExampleYou can try to run the following code to implement accept-charset attribute in HTML −           File Upload Box                                  

Set the types of files that the server accepts in HTML

Nitya Raut
Updated on 02-Mar-2020 12:35:56

178 Views

Use the accept attribute to set the types of files that the server accepts in HTML. Use the attribute only with .ExampleYou can try to run the following code to work with accept attribute −           File Upload Box                                  

How do we create preformatted text in HTML?

Chandu yadav
Updated on 02-Mar-2020 12:35:10

186 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.    

How to indicate a potential word break point within a section in HTML?

usharani
Updated on 02-Mar-2020 12:34:30

146 Views

The HTML tag defines a potential line breakpoint if needed. This stands for Word Break Opportunity.ExampleYou can try to run the following code to learn how to implement tag in HTML −           HTML wbr Tag               The browser to extend the document window beyond the size       of the viewing pane and the poor user must scroll right    

How to add text tracks used in media players in HTML5?

Srinivas Gorla
Updated on 02-Mar-2020 12:33:51

309 Views

Use the tag in HTML5 to add text tracks used in media players. You can try to run the following code to learn how to add text tracks used in media players in HTML5 −Example                                                            Your browser does not support the video element.          

How to add a date and time in HTML5?

Vrundesha Joshi
Updated on 02-Mar-2020 12:23:18

4K+ Views

Use the tag to add date and time. The HTML tag is used for displaying the human readable date and time.The HTML tag also supports the following additional attribute −AttributeValueDescriptiondatetimedatetimeIt is a machine readable date timeExampleYou can try to run the following code to learn how to add date and time in HTML5 −           HTML time Tag               The time is 08:30 pm    

Advertisements