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.
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>
Inline :-
<div style=“/* styles go here
*/”>Text</div>
No comments:
Post a Comment