Hi, I was wondering how I use the required attribute in case I have put in a radio button input, checkbox input, dropdownlist, datalist input etc. Because there are a variety of inputs there.
Hi,
How do we change the text of the validation message popup?
where did it fetch the popup content from as we didn’t enter it as part of the HTML code.
Does it matter if the “label element” or the “input element” comes first in writing code? Is their a hierarchy? I keep seeing them interchanged in hierarchical structure. But I also see the “ ” tag used too between the 2 elements, and I am wandering if that affects where text is displayed in the output if hierarchy does/doesn’t matter between the 2 elements?
The input box field of this exercise has arrows in it as if the attribute step had been used, but i do not see it in the code and I don’t understand how it shows up. Am I misunderstanding how the arrows are applied to an input? I’ve copied the below:
<form action="check.html" method="GET">
<label for="guess">Enter a number between 1-10:</label>
<br>
<!--Add the min and max attribute to the input-->
<input type="number" name="guess" id="guess" required min="1" max="10">
<br>
<input type="submit" id="submission" value="Submit">
</form>
Hello!
I saw in the form the method was “GET” . That seemed new to me at this point. Why is that used ? How is it different from “POST”? or are they the same ?
Thanks in advance
The GET is to retrieve data. For example the search box of the google home page.
The POST method is to add new data. For example, adding a new post on your Facebook page.
In the example of this lesson the second input element do not have an id attribute in the submit element.
The code in the middle though do have the ID attribute in the submit element.
What does the id attribute in the code signifies here in submit element?