HTML is quite limited when it comes to the appearance of its elements. This is not so good if you're trying to give a website a unique look and feel, or you're trying to adhere to a corporate identity.
But, never fear - CSS is here!
CSS stands for Cascading Style Sheets, and its purpose is to enable web authors/designers to apply styles across their websites. With CSS, you can specify a number of style properties for a given HTML element. Each property has a name and a value, separated by a colon (
:
). Each property declaration is separated by a semi-colon (;
).Example of Style Sheet Usage
HTML Code:<p style="color:olive;font-size:24px;">HTML Styles with CSS</p>
This results in:
HTML Styles with CSS
Embedded styles refers to declaring all styles in one place (usually the head of the document). Each element then knows to use the style that was previously declared.
External styles refers to creating a separate file that contains all style information. This file is then linked to from as many HTML pages as you like - even the whole site.
No comments:
Post a Comment