CSS stands for Cascading Style Sheets, this is a language that defines how the HTML elements are going to be displayed. External style sheets are stored in the CSS layout and this also saves a lot work. When you start to add font colors to your layout, HTML is intended to define the content, CSS layout is the place you add all your font choices in certain sections of the layout, font colors, paddings, margins and etc.
CSS saves the web designers a lot of work, the style definitions are save in the external files, and with having that external file, and you can change the look of your site at any given time. When creating a website, you want your readers to be able to read right to left with no issues, to make it clear for the readers to follow.
When working in the CSS, the rule set consists of a declaration and selector. With the declaration block it contains one or more declarations that are separated by semicolons. Now with the selector it points to the HTML elements that you want to have in your style sheet. For example; the selector is h1 and the declaration is {color: pink; font-size: 14px;}
When creating the layout of declaration you can put each code on there own line so it’s more readable. For example;
P {
Color: pink;
Text-align: left;
}
Now, when creating a CSS layout comments are used to explain your code and it may help you when you go back to edit the source code at a later time. The browsers ignore them, so that doesn’t show up when someone looks at your site from the front end. A CSS comment starts with a forward slash /* and then ends with a */. Example of adding a comment to the code would be;
P {
Color: pink;
/* This is a single-line text comment*/
Text-align: left;
}
Comments can also go on multiple lines and it doesn’t affect your code at all. When using comments they become very helpful, when you start to have issues with adding images or a graph you can make a note and come back to it later.
Creating a CSS is really easy once you get the hang of where things go and how to place it in the style sheet. Lynda.com and W3Schools are both very great places to look up tutorials on how you can create a great CSS layout, where it’s easy to read, easy to follow and your able to make comments.
For more information about CSS layout contact Windy City Strategies!