-HTML Lists
Posted in | 0 Comments
HTML supports ordered, unordered and definition lists.
Examples
An unordered listThis example demonstrates an unordered list.
An ordered listThis example demonstrates an ordered list.
(You can find more examples at the bottom of this page)
Unordered Lists
An unordered list is a list of items. The list items are marked with bullets (typically small black circles).
An unordered list starts with the
- tag. Each list item starts with the
- tag.
- Coffee
- Milk
Here is how it looks in a browser:
Coffee
Milk
Inside a list item you can put paragraphs, line breaks, images, links, other lists, etc.
Ordered Lists
An ordered list is also a list of items. The list items are marked with numbers.
An ordered list starts with the- tag. Each list item starts with the
- tag.
- Coffee
- Milk
Here is how it looks in a browser:
Coffee
Milk
Inside a list item you can put paragraphs, line breaks, images, links, other lists, etc.
Definition Lists
A definition list is not a list of items. This is a list of terms and explanation of the terms.
A definition list starts with the- tag. Each definition-list term starts with the
- tag. Each definition-list definition starts with the
- tag.
- Coffee
- Black hot drink
- Milk
- White cold drink
Here is how it looks in a browser:
Coffee
Black hot drink
Milk
White cold drink
Inside a definition-list definition (the- tag) you can put paragraphs, line breaks, images, links, other lists, etc.
More Examples
Different types of ordered listsThis example demonstrates different types of ordered lists.
Different types of unordered ListsThis example demonstrates different types of unordered lists.
Nested listThis example demonstrates how you can nest lists.
Nested list 2This example demonstrates a more complicated nested list.
Definition listThis example demonstrates a definition list.
List Tags
Tag
Description
Defines an ordered list
Defines an unordered list
Defines a list item
Defines a definition list
Defines a definition term
Defines a definition description
Deprecated. Use
-HTML Tables
Posted in | 0 Comments
With HTML you can create tables.
Examples
TablesThis example demonstrates how to create tables in an HTML document.
Table bordersThis example demonstrates different table borders.
(You can find more examples at the bottom of this page)
Tables
Tables are defined with the
tag). The letters td stands for "table data," which is the content of a data cell. A data cell can contain text, images, lists, paragraphs, forms, horizontal rules, tables, etc.
How it looks in a browser: row 1, cell 1 row 1, cell 2 row 2, cell 1 row 2, cell 2 Tables and the Border Attribute If you do not specify a border attribute the table will be displayed without any borders. Sometimes this can be useful, but most of the time, you want the borders to show. To display a table with borders, you will have to use the border attribute:
Headings in a Table Headings in a table are defined with the | tag.
How it looks in a browser: Heading Another Heading row 1, cell 1 row 1, cell 2 row 2, cell 1 row 2, cell 2 Empty Cells in a Table Table cells with no content are not displayed very well in most browsers.
How it looks in a browser: row 1, cell 1 row 1, cell 2 row 2, cell 1 Note that the borders around the empty table cell are missing (NB! Mozilla Firefox displays the border). To avoid this, add a non-breaking space ( ) to empty data cells, to make the borders visible:
How it looks in a browser: row 1, cell 1 row 1, cell 2 row 2, cell 1 Basic Notes - Useful Tips The |
---|
-HTML Frames
Posted in | 0 Comments
With frames, you can display more than one Web page in the same browser window.
Examples
Vertical framesetThis example demonstrates how to make a vertical frameset with three different documents.
Horizontal framesetThis example demonstrates how to make a horizontal frameset with three different documents.
(You can find more examples at the bottom of this page)
Frames
With frames, you can display more than one HTML document in the same browser window. Each HTML document is called a frame, and each frame is independent of the others.
The disadvantages of using frames are:
The web developer must keep track of more HTML documents
It is difficult to print the entire page
The Frameset Tag
The
Note: The frameset column size value can also be set in pixels (cols="200,500"), and one of the columns can be set to use the remaining space (cols="25%,*").
Basic Notes - Useful Tips
If a frame has visible borders, the user can resize it by dragging the border. To prevent a user from doing this, you can add noresize="noresize" to the tag.
Add the
Important: You cannot use the tags together with the tags! However, if you add a