Search This Blog

Thursday, 31 December 2009

Cascading Style Sheets for beginners

CSS or Cascading Style Sheets is a stylesheet language used to set the display of a document written in markup language. CSS used to format web pages written in HTML or XHTML format. Even so, the language can be used for all types of XML document, including SVG and XUL. CSS specifications set by the World Wide Web Consortium (W3C).

CSS is typically used by the writer and the reader to determine the web page colors, fonts, layout, and display various aspects of web documents. CSS's main function is to separate the contents of documents (written in HTML or other markup language) with the presentation of documents (written in CSS). This separation aims to improve the accessibility of content, providing more flexibility and control to display the document, and reduce complexity and repetition in structural content.






CSS enables the same page to be displayed in different ways for different presentation methods, such as through a screen, print, voice (when read by a browser-based voice or screen reader), as well as braille readers. HTML or XML page that also can be displayed together in different ways, both in terms of style or color scheme of the display using CSS.

CSS Advantages:

   
1. Update the look is more easily
   
2. Smaller bandwidth burden
   
3. Modifications easier web templates
   
4. More easily used on mobile phones
   
5. Seacrh engine friendly
   
6. If we want to change a theme of a web page, just modify the css alone.
   
7. A CSS can be used many web pages.

Lack of CSS:

   
1. Views on different browsers.
   
2. Sometimes there is also a browser that does not support CSS (older browsers).
   
3. Must know how to use it.
   
4. needed more time in the making.
   
5. Not to mention there is a bug / error in the CSS.
 

CSS can be applied in 3 ways:

   
1. Directly written to the tag head.

   
2. Using an external file. That is, any css code stored in a file with type. Css and later declared head tag in the following manner:

   
3. Applied directly to the relevant tag

In writing CSS code has its own rules. Perhaps for those of you who are still very common on CSS, this article could be used as learning material for you.

How to declaring and writing CSS

   
1. Using sign # as the prefix. Examples:

      
# my_style (
      
background-color: # 000;
      
font-color: # fff;
      
)

      
To declare, as will be labeled # then attribute that is used is id. So the example declaration is:

      
blah blah blah

      Well .. so the result will be like this:

      
bla bla bla

      
But remember, the nature of the id is unique. Hence there can be no other elements that use the same id in a CSS.

   
2. Using the dot or dot (.). as a prefix, for example:

      
. my_style (
      
background-color: red;
      
font-color: # fff;
      
)

      
To declare, for wearing the sign (.) Then the attribute is the class used. So the example declaration is

      
text

      Well .. so the result will be like this:

      
bla bla bla

      
Well .. if the nature of the id is unique, then the other hand, if the class is not unique and can be applied more than the same class 1 in a html doc.

   
3. Without wearing a # or (.) But directly applied to a html code, for example:

      
div (
      
background-color: blue;
      
)

      
Well if you use this way, then all the div tags will have the same style as CSS code.

 

View blog reactions

9 comments:

  1. mantap.. akan saya coba bro

    ReplyDelete
  2. Hi,

    My name is Neil Shaffer; I’m the Affiliates Manager at BinaryOffers.com,
    The biggest Affiliate Network for Binary Options and Forex.

    We offer the highest commissions in the financial industry, on top leading brands.
    We pay the highest CPA / CPL and Rev Share deals up to 700$ CPA
    I would like to invite you, to join our network and give you the best deals we have.
    I would love the opportunity to tell you more about our commission structure,
    and discuss how you could benefit from joining our network.
    I am available to you via email or Skype (aff.binaryoffers) for your convenience.

    Best Regards,
    Neil Shaffer

    ReplyDelete
  3. Anonymous7:19 pm

    I realize that there is not a ton of variety in this list, since Rogue
    and i - Net - Hack are essentially the same and Sorcerer #1 and #2 are more overtly the
    same. Each program will have a box with a checkmark, find the programs you'd like to uninstall and uncheck that box. The full version has no ads and offers goal alerts for the leagues and teams of your choice.

    my website :: youtube downloader online

    ReplyDelete
  4. Anonymous11:58 am

    If you are using firewall software such as Outpost Firewall
    Pro, the paid edition of Online Armor and Kaspersky
    Internet Security or PURE, you can take advantage of using
    their Blocklist feature that will block connections to known
    malicious URL and IP addresses. This means you tend to be copying it through file sharing websites like rapidshare, megaupload, hotfile,
    etcetera. This is what professionals do. While you’re
    at it, remove all or fix 404 errors. Is professional
    search engine marketing the thing that you need.
    This is the best part to ensure complete uniqueness to each of
    the websites. Pages and articles are very different, as far as Joomla is concerned.
    Relevant keywords ought to be used in the alt tags. The businesses have understood the
    need to take SEO services for attaining good search
    engine placement. Numerous SEO services over competitive price for outsourcing your
    site online, but, would it be best to hire the
    locals if the nature of your business limits to your local as well.
    So, most move slowly when deciding on who becomes the company's SEO. If your website deals with certain products or services, then conduct a proper research on these and then form your SEO content. Effective SEO techniques for Bloggers aren't any
    different. Think wine, and keep the URL intact.
    For this reason, having mentions from these sites have increasingly become a more
    valuable asset for your internet marketing.
    G) SEO basics -Image 6: Open Google. Have you been looking
    at your competitor's websites to see what kind of keywords they're
    using. Keep in mind that Google doesn’t really like page rank manipulation, even if it’s internally on your site or
    externally by backlink spamming. The internet has become an integral
    part of our lives that according to the latest statistics, almost 1 billion Americans access the
    internet. Image Optimization is also a part of SEO services in Pune.


    Feel free to visit my web page: pokeronmap.com

    ReplyDelete
  5. Anonymous3:53 pm

    ӏt is in reality a great and helpful pіece οf
    іnfo. Ι'm satisfied that you simply shared this helpful info with us. Please stay us informed like this. Thanks for sharing.

    My blog: spiele spielen

    ReplyDelete
  6. Anonymous9:14 am

    Incredible points. Outstanding arguments. Keep up the great spirit.



    Take a look at my homepage: simply click the up coming internet site

    ReplyDelete
  7. Anonymous12:16 pm

    These aгe alsο avаilаble with PТO Delay feature which
    automatіcаllу οpen tаnk internal valve for 5 seconds
    рrior to engаging PΤO allowіng pump аnd
    product lines to chаrge pгeviewing interνal valve
    slug. (Check οut the aгtіcle: Whаt's Really Out There in the Night Sky to see how some celestial objects appear at different EM frequencies. Proffering multifarious benefits to the advertisers, it is a quintessential resort for companies big or small.

    Feel free to surf to my weblog ... Read Full Report

    ReplyDelete
  8. Anonymous4:11 pm

    gratis webshop software hoe eigen webwinkel beginnen

    my weblog ... webwinkel beginnen in sieraden

    ReplyDelete
  9. Anonymous6:00 am

    The cosmetic dentistry plano advantages of better teeth aren't just cosmetic. Dr Beiting, then received these two new crowns. Then the front teeth, cosmetic dentistry plano giving them a beautiful smile. For many individuals, visiting a dentist is not available! First impressions are based mostly on the other Person appearance and are often correlated with success. Hence, you would want to find a dentist if you are able to carry out the 40 minutes treatment once daily for five days.

    Feel free to surf to my website dentists plano tx

    ReplyDelete

Write your comment here