CSS stands for Cascading Style Sheets and is used to define styles for displaying HTML elements. CSS has different levels that build upon each other and add new features. CSS level 1 was the first official recommendation in 1996, and level 2, published in 1998, added capabilities like positioning. CSS level 3 is currently under development. CSS saves work by defining styles that can be applied across many pages through external style sheets or internal style sheets. CSS has advantages like faster page loads and easier maintenance compared to only using HTML for styling.
CSS (Cascading Style Sheets) is used to style and lay out HTML elements. CSS allows you to define styles that specify things like color, font, size, and layout of HTML elements. Styles can be applied to HTML elements using CSS selectors like id and class selectors. CSS properties specify values for attributes like color, background, text, and more. External CSS stylesheets can be linked to HTML documents to style multiple pages consistently.
CSS (Cascading Style Sheets) is used to style and lay out HTML elements. CSS allows you to define styles that specify things like color, font, size, and layout of HTML elements. Styles can be applied to HTML elements using CSS selectors like id and class selectors. CSS properties specify values for attributes like color, background, text, and more. External CSS stylesheets can be linked to HTML documents to style multiple pages consistently.
CSS (Cascading Style Sheets) is used to define styles for displaying HTML elements. CSS has different levels that add new features denoted as CSS1, CSS2, CSS3. CSS saves work by defining styles that can be applied across multiple web pages through external style sheets or internal/inline styles. CSS style rules contain selectors and declarations, with properties and values. CSS comments, id and class selectors, and multiple style sheets are also discussed in the document.
This Slide provided an introduction to CSS or Cascading Style Sheets. What is CSS? How to write styles. What are External, internal and inline CSS styles? and lot more
CSS (Cascading Style Sheets) allows separation of document content from document presentation by defining styles. CSS can be defined internally, inline, or externally in CSS files. CSS rules have selectors and declarations, where properties and values are used to style elements. Common CSS properties control color, text formatting, background images and colors. Styles can be applied to HTML elements, classes, or IDs. When multiple conflicting styles are defined, styles are cascaded according to precedence rules with inline styles having the highest priority.
This document provides an introduction to cascading style sheets (CSS) and covers several key concepts:
CSS is used to style and lay out web pages and defines how HTML elements are displayed. Styles are normally saved in external CSS files so the appearance of an entire website can be changed by editing one file. A CSS rule has a selector that specifies which element the rule applies to and declarations that define properties for that element. Comments can be added to CSS code to explain it. Different selectors like ID, class, and inline styles allow targeting specific elements. The order of style precedence determines which styles get applied when multiple styles conflict. Background properties are used to define and customize element backgrounds.
Cascading Style Sheets (CSS) allow users to control the look and feel of HTML documents in an organized and efficient manner. CSS can be used to add new styles, restyle entire websites, and reuse styles across web pages. CSS uses selectors to define which HTML elements styles will be applied to, and properties and values to determine how each element is styled. Styles can be defined internally using the <style> tag or externally in a separate .css file linked via the <link> tag. Pseudo-classes like :link, :visited, :hover allow styling of different link states.
Cascading Style Sheets (CSS) allow users to control the look and feel of HTML documents in an organized and efficient manner. CSS can be used to add new styles, restyle entire websites, and reuse styles across web pages. CSS uses selectors to define which HTML elements styles will be applied to, and properties and values to determine how each element is styled. Styles can be defined internally using the <style> tag or externally in a separate .css file linked via the <link> tag. Pseudo-classes like :link, :visited, :hover allow styling of different link states.
CSS (Cascading Style Sheets) is a stylesheet language used to describe the presentation of a document written in HTML or XML. CSS saves lots of work as formatting elements only need to be applied to one CSS file rather than individually formatting every HTML page. CSS rules consist of selectors that point to the HTML element to style paired with a declaration block containing CSS properties and values to determine how that element will look. Common CSS properties include those to control text formatting, background effects, borders, lists, links and positioning.
Cascading Style Sheets (CSS) allow users to define how HTML elements are presented on a page. CSS enables changing the appearance and layout of an entire website by editing just one CSS file. CSS uses selectors to apply styles to HTML elements via properties and values. Styles can be defined internally in HTML or externally in CSS files. CSS can control text formatting, colors, spacing, positioning and more to achieve visual consistency across web pages.
Cascading Style Sheets (CSS) allow users to define how HTML elements are presented on a page. CSS enables changing the appearance and layout of an entire website by editing just one CSS file. CSS uses selectors to apply styles to HTML elements via properties and values. Styles can be defined internally in HTML or externally in CSS files. CSS can control text formatting, colors, spacing, positioning and more to achieve visual consistency across web pages.
The document discusses different types of client-side scripts including Cascading Style Sheets (CSS), JavaScript, and Dynamic HTML (DHTML). It explains how CSS can be used to style web pages through internal, external, and inline styling. Common CSS properties for styling backgrounds, text, and other elements are also described.
CSS defines how HTML elements are styled and laid out on a page. There are three main types of CSS: inline CSS using the style attribute, internal CSS using the <style> tag, and external CSS linking to a .css file. CSS selectors like id and class allow targeting specific elements by id or class name to style them. Common CSS properties control elements' color, font, size, positioning, and other visual aspects.
The document provides information about CSS (Cascading Style Sheets) including what CSS is, how it solves problems with HTML formatting, CSS syntax, and examples of using CSS for text formatting and backgrounds. CSS allows separation of document structure (HTML) from presentation (CSS). CSS defines how elements are displayed, and styles can be applied internally, externally, or inline. CSS follows cascading rules to determine which styles take precedence.
CSS (Cascading Style Sheets) is used to style and lay out web documents. There are three levels of CSS, and CSS selectors are used to apply styles to HTML elements. Styles can be defined internally, externally, or inline. Common CSS properties include fonts, text, backgrounds, borders, positioning, and the box model which describes the layout of elements.
The document provides an introduction to Cascading Style Sheets (CSS) and explains that CSS allows styling and formatting of HTML documents through properties that control elements like color, font, size and layout. It covers the different methods of implementing CSS including internal, external and inline styles and describes various CSS properties for manipulating text styling, backgrounds, images, padding, margins and more.
Basic to Advanced CSS tags attributes and source codes.CSS and new advanced CSS3 included.Complete guide of CSS for web design perpous.
SEE MORE: https://goo.gl/DZvJcc
Cascading Style Sheets (CSS) allow control over the appearance of web pages by separating presentation from content. CSS is used to create consistent styles across multiple pages by defining styles that can be applied using classes and IDs. CSS rules define selectors and properties to style HTML elements, and separating styles from HTML structure makes pages easier to maintain and modify. Common CSS selectors include element, class, ID, and contextual selectors. Styles can be linked to HTML using inline, embedded, and external stylesheets.
The document provides an introduction to CSS (Cascading Style Sheets) and describes various CSS concepts including: internal and external style sheets, text formatting properties like color, alignment, and decoration, font properties, CSS selectors like element, class, and ID selectors, working with tables, lists, the CSS box model, and backgrounds. Key points covered include the different ways to insert CSS stylesheets, how selectors are used to target elements, and properties for formatting text, backgrounds, tables, and boxes.
Jack Lutkus is an education champion, community-minded innovator, and cultural enthusiast. A social work graduate student at Aurora University, he also holds a BA from the University of Iowa.
More Related Content
Similar to cdocumentsandsettingsstudentdesktopnewfolderhtmlcss-100220030010-phpapp01.pdf (20)
Cascading Style Sheets (CSS) allow users to control the look and feel of HTML documents in an organized and efficient manner. CSS can be used to add new styles, restyle entire websites, and reuse styles across web pages. CSS uses selectors to define which HTML elements styles will be applied to, and properties and values to determine how each element is styled. Styles can be defined internally using the <style> tag or externally in a separate .css file linked via the <link> tag. Pseudo-classes like :link, :visited, :hover allow styling of different link states.
Cascading Style Sheets (CSS) allow users to control the look and feel of HTML documents in an organized and efficient manner. CSS can be used to add new styles, restyle entire websites, and reuse styles across web pages. CSS uses selectors to define which HTML elements styles will be applied to, and properties and values to determine how each element is styled. Styles can be defined internally using the <style> tag or externally in a separate .css file linked via the <link> tag. Pseudo-classes like :link, :visited, :hover allow styling of different link states.
CSS (Cascading Style Sheets) is a stylesheet language used to describe the presentation of a document written in HTML or XML. CSS saves lots of work as formatting elements only need to be applied to one CSS file rather than individually formatting every HTML page. CSS rules consist of selectors that point to the HTML element to style paired with a declaration block containing CSS properties and values to determine how that element will look. Common CSS properties include those to control text formatting, background effects, borders, lists, links and positioning.
Cascading Style Sheets (CSS) allow users to define how HTML elements are presented on a page. CSS enables changing the appearance and layout of an entire website by editing just one CSS file. CSS uses selectors to apply styles to HTML elements via properties and values. Styles can be defined internally in HTML or externally in CSS files. CSS can control text formatting, colors, spacing, positioning and more to achieve visual consistency across web pages.
Cascading Style Sheets (CSS) allow users to define how HTML elements are presented on a page. CSS enables changing the appearance and layout of an entire website by editing just one CSS file. CSS uses selectors to apply styles to HTML elements via properties and values. Styles can be defined internally in HTML or externally in CSS files. CSS can control text formatting, colors, spacing, positioning and more to achieve visual consistency across web pages.
The document discusses different types of client-side scripts including Cascading Style Sheets (CSS), JavaScript, and Dynamic HTML (DHTML). It explains how CSS can be used to style web pages through internal, external, and inline styling. Common CSS properties for styling backgrounds, text, and other elements are also described.
CSS defines how HTML elements are styled and laid out on a page. There are three main types of CSS: inline CSS using the style attribute, internal CSS using the <style> tag, and external CSS linking to a .css file. CSS selectors like id and class allow targeting specific elements by id or class name to style them. Common CSS properties control elements' color, font, size, positioning, and other visual aspects.
The document provides information about CSS (Cascading Style Sheets) including what CSS is, how it solves problems with HTML formatting, CSS syntax, and examples of using CSS for text formatting and backgrounds. CSS allows separation of document structure (HTML) from presentation (CSS). CSS defines how elements are displayed, and styles can be applied internally, externally, or inline. CSS follows cascading rules to determine which styles take precedence.
CSS (Cascading Style Sheets) is used to style and lay out web documents. There are three levels of CSS, and CSS selectors are used to apply styles to HTML elements. Styles can be defined internally, externally, or inline. Common CSS properties include fonts, text, backgrounds, borders, positioning, and the box model which describes the layout of elements.
The document provides an introduction to Cascading Style Sheets (CSS) and explains that CSS allows styling and formatting of HTML documents through properties that control elements like color, font, size and layout. It covers the different methods of implementing CSS including internal, external and inline styles and describes various CSS properties for manipulating text styling, backgrounds, images, padding, margins and more.
Basic to Advanced CSS tags attributes and source codes.CSS and new advanced CSS3 included.Complete guide of CSS for web design perpous.
SEE MORE: https://goo.gl/DZvJcc
Cascading Style Sheets (CSS) allow control over the appearance of web pages by separating presentation from content. CSS is used to create consistent styles across multiple pages by defining styles that can be applied using classes and IDs. CSS rules define selectors and properties to style HTML elements, and separating styles from HTML structure makes pages easier to maintain and modify. Common CSS selectors include element, class, ID, and contextual selectors. Styles can be linked to HTML using inline, embedded, and external stylesheets.
The document provides an introduction to CSS (Cascading Style Sheets) and describes various CSS concepts including: internal and external style sheets, text formatting properties like color, alignment, and decoration, font properties, CSS selectors like element, class, and ID selectors, working with tables, lists, the CSS box model, and backgrounds. Key points covered include the different ways to insert CSS stylesheets, how selectors are used to target elements, and properties for formatting text, backgrounds, tables, and boxes.
Jack Lutkus is an education champion, community-minded innovator, and cultural enthusiast. A social work graduate student at Aurora University, he also holds a BA from the University of Iowa.
"Orthoptera: Grasshoppers, Crickets, and Katydids pptxArshad Shaikh
Orthoptera is an order of insects that includes grasshoppers, crickets, and katydids. Characterized by their powerful hind legs, Orthoptera are known for their impressive jumping ability. With diverse species, they inhabit various environments, playing important roles in ecosystems as herbivores and prey. Their sounds, often produced through stridulation, are distinctive features of many species.
Types of Actions in Odoo 18 - Odoo SlidesCeline George
In Odoo, actions define the system's response to user interactions, like logging in or clicking buttons. They can be stored in the database or returned as dictionaries in methods. Odoo offers various action types for different purposes.
CURRENT CASE COUNT: 880
• Texas: 729 (+5) (56% of cases are in Gaines County)
• New Mexico: 78 (+4) (83% of cases are from Lea County)
• Oklahoma: 17
• Kansas: 56 (38.89% of the cases are from Gray County)
HOSPITALIZATIONS: 103
• Texas: 94 - This accounts for 13% of all cases in the State.
• New Mexico: 7 – This accounts for 9.47% of all cases in New Mexico.
• Kansas: 2 - This accounts for 3.7% of all cases in Kansas.
DEATHS: 3
• Texas: 2 – This is 0.28% of all cases
• New Mexico: 1 – This is 1.35% of all cases
US NATIONAL CASE COUNT: 1,076 (confirmed and suspected)
INTERNATIONAL SPREAD
• Mexico: 1,753 (+198) 4 fatalities
‒ Chihuahua, Mexico: 1,657 (+167) cases, 3 fatalities, 9 hospitalizations
• Canada: 2518 (+239) (Includes Ontario’s outbreak, which began November 2024)
‒ Ontario, Canada: 1,795 (+173) 129 (+10) hospitalizations
‒ Alberta, Canada: 560 (+55)
Things to keep an eye on:
Mexico: Three children have died this month (all linked to the Chihuahua outbreak):
An 11-month-old and a 7-year-old with underlying conditions
A 1-year-old in Sonora whose family is from Chihuahua
Canada:
Ontario now reports more cases than the entire U.S.
Alberta’s case count continues to climb rapidly and is quickly closing in on 600 cases.
Emerging transmission chains in Manitoba and Saskatchewan underscore the need for vigilant monitoring of under-immunized communities and potential cross-provincial spread.
United States:
North Dakota: Grand Forks County has confirmed its first cases (2), linked to international travel. The state total is 21 since May 2 (including 4 in Cass County and 2 in Williams County), with one hospitalization reported.
OUTLOOK: With the spring–summer travel season peaking between Memorial Day and Labor Day, both domestic and international travel may fuel additional importations and spread. Although measles transmission is not strictly seasonal, crowded travel settings increase the risk for under-immunized individuals.
How to create and manage blogs in odoo 18Celine George
A blog serves as a space for sharing articles and information.
In Odoo 18, users can easily create and publish blogs through
the blog menu. This guide offers step-by-step instructions on
setting up and managing a blog on an Odoo 18 website.
ISO 27001 Lead Auditor Exam Practice Questions and Answers-.pdfinfosec train
🧠 𝐏𝐫𝐞𝐩𝐚𝐫𝐢𝐧𝐠 𝐟𝐨𝐫 𝐭𝐡𝐞 𝐈𝐒𝐎 𝟐𝟕𝟎𝟎𝟏 𝐋𝐞𝐚𝐝 𝐀𝐮𝐝𝐢𝐭𝐨𝐫 𝐄𝐱𝐚𝐦? 𝐃𝐨𝐧’𝐭 𝐉𝐮𝐬𝐭 𝐒𝐭𝐮𝐝𝐲—𝐏𝐫𝐚𝐜𝐭𝐢𝐜𝐞 𝐰𝐢𝐭𝐡 𝐏𝐮𝐫𝐩𝐨𝐬𝐞!
We’ve compiled a 𝐜𝐨𝐦𝐩𝐫𝐞𝐡𝐞𝐧𝐬𝐢𝐯𝐞 𝐰𝐡𝐢𝐭𝐞 𝐩𝐚𝐩𝐞𝐫 featuring 𝐫𝐞𝐚𝐥𝐢𝐬𝐭𝐢𝐜, 𝐬𝐜𝐞𝐧𝐚𝐫𝐢𝐨-𝐛𝐚𝐬𝐞𝐝 𝐩𝐫𝐚𝐜𝐭𝐢𝐜𝐞 𝐪𝐮𝐞𝐬𝐭𝐢𝐨𝐧𝐬 𝐚𝐧𝐝 𝐚𝐧𝐬𝐰𝐞𝐫𝐬 designed specifically for those targeting the 𝐈𝐒𝐎/𝐈𝐄𝐂 𝟐𝟕𝟎𝟎𝟏 𝐋𝐞𝐚𝐝 𝐀𝐮𝐝𝐢𝐭𝐨𝐫 𝐜𝐞𝐫𝐭𝐢𝐟𝐢𝐜𝐚𝐭𝐢𝐨𝐧.
🔍 𝐈𝐧𝐬𝐢𝐝𝐞 𝐲𝐨𝐮'𝐥𝐥 𝐟𝐢𝐧𝐝:
✅ Exam-style questions mapped to ISO 27001:2022
✅ Detailed explanations (not just the right answer—but why it’s right)
✅ Mnemonics, control references (like A.8.8, A.5.12, A.8.24), and study tips
✅ Key audit scenarios: nonconformities, SoA vs scope, AART treatment options, CIA triad, and more
𝐖𝐡𝐞𝐭𝐡𝐞𝐫 𝐲𝐨𝐮'𝐫𝐞:
🔹 Starting your ISO journey
🔹 Preparing for your Lead Auditor exam
🔹 Or mentoring others in information security audits...
This guide can seriously boost your confidence and performance.
Here is the current update:
CURRENT CASE COUNT: 897
- Texas: 742 (+14) (55% of cases are in Gaines County). Includes additional numbers from El Paso.
- New Mexico: 79 (+1) (83% of cases are from Lea County)
- Oklahoma: 17
- Kansas: 59 (+3) (38.89% of the cases are from Gray County)
HOSPITALIZATIONS: 103
- Texas: 94 – This accounts for 13% of all cases in Texas.
- New Mexico: 7 – This accounts for 9.47% of all cases in New Mexico.
- Kansas: 3 – This accounts for 5.08% of all cases in Kansas.
DEATHS: 3
- Texas: 2 – This is 0.28% of all cases in Texas.
- New Mexico: 1 – This is 1.35% of all cases in New Mexico.
US NATIONAL CASE COUNT: 1,132 (confirmed and suspected)
INTERNATIONAL SPREAD
Mexico: 1,856(+103), 4 fatalities
- Chihuahua, Mexico: 1,740 (+83) cases, 3 fatalities, 4 currently hospitalized.
Canada: 2,791 (+273)
- Ontario, Canada: 1,938 (+143) cases. 158 (+29) hospitalizations
- Alberta, Canada: 679 (+119) cases. 4 currently hospitalized
How to Use Owl Slots in Odoo 17 - Odoo SlidesCeline George
In this slide, we will explore Owl Slots, a powerful feature of the Odoo 17 web framework that allows us to create reusable and customizable user interfaces. We will learn how to define slots in parent components, use them in child components, and leverage their capabilities to build dynamic and flexible UIs.
Research Handbook On Environment And Investment Law Kate Milesmucomousamir
Research Handbook On Environment And Investment Law Kate Miles
Research Handbook On Environment And Investment Law Kate Miles
Research Handbook On Environment And Investment Law Kate Miles
Flower Identification Class-10 by Kushal Lamichhane.pdfkushallamichhame
This includes the overall cultivation practices of rose prepared by:
Kushal Lamichhane
Instructor
Shree Gandhi Adarsha Secondary School
Kageshowri Manohara-09, Kathmandu, Nepal
1. CSS(Cascading Style Sheets )
CSS stands for Cascading Style
Sheets
Styles define how to display HTML
elements
2. CSS has various levels and profiles. Each level of CSS
builds upon the last, typically adding new features and
typically denoted as CSS1, CSS2, and CSS3.
The first CSS specification to become an official W3C
Recommendation is CSS level 1, published in December
1996
CSS level 2 was developed by the W3C and published as
a Recommendation in May 1998. A superset of CSS1,
CSS2 includes a number of new capabilities like absolute,
relative, and fixed positioning of elements and z-index, the
concept of media types etc.
CSS 3
CSS level 3 is currently under development. The W3C
maintains a CSS3 progress report.
3. CSS Saves a Lot of Work!
CSS defines HOW HTML elements are to
be displayed.
Styles are normally saved in external .css
files. External style sheets enable you to
change the appearance and layout of all
the pages in a Web site, just by editing
one single file!
4. Understanding Style Rules
Understanding Style Rules
A Style Rule
Style Rule is composed of two parts: a
selector and a declaration.
TH {color: red;}.
The Selector
Selector indicates the element to which the
rule is applied.
The Declaration
Declaration determines the property values
of a selector.
Selector
Declaration
5. Understanding Style Rules
Understanding Style Rules
The Property
Property specifies a characteristic, such as
color, font-family, position, and is followed by a
colon (:).
The Value
Value expresses specification of a property,
such as red for color, arial for font family, 12 pt
for font-size, and is followed by a semicolon (;).
P {color: red;}
Property Value
6. CSS declarations always ends with a semicolon, and declaration groups are
surrounded by curly brackets:
p {color:red;text-align:center;}To make the CSS more readable, you can put one
declaration on each line, like this:
Example
p
{
color:red;
text-align:center;
}
CSS Comments
A CSS comment begins with "/*", and ends with "*/", like this:
/*This is a comment*/
p
{
text-align:center;
/*This is another comment*/
color:black;
font-family:arial;
}
7. The id and class Selectors
In addition to setting a style for a HTML element, CSS allows you to
specify your own selectors called "id" and "class".
The id Selector
The id selector is used to specify a style for a single, unique element.
The id selector uses the id attribute of the HTML element, and is defined with a
"#".
The style rule below will be applied to the element with id="para1":
Example
#para1
{
text-align:center;
color:red;
}
8. The class Selector
The class selector is used to specify a style for a group of elements. Unlike
the id selector, the class selector is most often used on several elements.
This allows you to set a particular style for any HTML elements with the
same class.
The class selector uses the HTML class attribute, and is defined with a "."
In the example below, all HTML elements with class="center" will be
center-aligned:
Example
.center
{
text-align:center;
}
In the example below, all p elements with class="center" will be center-
aligned:
Example
p.center {text-align:center;}
9. Three Ways to Insert CSS
External style sheet
Internal style sheet
Inline style
External Style Sheet
An external style sheet is ideal when the style is applied to many pages. With an external
style sheet, you can change the look of an entire Web site by changing one file. Each page
must link to the style sheet using the <link> tag. The <link> tag goes inside the head
section:
<head>
<link rel="stylesheet" type="text/css" href="mystyle.css" />
</head>
An external style sheet can be written in any text editor. The file should not contain any
html tags. Your style sheet should be saved with a .css extension. An example of a style
sheet file is shown below:
hr {color:red;}
p {margin-left:20px;}
body {background-image:url("images/back40.gif");}
10. Internal Style Sheet
An internal style sheet should be used when a single
document has a unique style.
<head>
<style type="text/css">
hr {color:red;}
p {margin-left:20px;}
body {background-image:url("images/back40.gif");}
</style>
</head>
11. Inline Styles
<p style="color:red;margin-left:20px">This is a paragraph.</p>
Multiple Style Sheets
If some properties have been set for the same selector in different style sheets, the values will
be inherited from the more specific style sheet.
For example, an external style sheet has these properties for the h3 selector:
h3
{
color:red;
text-align:left;
font-size:8pt;
}
And an internal style sheet has these properties for the h3 selector:
h3
{
text-align:right;
font-size:20pt;
}
If the page with the internal style sheet also links to the external style sheet the properties for
h3 will be:
color:red;
text-align:right;
font-size:20pt;
The color is inherited from the external style sheet and the text-alignment and the font-size is
replaced by the internal style sheet.
12. More examples
body {background-color:#b0c4de;}
h1 {background-color:#6495ed;}
p {background-color:#e0ffff;}
div {background-color:#b0c4de;}
body {background-image:url('paper.gif');}
body
{
background-image:url('gradient2.png');
background-repeat:repeat-x;
}
body
{
background-image:url('img_tree.png');
background-repeat:no-repeat;
}
14. body {color:blue;}
h1 {color:#00ff00;}
h2 {color:rgb(255,0,0);}
h1 {text-align:center;}
p.date {text-align:right;}
p.main {text-align:justify;}
A
{
text-decoration:none;
}
p.uppercase {text-transform:uppercase;}
p.lowercase {text-transform:lowercase;}
p.capitalize {text-transform:capitalize;}
p {
text-indent:50px;}
15. Font Family
The font family of a text is set with the
font-family property.
The font-family property should hold
several font names as a "fallback" system.
If the browser does not support the first
font, it tries the next font.
p{font-family:"Times New Roman", Times,
serif;}
17. Set Font Size With Em
To avoid the resizing problem with Internet Explorer,
many developers use em instead of pixels.
The em size unit is recommended by the W3C.
1em is equal to the current font size. The default text
size in browsers is 16px. So, the default size of 1em
is 16px.
The size can be calculated from pixels to em using
this formula: pixels/16=em
Example
h1 {font-size:2.5em;} /* 40px/16=2.5em */
h2 {font-size:1.875em;} /* 30px/16=1.875em */
p {font-size:0.875em;} /* 14px/16=0.875em */
18. Styling Links
Links can be style with any CSS property (e.g. color, font-family, background-color).
Special for links are that they can be styled differently depending on what state they
are in.
The four links states are:
a:link - a normal, unvisited link
a:visited - a link the user has visited
a:hover - a link when the user mouses over it
a:active - a link the moment it is clicked
Example
a:link {color:#FF0000;} /* unvisited link */
a:visited {color:#00FF00;} /* visited link */
a:hover {color:#FF00FF;} /* mouse over link */
a:active {color:#0000FF;} /* selected link */
a:link {text-decoration:none;}
a:visited {text-decoration:none;}
a:hover {text-decoration:underline;}
a:active {text-decoration:underline;}
a:link {background-color:#B2FF99;}
a:visited {background-color:#FFFF85;}
a:hover {background-color:#FF704D;}
a:active {background-color:#FF704D;}
28. <html>
<head>
<style type="text/css">
img
{
position:absolute;
left:0px;
top:0px;
z-index:-1;
}
</style>
</head>
<body>
<h1>This is a heading</h1>
<img src=“mitrc.jpg" width="100"
height="40" />
<p style=“color:red”>Because the
image has a z-index of -1, it will be
placed behind the text.</p>
</body>
</html>
This is a headin
Because the image has a z-index of -1, it will be placed
behind the text
29. Advantages of CSS
CSS saves time
When most of us first learn HTML, we get taught to set the font face, size,
colour, style etc every time it occurs on a page. This means we find
ourselves typing (or copying & pasting) the same thing over and over again.
With CSS, you only have to specify these details once for any element. CSS
will automatically apply the specified styles whenever that element occurs.
Pages load faster
Less code means faster download times.
Easy maintenance
To change the style of an element, you only have to make an edit in one
place.
Superior styles to HTML
CSS has a much wider array of attributes than HTML.
Disadvantages of CSS
Browser compatibility
Browsers have varying levels of compliance with Style Sheets. This means
that some Style Sheet features are supported and some aren't. To confuse
things more, some browser manufacturers decide to come up with their own
proprietary tags.