HTML Short Note
HTML Short Note
<font> wlaIr yeviõ .ekaùu i|yd (Defines font, color, and size for text)
<p><font color="red" face="verdana" size="6" >This is some text!</font></p>
Wm,laIK (Attributes)
• Type- Indicates the type of input control and for text input control it will be set
to text.
• Name- Used to give a name to the control which is sent to the server to be
recognized and get the value.
• Value- This can be used to provide an initial value inside the control.
• Size- Allows to specify the width of the text-input control in terms of
characters.
• Maxlength- Allows to specify the maximum number of characters a user can
enter into the text box.
2
Password <label for="pwd">Password:</label>
input <input type="password" id="pwd" name="pwd" minlength="8">
controls
Wm,laIK (Attributes)
• Type- Indicates the type of input control and for password input control it will
be set to password.
• Name- Used to give a name to the control which is sent to the server to be
recognized and get the value.
• Value- This can be used to provide an initial value inside the control.
• Size- Allows to specify the width of the text-input control in terms of
characters.
• Maxlength- Allows to specify the maximum number of characters a user can
enter into the text box.
<textarea> Defines a multiline input control (text area)
Multiple-Line Text Input Controls
<textarea rows="4" cols="50" name="comment">
Enter text here...</textarea>
Wm,laIK (Attributes)
Name- Used to give a name to the control which is sent to the server to be
recognized and get the value.
• Rows- Indicates the number of rows of text area box.
• Cols- Indicates the number of columns of text area box
checkbox <input type="checkbox" id="vehicle1" name="vehicle1" value="Bike">
<label for="vehicle1"> I have a bike</label><br>
<input type="checkbox" id="vehicle2" name="vehicle2" value="Car">
<label for="vehicle2"> I have a car</label>
Wm,laIK (Attributes)
• Type- Indicates the type of input control and for checkbox input control it will
be set to checkbox.
• Name- Used to give a name to the control which is sent to the server to be
recognized and get the value.
• Value- The value that will be used if the checkbox is selected.
• Checked- Set to checked if you want to select it by default.
radio <p>Please select your gender:</p>
<input type="radio" id="male" name="gender" value="male">
<label for="male">Male</label><br>
<input type="radio" id="female" name="gender" value="female">
<label for="female">Female</label>
3
Wm,laIK (Attributes)
• Type- Indicates the type of input control and for checkbox input control it will
be set to radio.
• Name- Used to give a name to the control which is sent to the server to be
recognized and get the value.
• Value- The value that will be used if the radio box is selected.
• Checked- Set to checked if you want to select it by default.
date Èkhla wdodkh i|yd
<label for="birthday">Birthday:</label>
<input type="date" id="birthday" name="birthday">
• file_extension - Specify the file extension(s) (e.g: .gif, .jpg, .png, .doc) the user
can pick from
• audio/* - The user can pick all sound files
• video/* - The user can pick all video files
• image/* - The user can pick all image files
reset <input type="reset" value="Reset">
4
<select> ,ehsia;=jla ieliSug (Defines a drop-down list)
Wm,laIK (Attributes)
• Name - Used to give a name to the control which is sent to the server to
be recognized and get the value.
• Size- This can be used to present a scrolling list box.
• Multiple - If set to "multiple" then allows a user to select multiple items from
the menu.
<option> ,ehsia;=jlg wx.hla tl;= lsÍug (Defines an option in a drop-down list)
<label for="cars">Choose a car:</label>
<select id="cars" name="cars">
<option value="volvo">Volvo</option>
<option value="saab">Saab</option>
<option value="opel">Opel</option>
<option value="audi">Audi</option>
</select>
<label> f,an,hla tla lsÍug (Defines a label for an <input> element)
<label for="male">Male</label>
<input type="radio" name="gender" id="male" value="male"><br>
<label for="female">Female</label>
<input type="radio" name="gender" id="female" value="female"><br>
<label for="other">Other</label>
<input type="radio" name="gender" id="other" value="other"><br><br>
<input type="submit" value="Submit">
<fieldset> fmdaruhl Wmdx. ldKav lsÍug (Groups related elements in a form)
<fieldset>
<legend>Personalia:</legend>
<label for="fname">First name:</label>
<input type="text" id="fname" name="fname"><br><br>
<label for="lname">Last name:</label>
<input type="text" id="lname" name="lname"><br><br>
<label for="email">Email:</label>
<input type="email" id="email" name="email"><br><br>
<label for="birthday">Birthday:</label>
<input type="date" id="birthday" name="birthday"><br><br>
<input type="submit" value="Submit">
</fieldset>
5
<legend> fieldset ys ud;Dldj fh§ug (Defines a caption for a <fieldset> element)
<legend>Personalia:</legend>
Audio / Video
Tag Description
<audio> Y%jH f.dkqjla fjí msgj q lg iïnkaO lsÍu (Defines sound content)
<audio controls>
<source src="horse.ogg" type="audio/ogg">
<source src="horse.mp3" type="audio/mpeg">
Your browser does not support the audio tag. </audio>
<source> f.dkqjl uQ,dY%h msysàu
Defines multiple media resources for media elements (<video>, <audio> and
<picture>)
<video> ùäfhda f.dkqjla fjí msgqjlg iïnkaO lsÍu (Defines a video or movie)
<video width="320" height="240" controls>
<source src="movie.mp4" type="video/mp4">
<source src="movie.ogg" type="video/ogg">
Your browser does not support the video tag. </video>