Html: Difference between revisions

From 太極
Jump to navigation Jump to search
Line 9: Line 9:
</pre>
</pre>


=== Radio button [http://www.w3schools.com/tags/tag_label.asp label] and [http://www.w3schools.com/tags/tag_input.asp input] ===
=== radio button [http://www.w3schools.com/tags/tag_label.asp label] and [http://www.w3schools.com/tags/tag_input.asp input] ===
<pre>
<pre>
<form action="demo_form.asp">
<form action="demo_form.asp">

Revision as of 12:38, 16 November 2012

Some useful html tags

form

<form action="demo_form.asp">
First name: <input type="text" name="FirstName" value="Mickey"><br>
Last name: <input type="text" name="LastName" value="Mouse"><br>
<input type="submit" value="Submit">
</form>

radio button label and input

<form action="demo_form.asp">
  <label for="male">Male</label>
  <input type="radio" name="sex" id="male" value="male"><br>
  <label for="female">Female</label>
  <input type="radio" name="sex" id="female" value="female"><br>
  <input type="submit" value="Submit">
</form>

Dropdown list select

<select>
  <option value="volvo">Volvo</option>
  <option value="saab">Saab</option>
  <option value="opel">Opel</option>
  <option value="audi">Audi</option>
</select>

div

<div style="color:#0000FF">
  <h3>This is a heading in a div element</h3>
  <p>This is some text in a div element.</p>
</div>

PHP