go to  ForumEasy.com   
CSS + jQuery
Home » Archive » Message


[Email To Friend][View in Live Context][prev topic « prev post | next post » next topic]
  CSS Syntax
 
Subject: CSS Syntax
Author: CyberSpider
Posted on: 04/10/2016 09:19:00 PM

  <selector>, ... , <selector> {
      /* comment goes here */
      <property>: <value>;
      ...
      <property>: <value>;
  }


Note:
  • Selector section can be just one, or multiple selectors separated by comma (,)
  • Declaration section can be just one, or multiple declarations separated by semi-colon (;)
  • The last semi-colon is not necessary, but for better practice
  • Comments can be put inside '/*' and '*/'

    A example is:
    h2, p {
       text-align: center;
       color: green;
    } 
    

    or
    h2, p {
       text-align: center;
       color: green
    } 
    


    Try it yourself in sandbox »



    References:

  •  


     
    Powered by ForumEasy © 2002-2022, All Rights Reserved. | Privacy Policy | Terms of Use
     
    Get your own forum today. It's easy and free.