My Famous Website outlines the best internet marketing tools & online business opportunities with first person reviews and tutorials. We show you all of the internet business tools, products & services that make us more money, more efficient & more productive. We are constantly testing new ways to make more money online and we share both our successes and failures. If you want to learn how to make a website and how to make money online then welcome to my famous website.

CSS Code Tutorial

CSS Code TutorialThis CSS code tutorial provides a basic overview of CSS codes, and how they can be used to change the appearance of a web page. When design attributes were added to markup language (HTML, XHTML, etc) specifications, it became a long and expensive nightmare for web developers. To solve this issue, all formatting options were removed and CSS was created.

Although CSS codes may seem overwhelming at first, believe us, it's not as complicated as it looks!

What Are CSS Codes?

Cascading Style Sheets, or CSS codes,  allow you to further change the appearance of a web page's colors, fonts, and layout. Just as Microsoft Word lets you change the appearance of a document, the visual appeal of a raw HTML (or other markup language) document can also be altered.

CSS Code Attributes

  • In order to be readable and writable by humans, CSS language uses basic desktop publishing terminology - such as that of HTML coding language.
  • CSS codes contain rules - with each rule (or rule-set) consisting of three parts: - a selector, a property and a value:
  1. Selector - the link between the HTML document and the style sheet
  2. Property - the attribute you want to change
  3. Value - the change of style that you want to make
  • As a whole, a CSS code looks like this: selector {property:value}. Note that the "property" and "value" are separated by a colon and surrounded by curly braces.

CSS Code Design Tips

  • CSS codes can either be attached as a separate document, or embedded in the HTML document. Either way, it is a smart choice to save your CSS codes in another location other than your web page.
  • To make CSS codes more readable, you can describe one property per line, like this:
    p
    {
    text-align:right;
    color:green;
    font-family:arial
    }
  • You can save time by grouping "selectors" with commas. For example, you can group all header elements to be displayed in the same color:
    h1,h2,h3,h4,h5,h6
    {
    color:red
    }
  • When more than one "property" needs to be specified, each property should be separated with a semicolon: p {text-align:center;color:green}
  • If the "value" contains more than one word, then quotes should be put around it: p {font-family:"times new roman"}

CSS has different levels and variations - with new features being added and higher levels being reached every year. Even though this post reviews only the basic elements of CSS codes, it's important to keep in mind that more advanced CSS codes are also possible. Check out this advanced Cascading Style Sheets (CSS) Tutorial to learn even more about CSS codes!

No related posts.

Related posts brought to you by Yet Another Related Posts Plugin.

Comments

Got something to say?

You must be logged in to post a comment.