CSS-basics
CSS-basics
CSS INTRODUCTION
CSS stands for Cascading Style Sheets.
CSS is a language that describes the style of an HTML document. Means
it define styles for web pages including the design, layout and variations
in display for different devices and screen sizes.
External stylesheets are stored in CSS files.(.CSS)
CSS SYNTAX
CSS consists of a selector and a declaration block.
P { color: red; }
Selector property value
properties
EXTERNAL CSS
With an external style sheet, we can change entire look by changing just
one file.
External styles are defined within the <link>element, inside the
<head>section of an HTML page.
Eg: <head>
<link rel=” stylesheet”
Type=”text/ css”
href=”mystyle.css”>_______________CSS file
</head>
INTERNAL CSS
Internal style is defined inside the <style> element, inside the <head>section of
an HTML page.
Eg: <head>
<style>
P { background color: orange;
Color:black;
}
</style>
</head>
INLINE CSS
Inline style used to apply a unique style for a single element.
To use inline style, add the style attribute to the relevant element.
Eg: <h1 style=”color:orange; text-align:center;”>AMM</h1>