Write a comment in a CSS file so that it won't affect anything else in the code /* Put your comment here */ Specify a background color in CSS p { background-color:#6B0000; } Manipulate text color and styles Use a hex value: body { color:#000000; } or you can also do it like this: body { color:black; } Manipulate link colors on a page Web developers often choose different colors for links, based on how the user has interacted with that link. For instance, if the user clicks on a link, it is considered “visited” and the color changes. To do this, first choose the hex values for the colors you want to display. Next, use this code to define the color of the links, based on the user’s behavior: a:link {color:#00478F;} a:visited {color:#00B200;} a:hover {color:#7ACC52;} a:active {color:#FF66FF;}
Design a Mobile Website
View Site in Mobile | Classic
Share by: