Lists in HTML

Unordered list

Example:
HTML code:

<ul>
<li>Julia
<li>Mandelbrot
<li>DLA
<li>RLA
<li>Lorentz attractor
<li>Lapunov exponents
</ul>

Ordered list

Example:
  1. Uppercase Roman numerals
  2. Lowercase Roman numerals
  3. without type should be 3
  4. Arabic number
  5. Uppercase letter
  6. Lowercase letter
  7. jumping back to 1!
HTML code:

<ol>
<li type = I>Uppercase Roman numerals
<li type = i>Lowercase Roman numerals
<li>without type should be 3
<li type = 1>Arabic number
<li type = A>Uppercase letter
<li type = a>Lowercase letter
<li value = 1>jumping back to 1!
</ol>

Nested unordered list

Example:
HTML code:

<ul>
	<li>Food list
	<ul>
		<li>Vegetables
		<ul>
			<li>onion
			<li>tomatoes
			<ul>
				<li>green tomatoes
				<li>orange tomatoes
			</ul>
			<li>potatoes
		</ul>
		<li>Fruits
		<ul>
			<li>apples
			<li>oranges
			<li>grapes
		</ul>
	</ul>
</ul>

Nested ordered list

Example:
  1. Food list
    1. Vegetables
      1. onion
      2. tomatoes
        1. green tomatoes
        2. orange tomatoes
      3. potatoes
    2. Fruits
      1. apples
      2. oranges
      3. grapes
HTML code:

<ol type = I>
	<li>Food list
	<ol type = 1>
		<li>Vegetables
		<ol type = a>
			<li>onion
			<li>tomatoes
			<ol type = i>
				<li>green tomatoes
				<li>orange tomatoes
			</ol>
			<li>potatoes
		</ol>
		<li>Fruits
		<ol type = a>
			<li>apples
			<li>oranges
			<li>grapes
		</ol>
	</ol>
</ol>

Definition list

Example:
Chess pieces:
King
The most important and consequently the largest of the pieces. The king can move one square in any direction. the game is over when king is checkmated.
Quenn
The strongest piece on the board. Queen can move along diagonals, ranks or files as far as the line is unobscured.
Bishop
The chess piece that moves diagonally over any number of unoccupied squares.
Knight
The chess piece which moves either two squares vertically abd one square horizontally or two squares vertically and one square horizontally. The knight may pass "through" the squares already occupied.
Rook
The chess piece that moves along the ranks and files.
Pawn
The smallest unit at the chess board. A pawn moves stright ahead but captures diagonally. Player can move pawn two squares at first move. If the pawn reaches the eight rank, it must be promoted to another piece.
HTML code:

<dl>
	<dt>King
		<dd>The most important and consequently the largest of the pieces. The king can move one square in any direction. the game is over when king is checkmated.
	<dt>Quenn
		<dd>The strongest piece on the board. Queen can move along diagonals, ranks or files as far as the line is unobscured.
	<dt>Bishop
		<dd>The chess piece that moves diagonally over any number of unoccupied squares.
	<dt>Knight
		<dd>The chess piece which moves either two squares vertically abd one square horizontally or two squares vertically and one square horizontally. The knight may pass "through" the squares already occupied.
	<dt>Rook
		<dd>The chess piece that moves along the ranks and files.
	<dt>Pawn
		<dd>The smallest unit at the chess board. A pawn moves stright ahead but captures diagonally. Player can move pawn two squares at first move. If the pawn reaches the eight rank, it must be promoted to another piece.
</dl>



Back



Back to main page