Wednesday, 20 June 2018

Chaudhari Karan

HTML – Lists

    No comments:

HTML – Lists


Hello friends, In this lecture, we will discuss lists in HTML.
HTML – Lists


HTML has three ways of specifying lists of information. All lists contain one or more list elements.
  • ·         ul − This is unordered list. It is using plain bullets.
  • ·         ol − This is ordered list. It uses different numbers to list items.
  • ·         dl − This is a definition list. This arranges items in the same way as arranged in a dictionary.

HTML Unordered Lists

HTML unordered list is the collection of related items which have no sequence or special order. This list is used the ul tag for creating the list. All item in the list is marked with a bullet.


Example

HTML Unordered Lists

Output
HTML Unordered Lists

The type Attribute

The type attribute used the ul tag to specify the type of bullet. By default, it is the disc.
Here is some possible option-
  • ·         ul type = "square"
  • ·         ul type = "disc"
  • ·         ul type = "circle"

Example

In this example we used ul type = "square" type attributes.

HTML type Attribute

Output
HTML type Attribute

Example


In this example we used ul type = "disc" type attributes.

HTML type Attribute
Output
HTML type Attribute

Example


In this example we used ul type = "circle" type attributes.

HTML type Attribute

Output
HTML type Attribute


HTML Ordered Lists

HTML ordered list used for the numbered list instead of bulleted. This list used the ol tag for creating lists.

Example
HTML Ordered Lists

Output
HTML Ordered Lists

The type Attribute

The type attribute used ol tag to specify the type of numbering. By default, it is a number.
  •          ol type = "1" - Default-Case Numerals.
  •          ol type = "I" - Upper-Case Numerals.
  •          ol type = "i" - Lower-Case Numerals.
  •          ol type = "A" - Upper-Case Letters.
  •          ol type = "a" - Lower-Case Letters.

Example

In this example we used ol type = "1" type attributes.


HTML type Attribute in ordered list
Output
HTML type Attribute in ordered list


Example


In this example we used ol type = "I" type attributes.

HTML type Attribute in ordered list
Output
HTML type Attribute in ordered list

Example


In this example we used ol type = "i" type attributes.

HTML type Attribute in ordered list

Output
HTML type Attribute in ordered list

Example


In this example we used ol type = "A" type attributes.

HTML type Attribute in ordered list
Output
HTML type Attribute in ordered list

Example


In this example we used ol type = "a" type attributes.

HTML type Attribute in ordered list
Output
HTML type Attribute in ordered list

The start Attribute

The start attribute used ol tag to specify the starting point of numbering.
  •          ol type = "1" start = "4"  -  Numerals start with 4.
  •          ol type = "I" start = "4"  -  Numerals start with IV .
  •          ol type = "i" start = "4"  -  Numerals start with iv.
  •          ol type = "A" start = "4"  -  Numerals start with D.
  •          ol type = "a" start = "4"  -  Numerals start with d.

Example

In this example we used ol type = "1" start = "4" start attribute.

HTML start Attribute
Output
HTML start Attribute

HTML Definition Lists

HTML supports a list style which is known as definition lists where entries are listed like in a dictionary. The definition list is the present a glossary, list of terms, or other name/value list.
Definition List useful tags.
  • ·         dl − This tag used for start the list
  • ·         dt −This is a term
  • ·         dd − This is a term definition
  • ·         /dl − This tag used for end of the list

Example

HTML Definition Lists
Output
HTML Definition Lists

Subscribe to this Blog via Email :