Lists and Interlinking pages

Types of Lists in HTML

  1. Unordered List

  2. Ordered List

  3. Description List

Unordered List

An unordered list in HTML is a list of items that are displayed in no specific order. Unordered lists are created using the <ul> element in HTML, and each item in the list is represented by an <li> element.

There can be 4 kinds of markers for unordered lists:

  • disc

  • circle

  • square

  • None

The markers can be applied both on <ul> and <li> tags using the 'type' attribute.

Ordered List

An ordered list in HTML is a list of items that are displayed in a specific numerical or alphabetical order. Ordered lists are created using the <ol> element in HTML, and each item in the list is represented by an <li> element.

There can be 5 kinds of markers for the ordered list:

  • Numbers [1]

  • Lowercase Alphabets [a]

  • Uppercase Alphabets [A]

  • Lowercase Roman Numbers [i]

  • Uppercase Roman Numbers [I]

The markers can be applied both on <ol> and <li>tags using the 'type' attribute.

Description List

A description list in HTML is a way to display a list of terms and their corresponding descriptions. It is similar to a dictionary, where each term is followed by its definition. Description lists are created using the <dl> element, with each term represented by an <dt> element and each description represented by an <dd> element.

Introduction to Links

Links (also known as hyperlinks) are used in websites to allow users to navigate from one web page to another. When a user clicks on a link, they are taken to the destination page specified by the link.

Introduction to lists in HTML

A list is a group of related items that are displayed in a specific order.

Lists are useful in websites for several reasons:

  1. Lists can help to organize content clearly and logically, making it easier for users to understand and navigate.

  2. Lists can be used to break up large blocks of text and make the content more visually appealing and easier to read.

  3. Lists can be used to highlight important points or information, making it easier for users to find and reference specific pieces of content.

  4. Lists can be used to create navigation menus, allowing users to easily move between different pages or sections of a website.

Use cases for links in HTML

  1. Navigation

  2. External references

  3. Downloadable content

  4. E-commerce

  5. Social media

The <a> element, also known as the anchor tag, is used in HTML to create a hyperlink. The <a> element allows you to specify the destination of the link using the href attribute.

Links can also be used to open emails or to download files. Here is an example of a link that opens an email client:

Here is an example of a link that allows the user to download a file.

Attributes

  1. href

  2. target: This attribute specifies where the linked document should be opened.

    - _blank

    - _self

    - _parent

    - _top

  3. download: This attribute specifies that the linked document should be downloaded rather than opened in the browser.

  4. title: This attribute specifies a short description of the link, which is often displayed as a tooltip when the user hovers over the link.