130 likes | 244 Views
An introduction to Cascading Style Sheets. CSS is the acronym for: 'Cascading Style Sheets'. CSS is an extension to basic HTML that allows you to style your web pages.
E N D
Introduction to Basic CSSLesson 1 Publisher : Attitude Academy
What is CSS Cascading Style Sheets (CSS) is a style sheet language used for describing the presentation of a document written in a markup language. CSS handles the look and feel part of a web page. Using CSS, you can control the color of the text, the style of fonts, the spacing between paragraphs, how columns are sized and laid out, what background images or colors are used, as well as a variety of other effects. CSS is easy to learn and understand but it provides a powerful control over the presentation of an HTML document. Most commonly, CSS is combined with the markup languages HTML
EDITOR SOFTWARE DO I NEED? A browser and a simple text editor is all you need. (Example: Adobe Dreamweaver & Notepad)
TYPE OF CSS THERE ARE THREE TYPES OF CSS INLINE CSS APPLY STYLE FOR A SINGLE ELEMENT INTERNAL CSS ADD IN HEAD OF HTML DOCUMENT EXTERNAL CSS IN A SEPARATE FILE
Inline CSS An inline style may be used to apply a unique style for a single element. To use inline styles, add the style attribute to the relevant element. The style attribute can contain any CSS property. Example Here: <h1 style="color : yellow; font-size:18px; font-weight : bold;"> Property show on browser</h1> PROPERTY SHOW ON BROWSER
Internal CSS This way you are simply placing the CSS code within the <head> </head> tags of each HTML file you want to style with the CSS. The format for this is shown in the example below. Example Here: <head> <style type=”text/css”> CSS Property write there </style> </head>
External CSS An external CSS file can be created with any text or HTML editor such as “Notepad” or “Dreamweaver”. An external style sheet is a separate text file with .CSS extension. You define all the Style rules within this text file and then you can include this file in any HTML document on <head> Section using <link> element. Example Here: <head> <link href=“Path To stylesheet.css” type=”text/css” rel=”stylesheet”/> </head>
By using an external style sheet, your entire HTML files link to one CSS files in order to style the pages. This means, that if you need to alter the design of all your pages, you only need to edit one .css file to make global changes to your entire website. • Here are a few reasons this is better. • (1) Easier Maintenance (2) Reduced File Size • (3) Reduced Bandwidth (4) Improved Flexibility
Click CSS Name You will show page like this
External CSS file save name by style.css. Style is universal name of css Saving file
Add External file on Your Html document (Note: Path Should be Right) Type=“text/css” = Show your written text in css Rel=“stylesheet” = Show your include file relation with stylesheet