Learn CSS Through Code Examples
- Use CSS to set the background color of different elements. Set the text color of different elements. Align the text. Decorate the text. Control the letters in a text. Indent text. Set the font, font size, and font style of the text. Add links. Add different colors to visited/unvisited links. Specify the background color for links.
- Use CSS to set an image as the background of a page. Position the background image. Repeat a background image only horizontally.
- Create transparent images using CSS. Create a transparent box with text on a background image.
- Write a CSS rule that makes all text size as 18pt and color like red, background-color blue. Give the heading style font size as 24pt, font family as sans-serif, color black, and text-align as Centre.
- Write a CSS rule for EM, H1, and P elements. Create Class attributes that apply a style class and inheritance
- Write an external linking style sheet to create a website that shows the different courses in your institute
- Write a program to show the conflicting style
- Create a site of the Solar System and insert an image of planets and position the style as absolute and give a proper margin as top, left, right and bottom
- Write a CSS rule that sets the three box dimension and aligns the text. The first box should be 20%, the second division should be 80% and the center aligns. And in the third division give a proper height and width.
This article on Learn CSS Through Code Examples provides CSS examples that help you getting familiar with CSS and adding style elements to HTML elements.