CSS is a style sheet language used to describe the presentation of HTML and XML documents, including how elements are displayed on screen, paper, or in other media. It allows control over color, font, size, spacing, and other properties that determine the appearance of elements. There are three main ways to apply CSS styles: internal style sheets, external style sheets, and inline styles. CSS rules consist of selectors that point to elements and declaration blocks that contain property-value pairs that describe the presentation of those elements. Comments can be added to CSS to explain code.
this presentation covers the following topics which are as follows
1. Introduction of css
2. History of css
3. Types of css styling
4. Css syntax
5. Css Selector
6. Css Variations Or Css Versions
Cascading Style Sheets (CSS) allow separation of document content from document presentation, including elements like fonts, colors, and layout. CSS rules include selectors that point to specific HTML elements and declarations that define properties like color and font for those elements. Common CSS properties include font properties, color properties, box properties like width, padding, and margin, and background properties. CSS provides benefits like easier maintenance of web page styling across multiple pages.
CSS is used to style and lay out web pages. There are three types of CSS: external, internal, and inline stylesheets. External stylesheets define styles in CSS files and can be used across many web pages, internal stylesheets are defined within the <style> tags in an HTML page, and inline styles are defined within HTML elements using the style attribute. CSS selectors allow targeting specific elements using IDs, classes, types, and other attributes to style them. Common CSS properties include colors, backgrounds, borders, padding, margins, and styling of links and lists.
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) 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.
The document provides information on basic HTML elements and tags. It defines common tags like <html>, <head>, <title>, <body>, and <header>. It also describes tags for text formatting (<b>, <i>, <u>), links (<a>), images (<img>), lists (<ul>, <ol>, <li>), tables (<table>, <tr>, <td>, <th>), and forms (<form>, <input>). The document also lists HTML attributes and provides examples of using tags for layout with <div> and applying stylesheets. In under 3 sentences, the document covers fundamental HTML tags and their uses for text, links, images, lists, tables, and forms.
The document discusses Cascading Style Sheets (CSS) and how to style HTML elements using CSS. It covers CSS selectors like tags, IDs, and classes. It also describes the different ways to apply CSS like internal, external, and inline stylesheets and how CSS rules cascade. The document provides examples of CSS rules for backgrounds, text, fonts, and links.
HTML (Hyper Text Markup Language) by MukeshMukesh Kumar
This document provides an overview of HTML by defining what HTML is, describing common HTML elements like headings, paragraphs, links and images, and explaining how to add styling, formatting, tables, lists, forms and frames to HTML pages. It defines HTML as a markup language used to describe web documents and provides sample code to illustrate key HTML tags and concepts.
This document provides an 18 chapter tutorial on CSS (Cascading Style Sheets). It begins with introductory chapters on CSS syntax, classes, IDs, divisions, spans, margins, padding, and text properties. Later chapters cover font properties, anchors, links, backgrounds, borders, lists, positioning, and pseudo elements. Each chapter provides examples and explanations of the CSS concepts and properties covered. The document was created by Vijay Kumar Sharma and includes their contact information. It serves as a comprehensive guide to learning the fundamentals of CSS.
This document provides an overview of HTML (Hypertext Markup Language) by defining what HTML is, describing its basic structure and tags, and providing examples of common HTML elements like headings, paragraphs, lists, tables, forms, and images. Key points covered include that HTML is the language used to describe web pages, it uses tags enclosed in angle brackets to mark elements in a document, and pages have a basic structure with a head and body section.
- CSS (Cascading Style Sheets) is a style sheet language used to describe the presentation of HTML documents, including how elements should be rendered on screen, paper, or in other media.
- CSS allows separation of document content from document presentation, including elements sizing, color, font, layout, etc.
- There are three main ways to insert CSS - internal style sheets within <style> tags, external style sheets linked via <link> tags, and inline styles within HTML elements. CSS rules contain selectors that point to elements to style and declarations to set property values.
This document provides an overview of HTML and CSS for website development. It discusses how websites use HTML for content, CSS for presentation, and JavaScript for behavior. It then covers basic HTML tags and structure, as well as CSS selectors, the box model, positioning, and floats. The goal is to teach the essentials of using HTML to structure content and CSS to style and position that content for websites.
The document explains what CSS is and provides basic syntax and examples of how to use CSS to style HTML elements. CSS stands for Cascading Style Sheets and is used to define styles like fonts, colors, spacing and layout. There are three main ways to insert CSS - external style sheets, internal style sheets and multiple style sheets. The document then gives examples of CSS properties for text formatting, backgrounds, borders, margins, padding and lists.
The document provides an introduction to CSS (Cascading Style Sheets), explaining what CSS is, how it works, and some basic syntax and concepts. CSS allows separation of document content from document presentation by defining styles that are applied to HTML elements. Styles can be defined internally, in an external CSS file, or inline. The CSS box model is also explained, with the content, padding, border, and margin areas of elements illustrated. Common CSS properties for text formatting are also listed.
This document provides an introduction to CSS (Cascading Style Sheets) including:
- CSS allows separation of document content from design and formatting through stylesheets.
- Stylesheets define how HTML elements are displayed and can be internal, external, or inline.
- Multiple stylesheets and style definitions will cascade together based on specificity.
- The CSS syntax uses selectors to target elements and properties to define styles like colors, fonts, spacing.
- Comments, classes, IDs, and other selectors provide control over styling different elements.
This document discusses Cascading Style Sheets (CSS) and how they can be used to control the style and layout of web documents. CSS allows for a consistent look across multiple platforms, division of labor between design and coding teams, and user control over formatting. CSS rules use selectors to target specific elements and properties to set styles like colors, fonts, sizes, and positioning. CSS handles inheritance of styles and prioritizes rules based on specificity. Styles can position elements outside of normal flow using relative, float, and absolute positioning.
This document provides an overview of HTML and covers topics such as basic HTML structure and tags, formatting text, adding links, creating lists and tables, inserting images, and using form elements. The document includes examples to demonstrate each HTML feature discussed.
visit : www.dmdiploma.com
HTML is the standard markup language for creating Web pages.
HTML stands for Hyper Text Markup Language
HTML describes the structure of a Web page
HTML consists of a series of elements
HTML elements tell the browser how to display the content
HTML elements are represented by tags
HTML tags label pieces of content such as "heading", "paragraph", "table", and so on
Browsers do not display the HTML tags, but use them to render the content of the page
CSS (Cascading Style Sheets) is a style sheet language used to describe the presentation of HTML documents, including how elements should be rendered on screen, paper, or in other media. CSS saves time and improves accessibility by allowing separation of document content from document presentation including the definition of styles, fonts, colors, and placement of elements. CSS rules consist of selectors and declarations blocks and there are three main ways to insert CSS into HTML - internal style sheets, external style sheets, and inline styles.
Cascading Style Sheets (CSS) allow developers and users more control over how web pages are displayed. CSS style sheets define the appearance of different HTML elements like headers and links. Multiple style sheets can be applied to a web page. CSS provides benefits like consistent appearance across pages, easier maintenance, and increased accessibility.
The document discusses various CSS properties for styling fonts, text, links, borders, and outlines. It defines properties like font-family, font-size, text-align, border-style, and outline-width. Examples are provided to demonstrate how each property can be used to style text and elements on a webpage. Key CSS properties and their possible values are summarized in tables for easy reference. Code snippets and HTML examples further illustrate the use of these properties in practice.
The document discusses Cascading Style Sheets (CSS) and provides examples of common CSS properties and selectors. It covers topics such as CSS syntax, the different types of CSS stylesheets (internal, external, inline), common selectors like element, id, class selectors, and properties for fonts, text, colors, backgrounds, borders, margins and more. Examples are provided throughout to demonstrate how to apply various CSS rules and properties.
CSS (Cascading Style Sheets) is used to style and lay out HTML elements. CSS can be added to HTML elements in three ways: inline, internally, or externally via a separate CSS file. A CSS rule consists of a selector that points to the HTML element to style and a declaration block containing CSS properties and values to apply styles like color, font, size, and layout. Common CSS selectors target elements by ID, class, element type, or other attributes. CSS can control text, font, color, size, spacing, borders, and layout of HTML elements and entire web pages.
CSS (Cascading Style Sheets) allows styling and formatting of HTML documents. CSS separates formatting from HTML content to make web pages more modular and customizable. There are three ways to apply CSS - internal style sheets within HTML <style> tags, inline styles within HTML elements, and external style sheets in separate .css files. CSS rules define selectors, properties, and values to style HTML elements.
CSS allows separation of document structure (HTML) from presentation (styles). It provides precise control over elements' appearance. CSS rules have selectors that specify elements to style and declarations that define properties (e.g., color) and values (e.g., blue). Multiple style sheets can affect elements through cascading rules, with inline styles having highest priority. DHTML refers to combining HTML, CSS, and scripts to create dynamic and animated web pages.
HTML is the standard markup language used to create web pages. It uses tags like <h1> for headings and <p> for paragraphs to structure content and define semantics. Common HTML elements were described like headings, paragraphs, links, images, and line breaks. The document also covered HTML attributes which provide additional information about elements through name/value pairs, and editors that can be used to write HTML code.
CSS handles the visual presentation of web pages. There are three ways to add CSS: inline, internally via the <style> tag, and externally via a <link> tag. CSS rules contain selectors that specify elements to style and declarations that define properties like color, font, padding, borders, and margin. CSS allows global styling changes and optimized formatting for different devices. It improves page load times and makes websites easier to maintain compared to only using HTML.
CSS is a style sheet language used to describe the presentation of web pages including colors, fonts, layout, etc. It allows separation of document content from document presentation for better content organization and maintenance. CSS rules are made up of selectors, properties, and values and can be defined within HTML, externally, or via internal stylesheets. Common CSS properties include font, color, background, text, box model, list, table, and positioning. CSS specifications are developed and maintained by the W3C to standardize web development.
This document provides an 18 chapter tutorial on CSS (Cascading Style Sheets). It begins with introductory chapters on CSS syntax, classes, IDs, divisions, spans, margins, padding, and text properties. Later chapters cover font properties, anchors, links, backgrounds, borders, lists, positioning, and pseudo elements. Each chapter provides examples and explanations of the CSS concepts and properties covered. The document was created by Vijay Kumar Sharma and includes their contact information. It serves as a comprehensive guide to learning the fundamentals of CSS.
This document provides an overview of HTML (Hypertext Markup Language) by defining what HTML is, describing its basic structure and tags, and providing examples of common HTML elements like headings, paragraphs, lists, tables, forms, and images. Key points covered include that HTML is the language used to describe web pages, it uses tags enclosed in angle brackets to mark elements in a document, and pages have a basic structure with a head and body section.
- CSS (Cascading Style Sheets) is a style sheet language used to describe the presentation of HTML documents, including how elements should be rendered on screen, paper, or in other media.
- CSS allows separation of document content from document presentation, including elements sizing, color, font, layout, etc.
- There are three main ways to insert CSS - internal style sheets within <style> tags, external style sheets linked via <link> tags, and inline styles within HTML elements. CSS rules contain selectors that point to elements to style and declarations to set property values.
This document provides an overview of HTML and CSS for website development. It discusses how websites use HTML for content, CSS for presentation, and JavaScript for behavior. It then covers basic HTML tags and structure, as well as CSS selectors, the box model, positioning, and floats. The goal is to teach the essentials of using HTML to structure content and CSS to style and position that content for websites.
The document explains what CSS is and provides basic syntax and examples of how to use CSS to style HTML elements. CSS stands for Cascading Style Sheets and is used to define styles like fonts, colors, spacing and layout. There are three main ways to insert CSS - external style sheets, internal style sheets and multiple style sheets. The document then gives examples of CSS properties for text formatting, backgrounds, borders, margins, padding and lists.
The document provides an introduction to CSS (Cascading Style Sheets), explaining what CSS is, how it works, and some basic syntax and concepts. CSS allows separation of document content from document presentation by defining styles that are applied to HTML elements. Styles can be defined internally, in an external CSS file, or inline. The CSS box model is also explained, with the content, padding, border, and margin areas of elements illustrated. Common CSS properties for text formatting are also listed.
This document provides an introduction to CSS (Cascading Style Sheets) including:
- CSS allows separation of document content from design and formatting through stylesheets.
- Stylesheets define how HTML elements are displayed and can be internal, external, or inline.
- Multiple stylesheets and style definitions will cascade together based on specificity.
- The CSS syntax uses selectors to target elements and properties to define styles like colors, fonts, spacing.
- Comments, classes, IDs, and other selectors provide control over styling different elements.
This document discusses Cascading Style Sheets (CSS) and how they can be used to control the style and layout of web documents. CSS allows for a consistent look across multiple platforms, division of labor between design and coding teams, and user control over formatting. CSS rules use selectors to target specific elements and properties to set styles like colors, fonts, sizes, and positioning. CSS handles inheritance of styles and prioritizes rules based on specificity. Styles can position elements outside of normal flow using relative, float, and absolute positioning.
This document provides an overview of HTML and covers topics such as basic HTML structure and tags, formatting text, adding links, creating lists and tables, inserting images, and using form elements. The document includes examples to demonstrate each HTML feature discussed.
visit : www.dmdiploma.com
HTML is the standard markup language for creating Web pages.
HTML stands for Hyper Text Markup Language
HTML describes the structure of a Web page
HTML consists of a series of elements
HTML elements tell the browser how to display the content
HTML elements are represented by tags
HTML tags label pieces of content such as "heading", "paragraph", "table", and so on
Browsers do not display the HTML tags, but use them to render the content of the page
CSS (Cascading Style Sheets) is a style sheet language used to describe the presentation of HTML documents, including how elements should be rendered on screen, paper, or in other media. CSS saves time and improves accessibility by allowing separation of document content from document presentation including the definition of styles, fonts, colors, and placement of elements. CSS rules consist of selectors and declarations blocks and there are three main ways to insert CSS into HTML - internal style sheets, external style sheets, and inline styles.
Cascading Style Sheets (CSS) allow developers and users more control over how web pages are displayed. CSS style sheets define the appearance of different HTML elements like headers and links. Multiple style sheets can be applied to a web page. CSS provides benefits like consistent appearance across pages, easier maintenance, and increased accessibility.
The document discusses various CSS properties for styling fonts, text, links, borders, and outlines. It defines properties like font-family, font-size, text-align, border-style, and outline-width. Examples are provided to demonstrate how each property can be used to style text and elements on a webpage. Key CSS properties and their possible values are summarized in tables for easy reference. Code snippets and HTML examples further illustrate the use of these properties in practice.
The document discusses Cascading Style Sheets (CSS) and provides examples of common CSS properties and selectors. It covers topics such as CSS syntax, the different types of CSS stylesheets (internal, external, inline), common selectors like element, id, class selectors, and properties for fonts, text, colors, backgrounds, borders, margins and more. Examples are provided throughout to demonstrate how to apply various CSS rules and properties.
CSS (Cascading Style Sheets) is used to style and lay out HTML elements. CSS can be added to HTML elements in three ways: inline, internally, or externally via a separate CSS file. A CSS rule consists of a selector that points to the HTML element to style and a declaration block containing CSS properties and values to apply styles like color, font, size, and layout. Common CSS selectors target elements by ID, class, element type, or other attributes. CSS can control text, font, color, size, spacing, borders, and layout of HTML elements and entire web pages.
CSS (Cascading Style Sheets) allows styling and formatting of HTML documents. CSS separates formatting from HTML content to make web pages more modular and customizable. There are three ways to apply CSS - internal style sheets within HTML <style> tags, inline styles within HTML elements, and external style sheets in separate .css files. CSS rules define selectors, properties, and values to style HTML elements.
CSS allows separation of document structure (HTML) from presentation (styles). It provides precise control over elements' appearance. CSS rules have selectors that specify elements to style and declarations that define properties (e.g., color) and values (e.g., blue). Multiple style sheets can affect elements through cascading rules, with inline styles having highest priority. DHTML refers to combining HTML, CSS, and scripts to create dynamic and animated web pages.
HTML is the standard markup language used to create web pages. It uses tags like <h1> for headings and <p> for paragraphs to structure content and define semantics. Common HTML elements were described like headings, paragraphs, links, images, and line breaks. The document also covered HTML attributes which provide additional information about elements through name/value pairs, and editors that can be used to write HTML code.
CSS handles the visual presentation of web pages. There are three ways to add CSS: inline, internally via the <style> tag, and externally via a <link> tag. CSS rules contain selectors that specify elements to style and declarations that define properties like color, font, padding, borders, and margin. CSS allows global styling changes and optimized formatting for different devices. It improves page load times and makes websites easier to maintain compared to only using HTML.
CSS is a style sheet language used to describe the presentation of web pages including colors, fonts, layout, etc. It allows separation of document content from document presentation for better content organization and maintenance. CSS rules are made up of selectors, properties, and values and can be defined within HTML, externally, or via internal stylesheets. Common CSS properties include font, color, background, text, box model, list, table, and positioning. CSS specifications are developed and maintained by the W3C to standardize web development.
CSS (Cascading Style Sheets) is a style sheet language that allows control over the look and formatting of a document written in a markup language like HTML. CSS handles the styling and layout of web pages and allows separation of content from design. Key points covered in the document include that CSS can control colors, fonts, layout, backgrounds and other styling aspects. It provides advantages like time savings, easier maintenance, faster page loads and global standards compliance. CSS rules are created and maintained by the W3C and different versions have been released over time. CSS syntax involves selectors, properties and values to target elements and apply styles. Styles can be defined inline, internally, or via external stylesheets.
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 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.
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.
CSS (Cascading Style Sheets) is a style sheet language used to describe the presentation of HTML documents, including how elements should be rendered on screen, paper, or in other media. CSS saves a lot of work by enabling web developers to change the appearance and layout of multiple pages at once by editing just one CSS file. CSS solves the problem of formatting documents that originally arose with HTML by separating document content from document presentation.
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.
The document provides information on CSS (Cascading Style Sheets). It discusses the different types of style sheets including inline, internal/embedded, and external stylesheets. It also covers various CSS properties such as text formatting, borders, margins, positioning elements with classes, and color properties. CSS is used to define styles and layouts for HTML documents and makes web pages more presentable.
The document discusses Cascading Style Sheets (CSS) and how they are used to control the layout and formatting of web pages. It covers the basic syntax of CSS code and the three main ways to apply stylesheets: internally, inline, and externally. Key points include that CSS separates structure and presentation, stylesheets allow consistent styling across pages, and the <link> tag is used to connect external CSS files to HTML documents.
The document provides information about CSS (Cascading Style Sheets), including what CSS is, why it's used, how it solved problems with HTML, and some key CSS concepts. CSS is used to define styles and layout for web pages. It allows separation of document content from document presentation and saves work by controlling multiple page styles in one file. CSS removes formatting tags from HTML and solves issues that arose when tags like <font> were added to HTML for formatting.
The Cascading Style Sheets Specification ( CSS ) is a computer language that is used to write formatting instructions ( rules ). These rules tell a web browser how webpage content should 'look'— in terms of: layout. position, alignment, width, height, etc.
basic programming language AND HTML CSS JAVApdfelayelily
The document provides information about cascading style sheets (CSS). It begins with an introduction to CSS and how it can be used to control formatting and positioning of elements without using HTML tags. It then discusses the different CSS syntax rules including selectors, declarations, and properties. It provides examples of how to specify styles for different HTML elements as well as how CSS handles multiple style rules. The document also covers various CSS properties for formatting text, backgrounds, fonts and more. It aims to explain the basics of how CSS works and can be used to control styling and layout of HTML documents.
The document provides an overview of CSS (Cascading Style Sheets) including its basic syntax and the three main methods for applying stylesheets: inline, internal, and external. It explains that CSS is used to control the layout and formatting of HTML elements and allows for consistent styling across multiple web pages. The key points covered are:
- CSS syntax uses selectors, properties, and values to style HTML elements
- Stylesheets can be defined internally within HTML, inline within elements, or externally in separate files
- External stylesheets are considered the best practice and allow linking CSS to HTML documents
This is the CSS Tutorial for Beginners that teach the basics of CSS. This tutorial will show the basic structure of a CSS style and will show 3 different methods to apply styles.
This document provides an introduction to CSS (Cascading Style Sheets), including what CSS is, why it is used, its history and syntax. It describes CSS selectors, properties, and different methods of attaching style definitions. It also covers the CSS box model and properties for styling text, links, lists, backgrounds, borders, margins and paddings.
CSS (Cascading Style Sheets) allows separation of document content from document presentation, including elements like fonts, colors, and layout. CSS saves work by defining styles that can be applied to multiple pages from a single .css file. CSS rules contain selectors that specify elements to style and declarations that define element properties like color, font, size and more. Common CSS selectors include element, class, and ID selectors. The CSS box model, background properties, borders, text properties and grouping/nesting allow precise control of appearance.
CSS (Cascading Style Sheets) is a language used to style and lay out web pages. CSS allows you to control the color, font, size, spacing, and layout of text, images, and other HTML elements. There are three main ways to insert CSS: external style sheets, internal style sheets, and inline styles. CSS rules are made up of selectors that point to HTML elements along with declaration blocks that contain properties and values that define the element's style.
2. What is CSS?
A style sheet language used for describing the look
and formatting of a document written in a markup
language. While most often used to change the
style of web pages and user interfaces written in
HTML and XHTML, the language can be applied to
any kind of XML document. CSS is a cornerstone
technology used by most websites to create visually
engaging webpages, user interfaces for web
applications, and user interfaces for many mobile
applications.
CSS stands for Cascading Style Sheets.
3. CSS Syntax
A CSS rule set consists of a selector and a declaration block:
The selector points to the HTML element you want to style. CSS selectors are used to
"find" (or select) HTML elements based on their id, class, type, attribute, and more.
The declaration block contains one or more declarations separated by semicolons.
Each declaration includes a property name and a value, separated by a colon.
4. Comments in CSS
Comments are used to explain your code,
and may help you when you edit the
source code at a later date. Comments
are ignored by browsers.
A CSS comment starts with /* and ends
with */. Comments can also span
multiple lines:
<style>
p {
color: red;
/* This is a single-line comment */
text-align: center;
}
/* This is
a multi-line
comment */
</style>
5. How to implement CSS
in your webpage?
When a browser reads a style sheet, it will format the
document according to the information in the style
sheet. There are 3 ways to insert CSS.
• External style sheet
• Internal style sheet
• Inline style
6. <head>
<link rel="stylesheet" type="text/css" href="mystyle.css">
</head>
External Style Sheet
With an external style sheet, you can change the look of an entire website by changing
just one file!
Each page must include a reference to the external style sheet file inside the <link>
element. The <link> element goes inside the head section:
An external style sheet can be written in any text editor. The file should not contain
any html tags. The style sheet file must be saved with a .css extension. An example of
a style sheet file called "myStyle.css"
<style>
body {
background-color: linen;
}
h1 {
color: maroon;
margin-left: 40px;
}
</style>
7. Internal Style Sheet
An internal style sheet may be used if
one single page has a unique style.
Internal styles are defined within the
<style> element, inside the head section
of an HTML page:
<!DOCTYPE html>
<html>
<head>
<style>
body {
background-color: linen;
}
h1 {
color: maroon;
margin-left: 40px;
}
</style>
</head>
<body>
<h1>This is a heading</h1>
<p>This is a paragraph.</p>
</body>
</html>
8. Inline Styles
An inline style may be used to apply a
unique style for a single element.
An inline style loses many of the
advantages of a style sheet (by mixing
content with presentation). Use this
method sparingly!
To use inline styles, add the style
attribute to the relevant tag. The style
attribute can contain any CSS property.
The example shows how to change the
color and the left margin of a <h1>
element:
<!DOCTYPE html>
<html>
<body>
<h1 style="color:blue;margin-
left:30px;">This is a
heading.</h1>
<p>This is a paragraph.</p>
</body>
</html>
9. What if you have multiple
CSS, is that possible?
Yes! That is possible but take note that the Inline styles will
override the defined styles from external sheets.
Also, If the link to the external style sheet is placed below the
internal style sheet in HTML <head>, the external style sheet will
override the internal style sheet!
10. CSS Properties
Property Description CSS
color Sets the color of text 1
opacity Sets the opacity level for an element 3
Color Properties
Property Description CSS
text-decoration Specifies the decoration added to text 1
text-decoration-color Specifies the color of the text-decoration 3
text-decoration-line Specifies the type of line in a text-decoration 3
text-decoration-style Specifies the style of the line in a text decoration 3
text-shadow Adds shadow to text 3
text-underline-position Specifies the position of the underline which is set using the text-decoration property 3
Text Properties
11. CSS Properties
Writing Mode Properties
Property Description CSS
direction Specifies the text direction/writing direction 2
text-orientation Defines the orientation of the text in a line 3
text-combine-upright Specifies the combination of multiple characters into the space of a single character 3
unicode-bidi Used together with the direction property to set or return whether the text should be
overridden to support multiple languages in the same document
2
writing-mode 3
Table Properties
Property Description CSS
border-collapse Specifies whether or not table borders should be collapsed 2
border-spacing Specifies the distance between the borders of adjacent cells 2
caption-side Specifies the placement of a table caption 2
empty-cells Specifies whether or not to display borders and background on empty cells in a table 2
table-layout Sets the layout algorithm to be used for a table 2
12. CSS Properties
Background & Border Properties
Property Description CSS
background A shorthand property for setting all the background properties in one
declaration
1
background-attachment Sets whether a background image is fixed or scrolls with the rest of the page 1
background-color Specifies the background color of an element 1
background-image Specifies one or more background images for an element 1
background-position Specifies the position of a background image 1
background-repeat Sets how a background image will be repeated 1
background-clip Specifies the painting area of the background 3
background-origin Specifies where the background image(s) is/are positioned 3
background-size Specifies the size of the background image(s) 3
border Sets all the border properties in one declaration 1
border-bottom Sets all the bottom border properties in one declaration 1
border-bottom-color Sets the color of the bottom border 1
border-bottom-left-radius Defines the shape of the border of the bottom-left corner 3
border-bottom-right-radius Defines the shape of the border of the bottom-right corner 3
border-bottom-style Sets the style of the bottom border 1
border-bottom-width Sets the width of the bottom border 1
border-color Sets the color of the four borders