Skip to content

Instantly share code, notes, and snippets.

View aaggour's full-sized avatar

Ahmad Aggour aaggour

View GitHub Profile
@aaggour
aaggour / minlength-attribute
Last active July 25, 2019 22:12
minlength attribute
<input type=text minlength=10>
<textarea minlength=20></textarea>
@aaggour
aaggour / min, max, and step attributes
Created July 25, 2019 22:40
the min, max, and step attributes
<input type="number" min="0" max="100" step="5">
<input type="range" min="0" max="15" step="5">
@aaggour
aaggour / date type
Created July 25, 2019 22:48
date type
<input type=date step=7 min=2014-09-08> - Monday only
<input type=time min=9:00 max=17:00 step=900> - 15m increments
<input type=week step=2 min=2014-W30>
@aaggour
aaggour / tabindex attribute
Created July 25, 2019 23:45
tabindex attribute
<input tabindex="3">
<input tabindex="0">
<input tabindex="-1">
<input>
<input tabindex="2">
<input tabindex="1">
<span tabindex="4"> This wouldn't normally receive focus</span>
@aaggour
aaggour / placeholder attribute
Created July 29, 2019 19:32
placeholder attribute
<input type="text" placeholder="(555) 555-5555">
<textarea placeholder="Smurfberries"></textarea>
@aaggour
aaggour / autofocus type attribute
Created July 29, 2019 19:44
autofocus type attribute
<input autofocus type="text">
@aaggour
aaggour / maxlength attribute
Created July 29, 2019 19:47
maxlength attribute
<input type="text" maxlength="10">
<textarea maxlength="20"></textarea>
@aaggour
aaggour / list attribute
Created July 29, 2019 19:51
list attribute
<input type="text" list="numbers" />
<input type="range" min="0" max="100" list="numbers" />
<input type="number" min="0" max="100" list="numbers" />
<datalist id="numbers">
<option>10</option>
<option label="30">30</option>
<option label="midpoint">50</option>
<option>70</option>
<option>90</option>
@aaggour
aaggour / autocomplete attribute
Created July 30, 2019 16:22
autocomplete attribute
<form autocomplete="off">
<input type="text" name="name" autocomplete="off">
@aaggour
aaggour / required attribute
Created July 30, 2019 16:27
required attribute
<input type=text required name=foo>