110 likes | 286 Views
More HTML (lists, anchors, input types). MIS 3501, Fall 2014 Jeremy Shafer Department of MIS Fox School of Business Temple University September 16, 2014. HTML Lists – Unordered lists. Unordered lists start with the <ul> tag and end with the </ul> tag.
E N D
More HTML (lists, anchors, input types) MIS 3501, Fall 2014 Jeremy Shafer Department of MIS Fox School of Business Temple University September 16, 2014
HTML Lists – Unordered lists • Unordered lists start with the <ul> tag and end with the </ul> tag. • Individual items in the list begin with <li> and end with the </li> tag. • Items are nested inside of lists. Like this: <ul> <li>Bananas</li> <li>Apples</li> <li>Mangos</li> <li>Pears</li> </ul>
HTML Lists – Unordered lists PHP Programming with MySQL, 2nd Edition
HTML Lists – Ordered lists • Unordered lists start with the <ol> tag and end with the </ol> tag. • Individual items in the list begin with <li> and end with the </li> tag. • Items are nested inside of lists. Like this: <ol> <li>Bananas</li> <li>Apples</li> <li>Mangos</li> <li>Pears</li> </ol>
Anchors • The anchor tag <a> has attributes: • href (determines where the anchor will direct you) • target (determines browser behavior, common values are _self and _blank)
Input type “text” • “text” is the default type of an input tag. • Input tags should always have a name and id attribute. • Input tags of type text can have a attributes that specify size (for presentation) and maxlength (restricts the user to an upper limit of characters.) • Input tags can have an attribute called “value” that specifies a default value for the tag.
Input type “password” • An input tag with a type of “password” will obscure text typed into it. • Otherwise, it is exactly like a input tag of type “text” • Using an input type of “password” helps prevent people from seeing your password as you type it. Other than that, it doesn’t add any security to your application.
Radio buttons • Use input type of “radio” to allow the user to select one answer from a list of options. • In order for a group of radio buttons to work together, they must all have the same name. • In order for each radio button to be labelled appropriately, they must all have unique ids. • An attribute of “checked” can be added to make one radio button be checked by default.
Input type “checkbox” • A collection of checkboxes can allow a user to select multiple options. • Unlike radio buttons, checkboxes need unique names … otherwise you might lose user input. • Like the radio button, an attribute of “checked” can be added to make one radio button be checked by default.
The select tag • The select tag presents the user with a list of options. • Each selection option is self-labelled (no extra label tag required.) • An attribute of “selected” can be added to make one radio button be checked by default.