Questions tagged [html-input]

The input element represents a typed data field, usually with a form control to allow the user to edit the data.

The input tag in HTML specifies an input field where the user can enter data.

<input> elements are used within a <form> element to declare input controls that allow users to input data.

An input field can vary in many ways, depending on the type attribute.

Tips and Notes

Note: The <input> element is empty, it contains attributes only and no closing </input> tag.

Tip: Use the <label> element to define labels for <input> elements.

757 questions
-1
votes
2 answers

How to align form inputs

What is the best way to align form inputs next to labels without using a fixed label width, as this looks bad if the labels are much shorted then the specified length (especially when using a textarea in the same form, this looks very bad) without…
Zulakis
  • 7,859
  • 10
  • 42
  • 67
-1
votes
1 answer

Can I set word-wrap:break-word to input of type submit?

Can the CSS word-wrap: break-word be applied to an of type submit? Ive applied that css but its not doing anything which isnt what i expected. Im trying to make my submit input wrap around a heading that comes before it. For this fiddle,…
Evanss
  • 23,390
  • 94
  • 282
  • 505
-2
votes
1 answer

create html input for mathematical expression

I need to know how can i create an input text in HTML for a mathematical formula like the one in geogebra.org/classic
-2
votes
1 answer

How to set default value for input inside select option

Hello Guys I Have select and many options and i have input inside on of these options and i want to set default value for it. My Code is bellow
Drwe Joe
  • 3
  • 2
-2
votes
2 answers

How to set the default value "on" in input tag in HTML?

I used html input tag type checkbox in html. Then i get the value attribute of input tag in javascript, it return "on" value. But i didn't write value attribute. How to set the default value "on"?
-2
votes
4 answers

HTML Cannot Get Input Color Value

I am trying to get color input in HTML, and I cannot get the value the user has selected. This is my code: function setColor() { alert(document.getElementById("colorPicker").value) }
nedla2004
  • 1,115
  • 3
  • 14
  • 29
-2
votes
3 answers

How to restrict file type (e.g. .pdf) in HTML5?

How to restrict file type (e.g. .pem, .cer) using in HTML5. The accept tag does not serve the purpose fully, as I can type some other file type and the file gets uploaded. The field is of input type "file".
-2
votes
2 answers

Disable only .(DOT) special charecter in input field

I don't want allow user to enter. (Dot) in my input field.. Rest of the required validation done already. function isNumberKey(evt) { var charCode = (evt.which) ? evt.which : event.keyCode; if (charCode != 46 && charCode > 31 && (charCode <…
Vijay Kumar
  • 597
  • 2
  • 8
  • 27
-2
votes
2 answers

Editable units in HTML

I want the user to enter numbers with units like "px", "em" or "%" and then increase/decrease value using arrows. Similar to this jQuery UI Spinner demo, but with option to type any unit right inside input field. UPD: I came up with this solution…
fornyhucker
  • 616
  • 4
  • 9
-2
votes
1 answer

Displaying Variables in Text Boxes in JavaScript

I am trying to make a text box display a value from a property of an object. I want the text box to display the current stock level of an item, e.g: In the document: script.js var shortsF = new Object ( ); shortsF.description = "Stone Wash Denim…
Matt W
  • 85
  • 1
  • 3
  • 6
-2
votes
1 answer

how to get checkbox value in javascript

My HTML script is Please select a check box to change the color of text
  Red
saleem
  • 1
  • 1
  • 2
-2
votes
1 answer

Javascript Validation for Positive Integer Only Input

I have two text boxes, in it will only be allowed positive integers. If any alphabetical values or any other characters (e.g. %$&*£") are entered, an error message should be displayed and the values must not render a table.
rookJCR
  • 13
  • 1
  • 4
-3
votes
2 answers

Input border cutout for label cross section

I would like to put inputs label on border cross section and would like to hide borders under label like this I did this by simply making label background white but it obviously doesn't work if I place it inside grey div any other solution for…
Trekstler
  • 71
  • 9
-3
votes
1 answer

Why is this input type=time invalid in some browsers with a "stepMismatch": true?

I have a very simple input type=time with a valid time value according to MDN: :invalid { border-color: red; } If I just run the snippet (Safari) and edit the value…
connexo
  • 53,704
  • 14
  • 91
  • 128
1 2 3
50
51