Syntax of CSS:

CSS have a basic syntax and that is as follows:

selector { property : value }

You can see there are three style rules which create the syntax complete.

  • selector: A selector is a HTML element on which you can apply styles
  • property: A property means the type of attribute of HTML tag.
  • value: A value is assign to the property.


       p {align : right}

In above example we are applying the right alignment to the paragraph.

Comments in CSS:

You can also comment text in CSS. Comments are the text which will display in coding but not executed and will not display on browser.

In CSS you have to use “/*” to start a comment and “*/” to end a comment. You can comment multiple lies also using these symbols.


Single Line Comment

/* This is a Comment */


Multi Line Comment

/* This is a


For multiline


2 responses to “Syntax of CSS & Comments”

  1. Lindra says:

    It is in point of fact a great and useful piece of info. I am happy that you simply shared this helpful tidbit with us. Please stay us informed like this. Thank you for sharing.

  2. Emory Broadbent says:

    I enjoy you because of your entire effort on this web page. My mom takes pleasure in managing investigations and it’s easy to understand why. We know all relating to the powerful form you offer practical techniques by means of your blog and therefore improve contribution from website visitors on this matter then our favorite child is undoubtedly studying a great deal. Take pleasure in the remaining portion of the year. You are doing a fantastic job.

Leave a Reply

Your email address will not be published. Required fields are marked *