Tuesday 1 March 2016

CSS

CSS  or CSS 3 provides basic and advanced concepts of CSS technology. Our CSS is developed for beginners and professionals. The major points of CSS are given below:
  • CSS stands for Cascading Style Sheet.
  • CSS is used to design HTML tags.
  • CSS is a widely used language on the web.
  • HTML, CSS and JavaScript are used for web designing. It helps the web designers to apply style on HTML tags.

CSS Example with CSS Editor

In this tutorial, you will get a lot of examples, you can edit and run these examples, with our online CSS editor.

  1. <!DOCTYPE>  
  2. <html>  
  3. <head>  
  4. <style>  
  5. h1{  
  6. color:white;  
  7. background-color:red;  
  8. padding:5px;  
  9. }  
  10. p{  
  11. color:blue;  
  12. }  
  13. </style>  
  14. </head>  
  15. <body>  
  16. <h1>Write Your First CSS Example</h1>  
  17. <p>This is Paragraph.</p>  
  18. </body>  
  19. </html> 

  20. What is CSS

    CSS is an acronym stands for Cascading Style Sheets. It is a style sheet language which is used to describe the look and formatting of a document written in markup language. It provides an additional feature to HTML. It is generally used with HTML to change the style of web pages and user interfaces. It can also be used with any kind of XML documents including plain XML, SVG and XUL.
    CSS is used along with HTML and JavaScript in most websites to create user interfaces for web applications and user interfaces for many mobile applications.

    What does CSS do

    • You can add new looks to your old HTML documents.
    • You can completely change the look of your website with only a few changes in CSS code.

    Why use CSS

    These are the three major benefits of CSS:

    1) Solves a big problem

    Before CSS, tags like font, color, background style, element alignments, border and size had to be repeated on every web page. This was a very long process. For example: If you are developing a large website where fonts and color information are added on every single page, it will be become a long and expensive process. CSS was created to solve this problem. It was a W3C recommendation.

    2) Saves a lot of time

    CSS style definitions are saved in external CSS files so it is possible to change the entire website by changing just one file.

    3) Provide more attributes

    CSS provides more detailed attributes than plain HTML to define the look and feel of the website.


  21. CSS Syntax

    A CSS rule set contains a selector and a declaration block.
    CSS syntax
    Selector: Selector indicates the HTML element you want to style. It could be any tag like <h1>, <title> etc.
    Declaration Block: The declaration block can contain one or more declarations separated by a semicolon. For the above example, there are two declarations:
    1. color: yellow;
    2. font-size: 11 px;
    Each declaration contains a property name and value, separated by a colon.
    Property: A Property is a type of attribute of HTML element. It could be color, border etc.
    Value: Values are assigned to CSS properties. In the above example, value "yellow" is assigned to color property.

    1. Selector{Property1: value1; Property2: value2; ..........;} 
     

No comments:

Post a Comment