In this CSS section, we will learn the syntax of CSS

CSS syntax or rule-set is consists of a selector and declaration block.

Let's see one by one: 


Indicates the element you want to add style

Declaration Block:

It contains one property and one value


Property is an attribute, it could be color, border etc.


Values are assigned to CSS properties. 

CSS comments:

CSS comments are used to specify what’s the code all about and for future understanding.

CSS supports both single-line comments and multiple line comments. A CSS comment starts with /* and ends with */. Comments can also span multiple lines:


<!DOCTYPE html>
p {
  color: red;/* Define color red for all <p> tag */
  text-align: center;

h1 {
  text-align: center;
/* color: red;
  font-wight: 500;*/


<h1>Hello World!</h1>
<p>This paragraph is styled with CSS.</p>
<p>CSS comments are not shown in the output.</p>


May this example help you