MF Web Services logo

CSS Help & Resources

CSS Variable Reference

Special References

Within CSS there are distinct features, common to certain HTML elements. This section describes as many of those special features, or references, as we could find. CSS consistently offers new features and style elements, or improved functionality. It's an ongoing effort to keep up to date with the changes. Bookmark this page to find out the lastest changes and updates that we've found.

<A> HTML Anchor Tag

The HTML anchor tag, carries with it, a few extra references to be used with the visual formatting of the page. The extra references are listed below.

  • link

    Link defines how an anchor tag will appear, initially.

  • visited

    Visited defines how an anchor tag will appear after a user has visited a page.

  • hover

    Hover is the CSS equivalent of onMouseOver in scripting. Hover can change the appearance of an anchor tag when a user has “hovered” their mouse over an anchor tag.

  • active

    Active defines when a user has clicked an anchor tag, allowing you to alter the appearance of it.

Example of Use
a.myLink:link, a.myLink:visited {
color: red;
text-decoration: none;
}
a.myLink:hover, a.myLink:active {
color: blue;
text-decoration: underline;
}

The above example demomstrates how to use these special anchor references. This paragraph is a link defined exactly as the example above. The link, itself, is red when displayed intially and when the link has already been clicked. When the paragraph is hovered over the link turns blue with an underline. Notice when you click this link, nothing happens, except the paragraph stays underlined and blue - this is now an active link.

first-letter

First letter specifies the first letter in an available HTML element can be formatted differently from the rest of the element. This would be used most often in a paragraph. An example of use below.

Example of Use
p:first-letter {
line-height: 32px;
font-size: 36px;
float: left;
padding-right: 2px;
}

first-line

First line specifies the first line of text, in an available HTML element, can be formatted differently from the rest of the element. This would be used most often in a paragraph. An example of use below.

Example of Use
p:first-line {
font-style: italic;
font-weight: 300;
}