Found 2416 Articles for HTML

How to use placeholder attribute in HTML?

Anvi Jain
Updated on 14-May-2020 10:54:04

4K+ Views

If you want to set a hint for text area or input field, then use the HTML placeholder attribute. The hint is the expected value, which gets displayed before the user enters a value, for example, name, details, etc.ExampleYou can try to run the following code to learn how to use placeholder attribute in HTML.           Register                                              

How to play sound file in a web-page in the background?

Smita Kapse
Updated on 25-Feb-2020 07:37:38

22K+ Views

The HTML element is used to add audio to web page. To play sound file in the background on a web page, use the … element. Also, use the autoplay attribute. This will run music in the background whenever the page loads.Set the width and height in a way the player hides on the web page. The loop attribute is added to specify whether the audio will start over again.You can try to run the following code to play a sound file in a web page in the backgroundExampleLive Demo           HTML background music ... Read More

How to use min and max attributes in HTML?

Yaswanth Varma
Updated on 12-Oct-2022 13:37:18

4K+ Views

The min and max properties in HTML are used to specify the element's acceptable range of values. The max attribute sets the element's maximum value, whereas the min attribute sets the element's minimum value. For input restriction, the min and max attributes are used with the number and date input types. Syntax Following is the syntax to use min and max attributes Let’s dive into the following examples to get a clear idea of how to use min and max attributes in HTML. Using min &max Attribute The min and max attribute in HTML is ... Read More

How to use formtarget attribute in HTML?

Krantik Chavan
Updated on 15-Jun-2020 11:32:18

188 Views

The formtarget attribute in HTML is used to indicate where the response that is received after the form submission is displayed. It overrides the target attribute of the HTML form tag. Use the formtarget attribute only with input type submit an image.Here are the attribute values of the formtarget attribute −S. NoValueDescription1_blankResponse gets displayed in a new window or tab2_selfThe default value. The response gets displayed in the same frame.3_parentResponse gets displayed in the parent frame4_topResponse gets displayed in the full body of the window5framenameResponse gets displayed in a named iframeExampleYou can try to run the following code to learn ... Read More

How to use the formmethod attribute in HTML?

Nancy Den
Updated on 14-May-2020 10:22:35

114 Views

The formmethod attribute is used to define the HTTP technique for sending form information. This method is usedwith input type submit a picture. It overrides the method attribute of HTML forms.ExampleYou can try to run the following code to learn how to use the formmethod attribute in HTML.           HTML formmethod attribute                        Student Name          Student Subject                              

How to add an audio player to an HTML webpage?

Anvi Jain
Updated on 16-Jun-2020 07:34:20

4K+ Views

The HTML element is used to add audio to web page. To add an audio player, add the controls attribute.The following three audio formats are supported in HTML − MP3, Wav, and Ogg.ExampleYou can try to run the following code to add an audio player to an HTML web pageLive Demo           HTML audio Tag               Click on Play button...       (Song: Kalimba which is provided as a Sample Music in Windows)                          

How to use formenctype attribute in HTML?

karthikeya Boyini
Updated on 15-Jun-2020 11:32:52

136 Views

The formenctype attribute is used to show how the form data should be encoded when it is submitting to the server. It introduced in HTML5 and only used with input type submit an image.Here are the formenctype attribute values −S.NoValue & Description1application/x-www-form-urlencodedThis is the default. All the characters are encoded before sent.2multipart/form-dataNone of the characters are encoded.3text/plainIn this, the spaces are converted to + symbols. However, no special characters are encoded.ExampleYou can try to run the following code to learn how to use the formenctype attribute in HTML.           HTML formenctype attribute                        Name                    

Why formaction attribute is not working outside of
tag?

Sharon Christine
Updated on 15-Jun-2020 11:31:20

562 Views

We can make the formaction attribute to work outside the tag. The formaction attribute is used to specify more than one submit URLs for one form. When you submit a form, the web browser first checks for a formaction attribute.If the formaction is not present, the web browser moves on to look for an action attribute on the form element.ExampleHere’s an example of the formaction attribute with three different submit buttons −           HTML formaction attribute                                  Button1 ... Read More

How to embed a video using HTML code?

Nitya Raut
Updated on 02-Sep-2023 11:22:37

65K+ Views

To embed a video in an HTML page, use the element. The source attribute included the video URL. For the dimensions of the video player, set the width and height of the video appropriately.The Video URL is the video embed link. The video we will be embedding our example will be YouTube.To get the embed link, go to a YouTube Video and click embed as shown below. You will get a link for embed here −You can try to run the following code to learn how to embed a video using HTML code. Copy the embed link as shown ... Read More

What is the difference between novalidate and formnovalidate attributes?

Samual Sam
Updated on 20-Nov-2023 11:34:03

1K+ Views

The novalidate and formnovalidateattributes are used to bypass validation. The novalidate attribute is applied to a form and prevents it from validation. The formnovalidate is applied to input type submit button, which overrides the novalidate. It submits the form without validating. The novalidate attribute is also a Boolean attribute, but using it won’t validate the form of submission. The formnovalidate attribute in HTML is useful when you have a form with more than one submit button. HTML novalidate attribute The novalidate attribute in HTML is used to signify that the form won’t get validated on submit. It is a Boolean attribute ... Read More

Advertisements