CSS Tutorial
CSS Properties

CSS Tutorial

The CSS 3 tutorial provides both basic and advanced concepts of CSS technology. Our CSS tutorial is designed for both beginners and professionals. The key points of CSS are outlined below:

CSS, which stands for Cascading Style Sheets, is all about adding style and layout to webpages built with HTML.  Think of HTML as the structure or skeleton of a web page, and CSS as the muscles, skin, and clothing that make it look good.

what CSS does:

  • Style Control: CSS lets you define things like font size, color, background images, spacing, and more. You can use it to create a consistent look across your entire website.
  • Layout Magic: CSS helps you arrange elements on the page, control how wide things are, and create columns.
  • Responsive Design: With CSS, you can make your webpages adapt to different screen sizes, which is essential these days with everyone using phones, tablets, and desktops. 

Basic Example of CSS

Here’s an example of CSS

				
					<!DOCTYPE>
<html>
<head>
<style>
body {
  background-color: lightblue;
}
h1 {
  color: white;
  text-align: center;
}
</style>
</head>
<body>
<h1>My Styled Heading</h1>
<p>This is a paragraph with the default styling.</p>
</body>
</html>
				
			

Output:

Explanation:

  • The body selector targets the entire body of the HTML document.
  • We set the background-color property to “lightblue” to change the background color of the page.
  • The h1 selector targets all <h1> elements (headings) on the page.
  • We set the color property to “white” to change the text color of headings.
  • The text-align property is set to “center” to center the text of the headings.
Scroll to Top