Lists and Tables in HTML5
SLVIKI
9:47 PM
0
In the previous blog post i talk about commenting in html5. another very important thing in html is lists and tables. So in here I'll talk about how to make a list using html and how to make a table using html.
To make lists and table there are few elements that we should use, you can use following elements to make a table or a list.
1.<li> - This is the List item element used in conjunction with <ul> or <ol> to create lists of information.
2. <ol> - This is a Ordered List element which is an ordered list of information, used in conjunction with <li>.
3. <table> - This is a table element which used with <tr>, <td>, and other elements to create a table for presenting infomation.
4. <td> - This is the Table Cell element which use to create a cell in a cell in a table row.
5. <th> - This is the table header element which is a table cell that's a heading.
6. <tr> - This is Table Row element which creates a row of a table.
7. <ul> - This is Unordered List element which Related to <ol> and <li> to create lists of information.
By using these elements you will be able to make lists and tables
So now lets look at some examples.
This is an example code to unordered list, study the code and try it yourself
Here is the output which you get from above code.
by using <ol> for <ul> you can create a ordered list like this,
here is the example code,
This is the output of that code.
Now lets look at how to make a table, here is an example code shows an example table, refer the code and practice it multiple times,
This is the output of above code.
You can add borders to the table by making a small change in <table> tab like this
And after you make the change the output will be like this,
So this is all about basic html5 to make a list and a table you can change the appearance to be more beautiful by using CSS.
No comments