The document discusses CSS properties for styling text, including:
- CSS (Cascading Style Sheets) is used to describe how HTML elements are displayed on different media. CSS can control layout and styles across multiple web pages.
- Color properties like background-color, color, border-color are used to specify colors for elements using color names, HEX, RGB, HSL values.
- Other properties like background-image, background-repeat, background-position are used to add and position background images. Border properties allow customizing element borders.
This document discusses different methods for specifying colors in HTML, including color names, RGB, HEX, HSL, RGBA, and HSLA values. It provides examples of how to set colors for text, backgrounds, and borders. Various properties of each color method are also explained, such as how RGB specifies colors using levels of red, green, and blue components.
The document provides information on various HTML elements for styling and formatting text, including comments, style attributes, colors, fonts, borders, padding, and margins. It also covers CSS for defining styles through inline, internal, and external stylesheets. Additional topics include HTML tables, lists, links, and images. Key elements covered are tags for headings, paragraphs, bold, italics, superscript, formatting text size and color, and applying styles through CSS selectors like id and class.
CSS is a style sheet language used to describe the presentation of HTML and XML documents. It can be applied through inline styles, internal style sheets embedded in HTML <style> tags, or external style sheets linked via <link> tags. CSS uses selectors to target elements and properties to style them by setting values like font sizes, colors, spacing and more. This allows separation of document structure/semantics from presentation.
XHTML is a reformulation of HTML as an XML application which requires following more strict rules than HTML. The most important rules are including a DOCTYPE declaration, adding an xmlns attribute to <html>, closing all tags, using lowercase tags, specifying empty elements with a closing slash, quoting all attribute values, and always including attribute values. Common XHTML tags are used to define document structure and elements like paragraphs, headings, lists, links, images, and tables. Forms can also be created using tags like <form>, <input>, and <select>.
The document discusses styling HTML with CSS. It describes CSS as a language that describes the style of HTML elements and is used to describe how elements should be displayed. It outlines the different ways CSS can be added, including inline, internally, and externally. It provides examples of CSS syntax, selectors, and properties for styling text, colors, borders, padding, and margins.
On these slides. I explain all the properties and values of CSS Cascade Style Sheet (CSS).
How to define CSS class or id. How to implement CSS on the HTML page.
CSS (Cascading Style Sheets) allows styling and formatting of HTML documents. CSS rules tell HTML how to display by separating structure from presentation. There are various CSS selectors that target elements like classes, IDs, and tags. Properties like color, font, padding, margin and background customize elements. CSS box model controls layout with properties for dimensions, borders, margins and padding. Positioning options include static, relative, fixed and absolute.
This document discusses different methods for specifying colors in HTML, including color names, RGB, HEX, HSL, RGBA, and HSLA values. It provides examples of how to set colors for text, backgrounds, and borders. Various properties of each color method are also explained, such as how RGB specifies colors using levels of red, green, and blue components.
The document provides information on various HTML elements for styling and formatting text, including comments, style attributes, colors, fonts, borders, padding, and margins. It also covers CSS for defining styles through inline, internal, and external stylesheets. Additional topics include HTML tables, lists, links, and images. Key elements covered are tags for headings, paragraphs, bold, italics, superscript, formatting text size and color, and applying styles through CSS selectors like id and class.
CSS is a style sheet language used to describe the presentation of HTML and XML documents. It can be applied through inline styles, internal style sheets embedded in HTML <style> tags, or external style sheets linked via <link> tags. CSS uses selectors to target elements and properties to style them by setting values like font sizes, colors, spacing and more. This allows separation of document structure/semantics from presentation.
XHTML is a reformulation of HTML as an XML application which requires following more strict rules than HTML. The most important rules are including a DOCTYPE declaration, adding an xmlns attribute to <html>, closing all tags, using lowercase tags, specifying empty elements with a closing slash, quoting all attribute values, and always including attribute values. Common XHTML tags are used to define document structure and elements like paragraphs, headings, lists, links, images, and tables. Forms can also be created using tags like <form>, <input>, and <select>.
The document discusses styling HTML with CSS. It describes CSS as a language that describes the style of HTML elements and is used to describe how elements should be displayed. It outlines the different ways CSS can be added, including inline, internally, and externally. It provides examples of CSS syntax, selectors, and properties for styling text, colors, borders, padding, and margins.
On these slides. I explain all the properties and values of CSS Cascade Style Sheet (CSS).
How to define CSS class or id. How to implement CSS on the HTML page.
CSS (Cascading Style Sheets) allows styling and formatting of HTML documents. CSS rules tell HTML how to display by separating structure from presentation. There are various CSS selectors that target elements like classes, IDs, and tags. Properties like color, font, padding, margin and background customize elements. CSS box model controls layout with properties for dimensions, borders, margins and padding. Positioning options include static, relative, fixed and absolute.
This document provides an overview of HTML formatting elements, comments, and colors. It discusses various HTML elements for formatting text, such as <b> for bold text and <i> for italicized text. It also covers specifying colors in HTML using RGB, hexadecimal, and HSL values. Finally, the document introduces Cascading Style Sheets (CSS) and explains how CSS can be used to control formatting and layout on webpages, either inline within HTML, internally via <style> tags, or externally via linked CSS files.
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.
This document discusses various methods for styling colors and backgrounds in CSS, including:
1) Using named color values or RGB, HSL, and RGBa values to specify foreground and background colors.
2) Applying background images, adjusting their position, size, and repetition.
3) Creating gradients using functions like linear-gradient() and radial-gradient().
4) Attaching external style sheets to HTML documents using <link> tags or @import rules.
The document provides information on various CSS properties and selectors used to style HTML elements. It defines properties for styling text, links, lists, tables, boxes, borders, positioning and various other aspects of HTML elements. It also describes CSS pseudo-classes that can be used to select elements in certain states, like links that have been visited or the first child element.
CSS3 introduces new properties for styling borders and adding rounded corners without images. It also provides new ways to specify colors using RGBA, HSL, and HSLA formats. RGBA allows setting opacity, while HSL and HSLA define colors using hue, saturation, and lightness, with optional opacity. Border images and rounded corners add visual effects without images.
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 discusses various HTML elements for color, links, images, tables, lists, and block/inline elements. It provides examples and descriptions of:
- Using RGB and hexadecimal color codes
- Creating links using the <a> element and setting the href and target attributes
- Using the <img> element to add images and the <map> element for image maps
- Basic table syntax using <table>, <tr>, <td>, <th> elements and colspan/rowspan attributes
- Creating ordered and unordered lists with nested lists using <ul>, <ol>, <li> elements
- Common block elements like <div>, <h1-h6>, <p>, <form> and
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.
The document provides an overview of CSS (Cascading Style Sheets) including what CSS is, its syntax, how to apply CSS, commonly used CSS properties, grouping and nesting selectors, floats for page layout, at-rules like @import and @media, and answers some questions. The agenda covers topics like syntax, applying CSS inline, internally, and externally, selectors, properties and values, units, colors including gradients, text styling, backgrounds, shadows, margins and padding, borders, class and ID selectors, grouping selectors, nesting properties, pseudo-classes, floats for layouts, and different at-rules.
The document discusses various HTML tags and CSS properties. It explains common HTML tags like <p>, <h1>-<h6>, <ul>, <ol>, <table>, and <div>. It also covers CSS concepts like selectors, types of CSS, adding color, fonts, text properties, borders, box model, padding, and margins. The document provides examples and syntax to style HTML elements using CSS.
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.
This document provides an overview of Cascading Style Sheets (CSS) including what CSS is, how to write CSS code, and the different ways to include CSS in an HTML document. CSS allows separation of document content from page layout and visual design. CSS code uses selectors, properties, and values to style HTML elements. Styles can be included inline, internally in the <head> using <style> tags, or externally in a .css file linked via the <link> tag. Inheritance rules determine which styles take precedence.
CSS (Cascading Style Sheets) allows styling and formatting of web pages. CSS handles the look and feel of web pages by controlling color, fonts, spacing, sizes, backgrounds and layouts. Some key advantages of CSS include saving time by reusing style sheets across pages, faster page loads with less code, and easy maintenance by making global style changes site-wide. CSS properties are applied using selectors to target specific HTML elements.
Cascading Style Sheets (CSS) is a style sheet language used to describe the presentation of structured documents like HTML. CSS allows separation of document content from document presentation, including elements like layout, colors, and fonts. CSS has a simple syntax using English keywords to specify style properties in rules and declaration blocks.
The basic of css for all.
Separates structure from presentation
Provides advanced control of presentation
Easy maintenance of multiple pages
Faster Page loading
Better accessibility for disabled users
Easy to learn
Cascading Style Sheets (CSS) is a style sheet language used to describe the presentation of HTML and XML documents. CSS separates document content from document presentation, enabling control over elements like layout, colors, and fonts. This separation improves accessibility, flexibility, and maintenance of web pages. CSS can format pages for different rendering methods like on-screen, in print, and for speech-based browsers.
The document discusses various topics related to the Document Object Model (DOM) including:
- The DOM defines the logical structure of documents and allows programs to access and manipulate HTML/XML documents.
- It represents documents as trees of nodes that can be traversed and manipulated.
- The history of the DOM is intertwined with the "browser wars" and development of JavaScript.
- There are different levels of the DOM specification with Level 1 providing core/HTML interfaces and later levels adding functionality.
The document discusses Cascading Style Sheets (CSS) which defines how HTML elements are displayed. CSS rules have selectors that specify the element to style and declarations that define property-value pairs to apply styles like color and font properties. CSS comments and different selectors like id and class are covered. Common CSS properties for styling text, backgrounds, links and lists are also explained. The document concludes with descriptions of the CSS box model and how it impacts element width and height calculations.
This document provides an overview of HTML formatting elements, comments, and colors. It discusses various HTML elements for formatting text, such as <b> for bold text and <i> for italicized text. It also covers specifying colors in HTML using RGB, hexadecimal, and HSL values. Finally, the document introduces Cascading Style Sheets (CSS) and explains how CSS can be used to control formatting and layout on webpages, either inline within HTML, internally via <style> tags, or externally via linked CSS files.
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.
This document discusses various methods for styling colors and backgrounds in CSS, including:
1) Using named color values or RGB, HSL, and RGBa values to specify foreground and background colors.
2) Applying background images, adjusting their position, size, and repetition.
3) Creating gradients using functions like linear-gradient() and radial-gradient().
4) Attaching external style sheets to HTML documents using <link> tags or @import rules.
The document provides information on various CSS properties and selectors used to style HTML elements. It defines properties for styling text, links, lists, tables, boxes, borders, positioning and various other aspects of HTML elements. It also describes CSS pseudo-classes that can be used to select elements in certain states, like links that have been visited or the first child element.
CSS3 introduces new properties for styling borders and adding rounded corners without images. It also provides new ways to specify colors using RGBA, HSL, and HSLA formats. RGBA allows setting opacity, while HSL and HSLA define colors using hue, saturation, and lightness, with optional opacity. Border images and rounded corners add visual effects without images.
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 discusses various HTML elements for color, links, images, tables, lists, and block/inline elements. It provides examples and descriptions of:
- Using RGB and hexadecimal color codes
- Creating links using the <a> element and setting the href and target attributes
- Using the <img> element to add images and the <map> element for image maps
- Basic table syntax using <table>, <tr>, <td>, <th> elements and colspan/rowspan attributes
- Creating ordered and unordered lists with nested lists using <ul>, <ol>, <li> elements
- Common block elements like <div>, <h1-h6>, <p>, <form> and
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.
The document provides an overview of CSS (Cascading Style Sheets) including what CSS is, its syntax, how to apply CSS, commonly used CSS properties, grouping and nesting selectors, floats for page layout, at-rules like @import and @media, and answers some questions. The agenda covers topics like syntax, applying CSS inline, internally, and externally, selectors, properties and values, units, colors including gradients, text styling, backgrounds, shadows, margins and padding, borders, class and ID selectors, grouping selectors, nesting properties, pseudo-classes, floats for layouts, and different at-rules.
The document discusses various HTML tags and CSS properties. It explains common HTML tags like <p>, <h1>-<h6>, <ul>, <ol>, <table>, and <div>. It also covers CSS concepts like selectors, types of CSS, adding color, fonts, text properties, borders, box model, padding, and margins. The document provides examples and syntax to style HTML elements using CSS.
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.
This document provides an overview of Cascading Style Sheets (CSS) including what CSS is, how to write CSS code, and the different ways to include CSS in an HTML document. CSS allows separation of document content from page layout and visual design. CSS code uses selectors, properties, and values to style HTML elements. Styles can be included inline, internally in the <head> using <style> tags, or externally in a .css file linked via the <link> tag. Inheritance rules determine which styles take precedence.
CSS (Cascading Style Sheets) allows styling and formatting of web pages. CSS handles the look and feel of web pages by controlling color, fonts, spacing, sizes, backgrounds and layouts. Some key advantages of CSS include saving time by reusing style sheets across pages, faster page loads with less code, and easy maintenance by making global style changes site-wide. CSS properties are applied using selectors to target specific HTML elements.
Cascading Style Sheets (CSS) is a style sheet language used to describe the presentation of structured documents like HTML. CSS allows separation of document content from document presentation, including elements like layout, colors, and fonts. CSS has a simple syntax using English keywords to specify style properties in rules and declaration blocks.
The basic of css for all.
Separates structure from presentation
Provides advanced control of presentation
Easy maintenance of multiple pages
Faster Page loading
Better accessibility for disabled users
Easy to learn
Cascading Style Sheets (CSS) is a style sheet language used to describe the presentation of HTML and XML documents. CSS separates document content from document presentation, enabling control over elements like layout, colors, and fonts. This separation improves accessibility, flexibility, and maintenance of web pages. CSS can format pages for different rendering methods like on-screen, in print, and for speech-based browsers.
The document discusses various topics related to the Document Object Model (DOM) including:
- The DOM defines the logical structure of documents and allows programs to access and manipulate HTML/XML documents.
- It represents documents as trees of nodes that can be traversed and manipulated.
- The history of the DOM is intertwined with the "browser wars" and development of JavaScript.
- There are different levels of the DOM specification with Level 1 providing core/HTML interfaces and later levels adding functionality.
The document discusses Cascading Style Sheets (CSS) which defines how HTML elements are displayed. CSS rules have selectors that specify the element to style and declarations that define property-value pairs to apply styles like color and font properties. CSS comments and different selectors like id and class are covered. Common CSS properties for styling text, backgrounds, links and lists are also explained. The document concludes with descriptions of the CSS box model and how it impacts element width and height calculations.
How to Make a Field Mandatory in Odoo 17Celine George
In Odoo, making a field required can be done through both Python code and XML views. When you set the required attribute to True in Python code, it makes the field required across all views where it's used. Conversely, when you set the required attribute in XML views, it makes the field required only in the context of that particular view.
Walmart Business+ and Spark Good for Nonprofits.pdfTechSoup
"Learn about all the ways Walmart supports nonprofit organizations.
You will hear from Liz Willett, the Head of Nonprofits, and hear about what Walmart is doing to help nonprofits, including Walmart Business and Spark Good. Walmart Business+ is a new offer for nonprofits that offers discounts and also streamlines nonprofits order and expense tracking, saving time and money.
The webinar may also give some examples on how nonprofits can best leverage Walmart Business+.
The event will cover the following::
Walmart Business + (https://business.walmart.com/plus) is a new shopping experience for nonprofits, schools, and local business customers that connects an exclusive online shopping experience to stores. Benefits include free delivery and shipping, a 'Spend Analytics” feature, special discounts, deals and tax-exempt shopping.
Special TechSoup offer for a free 180 days membership, and up to $150 in discounts on eligible orders.
Spark Good (walmart.com/sparkgood) is a charitable platform that enables nonprofits to receive donations directly from customers and associates.
Answers about how you can do more with Walmart!"
Main Java[All of the Base Concepts}.docxadhitya5119
This is part 1 of my Java Learning Journey. This Contains Custom methods, classes, constructors, packages, multithreading , try- catch block, finally block and more.
Strategies for Effective Upskilling is a presentation by Chinwendu Peace in a Your Skill Boost Masterclass organisation by the Excellence Foundation for South Sudan on 08th and 09th June 2024 from 1 PM to 3 PM on each day.
How to Setup Warehouse & Location in Odoo 17 InventoryCeline George
In this slide, we'll explore how to set up warehouses and locations in Odoo 17 Inventory. This will help us manage our stock effectively, track inventory levels, and streamline warehouse operations.
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) CurriculumMJDuyan
(𝐓𝐋𝐄 𝟏𝟎𝟎) (𝐋𝐞𝐬𝐬𝐨𝐧 𝟏)-𝐏𝐫𝐞𝐥𝐢𝐦𝐬
𝐃𝐢𝐬𝐜𝐮𝐬𝐬 𝐭𝐡𝐞 𝐄𝐏𝐏 𝐂𝐮𝐫𝐫𝐢𝐜𝐮𝐥𝐮𝐦 𝐢𝐧 𝐭𝐡𝐞 𝐏𝐡𝐢𝐥𝐢𝐩𝐩𝐢𝐧𝐞𝐬:
- Understand the goals and objectives of the Edukasyong Pantahanan at Pangkabuhayan (EPP) curriculum, recognizing its importance in fostering practical life skills and values among students. Students will also be able to identify the key components and subjects covered, such as agriculture, home economics, industrial arts, and information and communication technology.
𝐄𝐱𝐩𝐥𝐚𝐢𝐧 𝐭𝐡𝐞 𝐍𝐚𝐭𝐮𝐫𝐞 𝐚𝐧𝐝 𝐒𝐜𝐨𝐩𝐞 𝐨𝐟 𝐚𝐧 𝐄𝐧𝐭𝐫𝐞𝐩𝐫𝐞𝐧𝐞𝐮𝐫:
-Define entrepreneurship, distinguishing it from general business activities by emphasizing its focus on innovation, risk-taking, and value creation. Students will describe the characteristics and traits of successful entrepreneurs, including their roles and responsibilities, and discuss the broader economic and social impacts of entrepreneurial activities on both local and global scales.
Gender and Mental Health - Counselling and Family Therapy Applications and In...PsychoTech Services
A proprietary approach developed by bringing together the best of learning theories from Psychology, design principles from the world of visualization, and pedagogical methods from over a decade of training experience, that enables you to: Learn better, faster!
Chapter wise All Notes of First year Basic Civil Engineering.pptxDenish Jangid
Chapter wise All Notes of First year Basic Civil Engineering
Syllabus
Chapter-1
Introduction to objective, scope and outcome the subject
Chapter 2
Introduction: Scope and Specialization of Civil Engineering, Role of civil Engineer in Society, Impact of infrastructural development on economy of country.
Chapter 3
Surveying: Object Principles & Types of Surveying; Site Plans, Plans & Maps; Scales & Unit of different Measurements.
Linear Measurements: Instruments used. Linear Measurement by Tape, Ranging out Survey Lines and overcoming Obstructions; Measurements on sloping ground; Tape corrections, conventional symbols. Angular Measurements: Instruments used; Introduction to Compass Surveying, Bearings and Longitude & Latitude of a Line, Introduction to total station.
Levelling: Instrument used Object of levelling, Methods of levelling in brief, and Contour maps.
Chapter 4
Buildings: Selection of site for Buildings, Layout of Building Plan, Types of buildings, Plinth area, carpet area, floor space index, Introduction to building byelaws, concept of sun light & ventilation. Components of Buildings & their functions, Basic concept of R.C.C., Introduction to types of foundation
Chapter 5
Transportation: Introduction to Transportation Engineering; Traffic and Road Safety: Types and Characteristics of Various Modes of Transportation; Various Road Traffic Signs, Causes of Accidents and Road Safety Measures.
Chapter 6
Environmental Engineering: Environmental Pollution, Environmental Acts and Regulations, Functional Concepts of Ecology, Basics of Species, Biodiversity, Ecosystem, Hydrological Cycle; Chemical Cycles: Carbon, Nitrogen & Phosphorus; Energy Flow in Ecosystems.
Water Pollution: Water Quality standards, Introduction to Treatment & Disposal of Waste Water. Reuse and Saving of Water, Rain Water Harvesting. Solid Waste Management: Classification of Solid Waste, Collection, Transportation and Disposal of Solid. Recycling of Solid Waste: Energy Recovery, Sanitary Landfill, On-Site Sanitation. Air & Noise Pollution: Primary and Secondary air pollutants, Harmful effects of Air Pollution, Control of Air Pollution. . Noise Pollution Harmful Effects of noise pollution, control of noise pollution, Global warming & Climate Change, Ozone depletion, Greenhouse effect
Text Books:
1. Palancharmy, Basic Civil Engineering, McGraw Hill publishers.
2. Satheesh Gopi, Basic Civil Engineering, Pearson Publishers.
3. Ketki Rangwala Dalal, Essentials of Civil Engineering, Charotar Publishing House.
4. BCP, Surveying volume 1
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
Css ejemplos y codigo 1
1. CSS
• CSS stands for Cascading Style Sheets
• CSS describes how HTML elements are to be displayed on screen,
paper, or in other media
• CSS saves a lot of work. It can control the layout of multiple web pages all
at once
• External stylesheets are stored in CSS files
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.
• The declaration block contains one or more declarations separated by
semicolons.
• Each declaration includes a CSS property name and a value, separated by
a colon.
• A CSS declaration always ends with a semicolon, and declaration blocks
are surrounded by curly braces.
In the following example all <p> elements will be center-aligned, with a red text
color:
Example
p {
text-align: center;
color: red;
}
External Style Sheet
2. 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:
Example
<head>
<link rel="stylesheet" type="text/css" href="mystyle.css">
</head>
Color Names
In HTML, a color can be specified by using a color name:
Tomato
Orange
DodgerBlue
MediumSeaGreen
Gray
3. SlateBlue
Violet
Background Color
You can set the background color for HTML elements:
Que Tal!!!!
I have head spinning, no kidding. I can’t stop. Wat’s happening in that
beautiful mind. I’m on your magical and mystery ‘ride. You’re craizy and
I´m out of my mind.
Example
<h1 style="background-color:DodgerBlue;">Hello World</h1>
<p style="background-color:Tomato;"> I have head spinning,..</p>
Text Color
You can set the color of text:
Ola de mar
Hola! De saludo
Hola, como está de alta la ola en el mar
Example
<h1 style="color:Tomato;">Ola de mar</h1>
<p style="color:DodgerBlue;">Hola! De saludo</p>
<p style="color:MediumSeaGreen;">Hola, como está de alta...</p>
4. Border Color
You can set the color of borders:
Hello teacher
Hello brother
Hello girl
Example
<h1 style="border:2px solid Tomato;">Hello teacher</h1>
<h1 style="border:2px solid DodgerBlue;">Hello brother</h1>
<h1 style="border:2px solid Violet;">Hello girl</h1>
Color Values
In HTML, colors can also be specified using RGB values, HEX values, HSL values,
RGBA values, and HSLA values:
Same as color name "Tomato":
rgb(255, 99, 71)
#ff6347
hsl(9, 100%, 64%)
Same as color name "Tomato", but 50% transparent:
rgba(255, 99, 71, 0.5)
hsla(9, 100%, 64%, 0.5)
5. Example
<h1 style="background-color:rgb(255, 99, 71);">...</h1>
<h1 style="background-color:#ff6347;">...</h1>
<h1 style="background-color:hsl(9, 100%, 64%);">...</h1>
<h1 style="background-color:rgba(255, 99, 71, 0.5);">...</h1>
<h1 style="background-color:hsla(9, 100%, 64%, 0.5);">...</h1>
RGB Value
In HTML, a color can be specified as an RGB value, using this formula:
rgb(red, green, blue)
Each parameter (red, green, and blue) defines the intensity of the color between 0
and 255.
For example, rgb(255, 0, 0) is displayed as red, because red is set to its highest
value (255) and the others are set to 0.
To display the color black, all color parameters must be set to 0, like this: rgb(0, 0,
0).
To display the color white, all color parameters must be set to 255, like this:
rgb(255, 255, 255).
Experiment by mixing the RGB values below:
rgb(255, 99, 71)
RED 255
GREEN 99
BLUE 71
6. Example
rgb(255, 0, 0)
rgb(0, 0, 255)
rgb(60, 179, 113)
rgb(238, 130, 238)
rgb(255, 165, 0)
rgb(106, 90, 205)
Shades of gray are often defined using equal values for all the 3 light
sources:
Example
rgb(0, 0, 0)
7. rgb(60, 60, 60)
rgb(120, 120, 120)
rgb(180, 180, 180)
rgb(240, 240, 240)
rgb(255, 255, 255)
HEX Value
In HTML, a color can be specified using a hexadecimal value in the form:
#rrggbb
Where rr (red), gg (green) and bb (blue) are hexadecimal values between 00 and ff
(same as decimal 0-255).
For example, #ff0000 is displayed as red, because red is set to its highest value (ff)
and the others are set to the lowest value (00).
Example
#ff0000
9. #b4b4b4
#f0f0f0
#ffffff
HSL Value
In HTML, a color can be specified using hue, saturation, and lightness (HSL) in the
form:
hsl(hue, saturation, lightness)
Hue is a degree on the color wheel from 0 to 360. 0 is red, 120 is green, and 240 is
blue.
Saturation is a percentage value, 0% means a shade of gray, and 100% is the full
color.
Lightness is also a percentage, 0% is black, 50% is neither light or dark, 100% is
white
Example
hsl(0, 100%, 50%)
hsl(240, 100%, 50%)
10. hsl(147, 50%, 47%)
hsl(300, 76%, 72%)
hsl(39, 100%, 50%)
hsl(248, 53%, 58%)
Saturation
Saturation can be describe as the intensity of a color.
100% is pure color, no shades of gray
50% is 50% gray, but you can still see the color.
0% is completely gray, you can no longer see the color.
Example
hsl(0, 100%, 50%)
hsl(0, 80%, 50%)
11. hsl(0, 60%, 50%)
hsl(0, 40%, 50%)
hsl(0, 20%, 50%)
hsl(0, 0%, 50%)
Lightness
The lightness of a color can be described as how much light you want to give the
color, where 0% means no light (black), 50% means 50% light (neither dark nor
light) 100% means full lightness (white).
Example
hsl(0, 100%, 0%)
hsl(0, 100%, 25%)
hsl(0, 100%, 50%)
12. hsl(0, 100%, 75%)
hsl(0, 100%, 90%)
hsl(0, 100%, 100%)
Shades of gray are often defined by setting the hue and saturation to 0,
and adjust the lightness from 0% to 100% to get darker/lighter shades:
Example
hsl(0, 0%, 0%)
hsl(0, 0%, 24%)
hsl(0, 0%, 47%)
hsl(0, 0%, 71%)
hsl(0, 0%, 94%)
13. hsl(0, 0%, 100%)
RGBA Value
RGBA color values are an extension of RGB color values with an alpha channel -
which specifies the opacity for a color.
An RGBA color value is specified with:
rgba(red, green, blue, alpha)
The alpha parameter is a number between 0.0 (fully transparent) and 1.0 (not
transparent at all):
Example
rgba(255, 99, 71, 0)
rgba(255, 99, 71, 0.2)
rgba(255, 99, 71, 0.4)
rgba(255, 99, 71, 0.6)
rgba(255, 99, 71, 0.8)
14. rgba(255, 99, 71, 1)
HSLA Value
HSLA color values are an extension of HSL color values with an alpha channel -
which specifies the opacity for a color.
An HSLA color value is specified with:
hsla(hue, saturation, lightness, alpha)
The alpha parameter is a number between 0.0 (fully transparent) and 1.0 (not
transparent at all):
Example
hsla(9, 100%, 64%, 0)
hsla(9, 100%, 64%, 0.2)
hsla(9, 100%, 64%, 0.4)
hsla(9, 100%, 64%, 0.6)
15. hsla(9, 100%, 64%, 0.8)
hsla(9, 100%, 64%, 1)
Background Color
The background-color property specifies the background color of an element.
The background color of a page is set like this:
Example
body {
background-color: lightblue;
}
With CSS, a color is most often specified by:
• a valid color name - like "red"
• a HEX value - like "#ff0000"
• an RGB value - like "rgb(255,0,0)"
In the example below, the <h1>, <p>, and <div> elements have different
background colors:
Example
h1 {
background-color: green;
}
div {
background-color: lightblue;
}
16. p {
background-color: yellow;
}
Background Image
The background-image property specifies an image to use as the background of an
element.
By default, the image is repeated so it covers the entire element.
The background image for a page can be set like this:
Example
body {
background-image: url("paper.gif");
}
Below is an example of a bad combination of text and background image. The text
is hardly readable:
Example
body {
background-image: url("bgdesert.jpg");
}
Note: When using a background image, use an image that does not disturb
the text.
Background Image - Repeat Horizontally or Vertically
By default, the background-image property repeats an image both horizontally and
vertically.
Some images should be repeated only horizontally or vertically, or they will look
strange, like this:
17. Example
body {
background-image: url("gradient_bg.png");
}
If the image above is repeated only horizontally (background-repeat: repeat-x;), the
background will look better:
Example
body {
background-image: url("gradient_bg.png");
background-repeat: repeat-x;
}
Tip: To repeat an image vertically, set background-repeat: repeat-y;
Background Image - Set position and no-repeat
Showing the background image only once is also specified by the background-
repeat property:
Example
body {
background-image: url("img_tree.png");
background-repeat: no-repeat;
}
In the example above, the background image is shown in the same place as the
text. We want to change the position of the image, so that it does not disturb the
text too much.
The position of the image is specified by the background-position property:
Example
body {
background-image: url("img_tree.png");
background-repeat: no-repeat;
background-position: right top;
}
18. Background Image - Fixed position
To specify that the background image should be fixed (will not scroll with the rest of
the page), use the background-attachment property:
Example
body {
background-image: url("img_tree.png");
background-repeat: no-repeat;
background-position: right top;
background-attachment: fixed;
}
Background - Shorthand property
To shorten the code, it is also possible to specify all the background properties in
one single property. This is called a shorthand property.
The shorthand property for background is background:
Example
body {
background: #ffffff url("mickey.png") no-repeat right top;
}
EJEMPLO 1
<!DOCTYPE html>
<html>
<head>
<style>
body
{
background: #ffffff url("mickey.jpg") no-repeat right top;
margin-right: 200px;
}
</style>
</head>
<body>
19. <h1>IMAGENES</h1>
<p>Esta imagen está posicionada al lado derecho del texto.</p>
<p>Pero si lo posiciona a la izquierda, quedará debajo del texto.</p>
</body>
</html>
EJEMPLO 2
<!DOCTYPE html>
<html>
<head>
<style>
body {
background-image: url("minny.jpg");
background-repeat: no-repeat;
background-position: right top;
margin-right: 300px;
background-attachment: fixed;
}
</style>
</head>
<body>
<h1>TEXTO CON IMAGENES</h1>
<p>Una imagene que se posiciona a la derecha y arriba, ocupando una
posición de izquierda a derecha.</p>
<p>Una imagene que se posiciona a la derecha y arriba, ocupando una
posición de izquierda a derecha.</p>
<p>Una imagene que se posiciona a la derecha y arriba, ocupando una
posición de izquierda a derecha.</p>
<p>Una imagene que se posiciona a la derecha y arriba, ocupando una
posición de izquierda a derecha.</p>
20. <p>Una imagene que se posiciona a la derecha y arriba, ocupando una
posición de izquierda a derecha.</p>
<p>Una imagene que se posiciona a la derecha y arriba, ocupando una
posición de izquierda a derecha.</p>
<p>Una imagene que se posiciona a la derecha y arriba, ocupando una
posición de izquierda a derecha.</p>
<p>Una imagene que se posiciona a la derecha y arriba, ocupando una
posición de izquierda a derecha.</p>
<p>Una imagene que se posiciona a la derecha y arriba, ocupando una
posición de izquierda a derecha.</p>
<p>Una imagene que se posiciona a la derecha y arriba, ocupando una
posición de izquierda a derecha.</p>
<p>Una imagene que se posiciona a la derecha y arriba, ocupando una
posición de izquierda a derecha.</p>
<p>Una imagene que se posiciona a la derecha y arriba, ocupando una
posición de izquierda a derecha.</p>
<p>Una imagene que se posiciona a la derecha y arriba, ocupando una
posición de izquierda a derecha.</p>
</body>
</html>
CSS Border Properties
The CSS border properties allow you to specify the style, width, and color of an
element's border.
I have borders on all sides.
I have a red bottom border.
I have rounded borders.
I have a blue left border.
Border Style
The border-style property specifies what kind of border to display.
The following values are allowed:
21. • dotted - Defines a dotted border
• dashed - Defines a dashed border
• solid - Defines a solid border
• double - Defines a double border
• groove - Defines a 3D grooved border. The effect depends on the border-
color value
• ridge - Defines a 3D ridged border. The effect depends on the border-color
value
• inset - Defines a 3D inset border. The effect depends on the border-color
value
• outset - Defines a 3D outset border. The effect depends on the border-color
value
• none - Defines no border
• hidden - Defines a hidden border
The border-style property can have from one to four values (for the top border,
right border, bottom border, and the left border).
Example
p.dotted {border-style: dotted;}
p.dashed {border-style: dashed;}
p.solid {border-style: solid;}
p.double {border-style: double;}
p.groove {border-style: groove;}
p.ridge {border-style: ridge;}
p.inset {border-style: inset;}
p.outset {border-style: outset;}
p.none {border-style: none;}
p.hidden {border-style: hidden;}
p.mix {border-style: dotted dashed solid double;}
Result:
A dotted border.
A dashed border.
A solid border.
A double border.
A groove border. The effect depends on the border-color value.
22. A ridge border. The effect depends on the border-color value.
An inset border. The effect depends on the border-color value.
An outset border. The effect depends on the border-color value.
No border.
A hidden border.
A mixed border.
Note: None of the OTHER CSS border properties described below will have
ANY effect unless the border-styleproperty is set!
<!DOCTYPE html>
<html>
<head>
<style>
p.mix {
border-style: dotted dashed solid double;
}
</style>
</head>
<body>
<h1>Ejemplo con bordes distintos</h1>
<p class="mix">A mixed border</p>
23. </body>
</html>
Border Width
The border-width property specifies the width of the four borders.
The width can be set as a specific size (in px, pt, cm, em, etc) or by using one of
the three pre-defined values: thin, medium, or thick.
The border-width property can have from one to four values (for the top border,
right border, bottom border, and the left border).
5px border-width
Example
p.one {
border-style: solid;
border-width: 5px;
}
p.two {
border-style: solid;
border-width: medium;
}
p.three {
border-style: solid;
border-width: 2px 10px 4px 20px;
}
<!DOCTYPE html>
<html>
<head>
<style>
25. </body>
Border Color
The border-color property is used to set the color of the four borders.
The color can be set by:
• name - specify a color name, like "red"
• Hex - specify a hex value, like "#ff0000"
• RGB - specify a RGB value, like "rgb(255,0,0)"
• transparent
The border-color property can have from one to four values (for the top border,
right border, bottom border, and the left border).
If border-color is not set, it inherits the color of the element.
Red border
Example
p {
border-style: dotted solid;
}
p.other {
border: 2px solid red;
border-radius: 5px;
}
p.one {
border-style: solid;
border-color: red;
}
p.two {
border-style: solid;
border-color: green;
}
p.three {
border-style: solid;
26. border-color: red green blue yellow;
}
Border - Shorthand Property
As you can see from the examples above, there are many properties to consider
when dealing with borders.
To shorten the code, it is also possible to specify all the individual border properties
in one property.
The border property is a shorthand property for the following individual border
properties:
• border-width
• border-style (required)
• border-color
Example
p {
border: 5px solid red;
}
Result:
Some text
You can also specify all the individual border properties for just one side:
Left Border
p {
border-left: 6px solid red;
background-color: lightgrey;
}
Result:
Some text
Bottom Border
p {
border-bottom: 6px solid red;
27. background-color: lightgrey;
}
Result:
Some text
Rounded Borders
The border-radius property is used to add rounded borders to an
element:
Normal border
Round border
Rounder border
Roundest border
Example
p {
border: 2px solid red;
border-radius: 5px;
}