HOME C C++ PYTHON JAVA HTML CSS JAVASCRIPT BOOTSTRAP JQUERY REACT PHP SQL AJAX JSON DATA SCIENCE AI

CSS Tutorial

CSS is a style sheet or presentational language we use to style, layout and format an HTML document.

CSS describes how HTML elements should be displayed.

For example: You can use CSS to change the color, backgrounds, borders, paddings, margins, fonts, icons, position
and various other properties of HTML elements in a web document.

In this tutorial you will learn CSS from basic to advance.

Example

<html>
<head>
<style>
body {
  background-color: gray;
}

h1 {
  color: white;
  text-align: center;
}

p {
  font-family: verdana;
  font-size: 20px;
}
</style>
</head>
<body>

<h1>My First CSS Example</h1>
<p>Welcome to CSS Tutorial.</p>

</body>
</html>

         
You can click on above box to edit the code and run again.

Output

example CSS

The above example shows CSS syntax used to style the HTML elements with css characters such as body tag with a background color,
h1(heading) tag with color and center alignment, the paragraph p tag with a font and font size.

Given below is the outcome of the above example