CSS stands for Cascading Style Sheets. Styles define how to display HTML elements. Styles
were added to HTML 4.0 to solve a problem. External Style Sheets can save a lot of work.
External Style Sheets are stored in CSS files. CSS defines HOW HTML elements are to be
displayed.
Syntax
A CSS rule has two main parts: a selector, and one or more declarations:
The selector is normally the HTML element you want to style.
Each declaration consists of a property and a value.
The property is the style attribute you want to change. Each property has a value
DiaLIndia
Types of Style Sheets
A style sheet is a set of stylistic CSS rules that tell a browser how the different parts of a
XHTML document are presented. A style sheet is simply a text file with the file name
extension css.
1. Linked / External
2. Embedded / Internal
3. Inline
Linked / External
Once your <div> tags are in place, add either a class or ID for styling each <div>separately. For
parts of the page that appear only once and form the basic building blocks of the page, web
designers usually use an ID.ID selectors are identified using a hash character (#); class selectors
are identified with a period(.).
<link href=“styles.css" rel="stylesheet" type="text/css" />
Embedded / Internal
<head>
<style type=“text/css”></style>
/* styles go here */
</head>
were added to HTML 4.0 to solve a problem. External Style Sheets can save a lot of work.
External Style Sheets are stored in CSS files. CSS defines HOW HTML elements are to be
displayed.
Syntax
A CSS rule has two main parts: a selector, and one or more declarations:
The selector is normally the HTML element you want to style.
Each declaration consists of a property and a value.
The property is the style attribute you want to change. Each property has a value
DiaLIndia
Types of Style Sheets
A style sheet is a set of stylistic CSS rules that tell a browser how the different parts of a
XHTML document are presented. A style sheet is simply a text file with the file name
extension css.
1. Linked / External
2. Embedded / Internal
3. Inline
Linked / External
Once your <div> tags are in place, add either a class or ID for styling each <div>separately. For
parts of the page that appear only once and form the basic building blocks of the page, web
designers usually use an ID.ID selectors are identified using a hash character (#); class selectors
are identified with a period(.).
<link href=“styles.css" rel="stylesheet" type="text/css" />
Embedded / Internal
<head>
<style type=“text/css”></style>
/* styles go here */
</head>
No comments:
Post a Comment