Explain the following with example 1. Table tag 2. Check box 3. Radio 4. Select box

           1.   TABLE TAG:

HTML मे check box, Radio button, Tex field, drop Man menus आदि को define करweb page में Form design कर सकते है उसी प्रकार web page में list या componentsको table बनाकर design कर सकते है

Table में Rows aunt column को define किया जाता है Row और column को संखा के अनुसार ही table तथा size निर्धारित होता है HTML में table बनाने के लिए table tag दिया गया है यह tag table का opining होता है उस के बाद जितने row बनाते है उसे </td> tag का उपयोग किया जाता है last मे table </table> close किये जाते है

 

Example:-

<html>

<head>

<style> table, td, th

{

Border:1px solid break;

}

</style>

</head>

<body>

<h1>the table element</h1>

<table>

<tr>

<td>smart</td>

<td>books</td>

</tr>

<tr>

<td>ss</td>

<td>publication</td>

</tr>

</Tabb>

</body>

</html>

 

Output:-

  Smart   Books
   SS  Publication

 

        2.  CHECK BOX:

जब एक से अधिक विकल्प को user के द्वारा चुनना पड़ता है तो उसके लिए check box का उपयोग किया जाता है इसको भी input type के द्वारा define किया जाता है लेकिन type attributes की value को check box लिख दिया जाता है

Syntax – <input type=”check box”Name=”value“value “value”

 

Example :-

<!Doctype html>

<html>

<head>

<title>check box example</title>

</head>

<body>

<form>choose your subject

<input type=”check box”Name=”Hindi”>hind

<input type=”check box”Name=”Cs”>cs

<input type=”check box” Name=”Urdu”>urdu

<input type=”check box” Name=”Maths”>maths

<input type=”check box”  Name=”Political”>political

</form>

</body>

</html>

Output :- choose your subject

Hindi

Cs

Urdu

Math

Political

 

 

        3.  RADIO BUTTON:

इसमे दिये गये एक से अधिक option मे से किसी एक option को select करने मे इसका उपयोग किया जाता है

Syntax :- <input type=”Radio“ Name=”value” value=”value>

 

Example :-

<!Doctype>

<html>

<title>Radio</title>

<head>

<body>

<form>select your official language;

<input type=”Redio”value=”Hindi ”Name.=”subject”>hind

<input type=”Radio” value=”English “ Name=”subject “>english

<input type=”Radio” value=”Urdu” Name=”subject”>urdu

<input type=”Redio”value “Malani“ Name=”subject “ >

</body>

</head>

</html>

 

          4. SELECT BOX:

select box user कोएकdrop downmenu सेकिसीएकItem को select करने की सुविधा प्रदान है। ये control web page पर कम space लेता है, इस लिए जब वेब page पर कम हो तब इस control को उपयोग में लेते है

 

Example –

<! DOCTYPE html>

<html>

<head>

<title>list of city</title>

</head>

<body>

<form>

<select name=”city ”required>

<option value=”Delhi”>Delhi</option>

<option value=”Mumbai”>Mumbai</option>

<option value=”Pune”>Pune</option>

</form>

</body>

</html>

error: Content is protected !!