Home > General > HTML Links & Lists

HTML Links & Lists

HTML Links

  • A link is a connection from one Web resource to another.
  • A link has two ends — called anchors — and a direction.
  • The link starts at the “source” anchor and points to the “destination” anchor, which may be any Web resource (e.g., an image, an HTML document, an element within an HTML document, etc.).
  • The text or an image that provides such linkages is called hypertext, hyperlink, or hotspot.

What is Hyperlink???

  • A Hyperlink is a connection between an HTML element such as text, an image, or anything else on a page and other resource.
  • That link might be to another web-page, an external image, or an e-mail address.

Difference between Hyperlink and Normal HTML Text:

  • Appears in blue color.

­         The default color setting in a browser for hyperlink text or image.

­         The color can be set dynamically via HTML program if required.

  • The Hyperlink text/image is underlined.
  • When the mouse cursor is placed over it, the standard arrow shaped mouse cursor changes to the shape of a hand.

Changing the color of Links:

  • To change the link color there are three attributes that can be specified with the <body> tag.
  • These are:

­         LINK

­         ALINK

­         VLINK

HTML Lists

  • HTML provides three type of lists.
  • They are listed below:
    • A list of multi-line paragraphs, listed separately and ordered numerically in some way.
    • The list items are marked with numbers.
    • <OL ...> creates an ordered list.
    • “Ordered” means that the order of the items in the list is important.
    • By default, the number starts with 1,2,3…….
    • An ordered list starts with the <ol> tag.
    • Each list item starts with the <li> tag.
    • Example:
    • Here is how it looks in a browser:
  1. Ordered List:
<ol>
<li>Coffee</li>
<li>Milk</li>
</ol>
    1. Coffee
  1. Milk
  1. Unordered List:
  • § A list of multi-line paragraphs, listed separately and usually marked by a bullet or similar symbol (Unordered List)
  • <UL ...> creates an unordered list.
  • The unordered part means that the items in the list are not in any particular order.
  • The list items are marked with bullets (typically small black circles).
  • An unordered list starts with the <ul> tag.
  • Each list item starts with the <li> tag.
  • Example:

<ul>

<li>Coffee</li>

<li>Milk</li>

</ul>

  • Here is how it looks in a browser:
    • Coffee
    • Milk
    • 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 <dl> tag.
    • Each definition-list term starts with the <dt> tag.
    • Each definition-list definition starts with the <dd> tag.
    • Example:
  1. Definition List:

<dl>

<dt>Coffee</dt>

<dd>Black hot drink</dd>

<dt>Milk</dt>

<dd>White cold drink</dd>

</dl>

  • Here is how it looks in a browser:

Coffee

Black hot drink

Milk

White cold drink

Categories: General
  1. No comments yet.
  1. No trackbacks yet.

Leave a comment