click below
click below
Normal Size Small Size show me how
CSS Codes
Term | Definition |
---|---|
<p style="color:red"> | Creates an inline style. Code is placed inside the opening tag of the desired tag. |
<style type="text/css">hr {color: red;}</style> | Creates an internal style sheet. Code is placed in the <head> section. |
<head><link rel="stylesheet" type="text/css" href="mystyle.css" /></head> | Links the webpage to an external style sheet. |
background-color:yellow; | Sets the background color. |
background-image:url('paper.gif'); | Sets the background to an image. |
color: red; | Changes the text color. |
text-align:center; | Aligns the text horizontally. Values: left,right,center, and justify. |
text-decoration:underline; | Underlines text. |
text-indent:50px; | Indents text from the left. |
text-transform:uppercase; | Controls capitalization. Values:none,capitalize,uppercase, and lowercase. |
font-family:arial; | Sets the typeface for text. Typefaces with multiple words in their name should be enclosed inside quotes. Values:font name,generic name (serif,sans-serif,cursive,fantasy, and monospaced.) |
font-size:100%; | Sets the font size. Values:xx-small,x-small,small,medium,large, x-large,xx-large,smaller,larger, %. |
font-style:normal; | Sets the font style for paragraphs. Values: normal,italic, and oblique. |
a:link{color:#FF0000;} | Sets color for an unvisited link. |
a:visited{color:#FF0000;} | Sets color for a visited link. |
a:hover{color:#FF0000;} | Sets color for a mouse over link. |
a:active{color:FF0000;} | Sets color for the selected link. |
list-style-image:url('image.gif'); | Sets list item marker to an image. |
list-style-type: | Sets the item marker type. |