Link styles : li « Tags « HTML / CSS






Link styles

   

<?xml version="1.0" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">

<head>
  <title>CSS Example</title>
<style type='text/css'>
a {
  font-family: arial, verdana, sans-serif; 
  font-size:12px;
  font-weight:bold;}

a:link {
  color:#0000ff;
  text-decoration:none;}

a:visited {
  color:#333399;
  text-decoration:none;}

a:active {
  color:#0033ff;
  text-decoration:underline;}

a:link:hover {
  background-color:#e9e9e9;
  text-decoration:underline;}
</style>

</head>

<body>

<h1>Link styles</h1>

<p>This example contains some links, which you should play with to see how they behave:</p>

<ul>
  <li>The <a href="http://www.wrox.com/">Wrox Web site</a> tells you about existing and forthcoming Wrox books.</li>
  <li>The <a href="http://www.w3.org/">W3C Web site</a> is the home of the XHTML and CSS recommendations.</li>
  <li>The <a href="http://www.google.com/">Google Web site</a> is a popular search tool that will help you find answers to any questions you have.</li>
</ul>

</body>
</html>

   
    
    
  








Related examples in the same category

1.'li' creates one item in a list
2.Nested LI tag
3.Add style to an anchor in a LI tag
4.Define class for
  • to set its font weight to bold
  • 5.LI width: 33%
    6.LI margin: 0 0 0.25em 0
    7.LI font: 1.1em/1.2 Verdana, Arial, Verdana, sans-serif;
    8.Set display to inline to a LI under a UL in DIV
    9.Alignment of list items
    10.Alignment of list items with margin
    11.Three level list
    12.Inline centred list
    13.Right-aligned bullets
    14.Tab like list
    15.li list-style-type: lower-roman;
    16.li text-indent: -0.75em;
    17.UL LI bullet image
    18.LI display: inline;
    19.LI list-style-type: none;
    20.LI line-height: 44px;
    21.List with no margin
    22.Margin for list
    23.Without list type
    24.li { list-style-image: url("http://java2s.com/style/logo.png");}
    25.list-style-position:inside;list-style-position:outside;
    26.list-style: lower-roman inside;
    27.List order and start
    28.nested ordered and unordered lists
    29.HTML for a definition list
    30.HTML and CSS for vertical and horizontal lists
    31.Selecting elements in nested lists
    32.HTML and CSS for two lists with different list-style properties
    33.HTML and CSS for displaying ordered list style types
    34.HTML and CSS for mixed list-style-type values
    35.Using the display property to make a list display inline
    36.Definition List Example
    37.Unordered List Example
    38.Scrolled List Example
    39.Nested Lists
    40.List types
    41.Lists as navigation
    42.Here is a definition list
    43.a nested ordered list
    44.Dropdown List Example
    45.Link list inside a DIV
    46.Page list bottom bar
    47.ul li list-style-type: square;
    48.Image and text list
    49.Using Arrow Image for LI list
    50.For unordered lists, there are three: disc, square, and circle.
    51.For ordered lists, there are eleven different styles of marker:
    52.The marker can be removed from either ordered or unordered lists with the none keyword.
    53.Setting style for LI inside a DIV
    54.line-height: 44px; for li
    55.Using double arrow sign for UI LI