Welcome to another tutorial. In this tutorial you will learn how to create Lists and Forms in HTML.
So first let's look at lists. Lists come in two forms, ordered and unordered. Unordered means the list has no numbering and just displays a bullet point for each item in that list. Ordered will display a number instead of a bullet point. Below is the code for both, the first is an unordered list:
Code :
- Point One
- Point Two
- Point Three
Output:
- Point One
- Point Two
- Point Three
Code :
- Point One
- Point Two
- Point Three
Output:
- Point One
- Point Two
- Point Three
As you can see the syntax is extremely similar. The <li> tag stands for "List Item". You can nest lists one inside the other like below:
Code :
- Point One
- Sub Point One
- Sub Point Two
- Point Two
- Point Three
Output:
- Point One
- Sub Point One
- Sub Point Two
- Point Two
- Point Three
Now onto something a little more complex, forms. A form always starts with a line similar to this:
Code :
This line starts the form, don't worry too much about the enctype or the method. The method only details how the form is submitted, whether it's visible in the URL or not. Now below are the main form elements used:
Code :MaleFemale DogCat
The mainly used form elements are listed above. Below is the full working code of a form:
Code :
Output:
When only knowing just HTML the uses of a form are limited to mailing the content straight to an address. If you choose to go on to learn PHP forms become a lot more useful.
In the next tutorial we will look at frames!
To post comments you must sign in to your account below!
If you do not currently have an account click here to create one now!