SlideShare a Scribd company logo
7
Limitations: *Poor layout controls for flexible layouts  *Selectors are unable to ascen *Vertical control limitations  *Absence of expressions  *Lack of orthogonality *Control of element shapes  *Lack of column declaration  *Cannot explicitly declare new scope  independently of position  *Pseudo-class dynamic behavior not controllable *Inconsistent browser support
Most read
10
text-align p {text-align:left;} -This sentence illustrates what it looks like to be left-justified. p {text-align:right;}  -This sentence illustrates what it looks like to be right-justified. p {text-align:center;} -This sentence illustrates what it looks like to be centered. p {text-align:justify;} -This sentence illustrates what it looks like to be fully-justified.
Most read
13
Float property One of the commonly-seen layout, especially in large websites displaying ads, is wrapping the text around an advertising block. This is accomplished using the float property. The float property has three possible values: 'left', 'right', and 'none'. Let's take a look at the following examples:  #leftfloat { float:left; }  The following html: <span id=&quot;leftfloat&quot;><img src=&quot;yp.jpg&quot;></span>This example illustrates how float:left affects the appearance of a block. Notice how the image &quot;floats&quot; to the left This example illustrates  how float:left affects the appearance of a block.  Notice how the image &quot;floats&quot; to the left.
Most read
Cascading Style Sheets  [c.s.s] Cascading Style Sheets (CSS) is a style sheet language used to describe the presentation semantics (that is, the look and formatting) of a document written in a markup language. Its most common application is to style web pages written in HTML and XHTML, but the language can also be applied to any kind of XML document, including SVG and XUL. CSS is designed primarily to enable the separation of document content (written in HTML or a similar markup language) from document presentation, including elements such as the layout, colors, and f ont s
SYNTAX: CSS has a simple syntax and uses a number of English keywords to specify the names of various style properties. A style sheet consists of a list of rules. Each rule or rule-set consists of one or more selectors and a declaration block. A declaration-block consists of a list of declarations in braces. Each declaration itself consists of a property, a colon (:), a value, then a semi-colon (;) selector [, selector2, ...][:pseudo-class] { property: value; [property2: value2;  ...] } /* comment */
USE: Prior to CSS, nearly all of the presentational attributes of HTML documents were contained within the HTML markup; all font colors, background styles, element alignments, borders and sizes had to be explicitly described, often repeatedly, within the HTML. CSS allows authors to move much of that information to a separate style sheet resulting in considerably simpler HTML markup.
SOURCES: One of the goals of CSS is also to allow users a greater degree of control over presentation; those who find the red italic headings difficult to read may apply other style sheets to the document. Depending on their browser and the web site, a user may choose from various style sheets provided by the designers, may remove all added style and view the site using his or her browser's default styling or may perhaps override just the red italic heading style without altering other attribute s. h1 { color: white; background-color: orange !important; } h2 { color: white; background-color: green !important;   }
where possible values for [media type] include the following: Value Suitable For all All devices. aural Speech synthesizers. braille Braille tactile feedback devices. handheld handheld devices. print material to be printed. projection Projected presentations. screen Computer screens. tv TV-type device
Advantages: *Flexibility *Separation of Content from Presentation *Site-wide consistency *Bandwidth *Page reformatting
Limitations: *Poor layout controls for flexible layouts  *Selectors are unable to ascen *Vertical control limitations  *Absence of expressions  *Lack of orthogonality *Control of element shapes  *Lack of column declaration  *Cannot explicitly declare new scope  independently of position  *Pseudo-class dynamic behavior not controllable *Inconsistent browser support
Color property: The color property allows webmasters to define the color of an element in a CSS stylesheet. This property takes values in 3 forms: # Hexadecimal code # RGB # Color name The general syntax for the color property is as follows: Hexadecimal code: {color:#XXXXXX;} -where X is a hexadecimal code. RGB: {color:rgb(X,Y,Z); }  where X, Y, and Z are numbers between 0 and 255 OR Color name: {color:[color_name];}
Text-decoration p {text-decoration:underline;} -for underlining p {text-decoration:underline;} -for underline p {text-decoration:line-through;}-line through
text-align p {text-align:left;} -This sentence illustrates what it looks like to be left-justified. p {text-align:right;}  -This sentence illustrates what it looks like to be right-justified. p {text-align:center;} -This sentence illustrates what it looks like to be centered. p {text-align:justify;} -This sentence illustrates what it looks like to be fully-justified.
text-transform p {text-transform:capitalize;} -this is a LAWYER p {text-transform:uppercase;} -this is a LAWYER p {text-transform:lowercase;} -this is a LAWYER
word-spacing The word-spacing property controls the amount of space between words. For example, with a CSS declaration of, p {word-spacing:5px;} The following HTML, <p>Words here are separated by 5px.</p> renders Words here are separated by 5px.
Float property One of the commonly-seen layout, especially in large websites displaying ads, is wrapping the text around an advertising block. This is accomplished using the float property. The float property has three possible values: 'left', 'right', and 'none'. Let's take a look at the following examples:  #leftfloat { float:left; }  The following html: <span id=&quot;leftfloat&quot;><img src=&quot;yp.jpg&quot;></span>This example illustrates how float:left affects the appearance of a block. Notice how the image &quot;floats&quot; to the left This example illustrates  how float:left affects the appearance of a block.  Notice how the image &quot;floats&quot; to the left.
Making table  In HTML code, you will commonly see the table tag followed by border, cellpadding, and cellspacing attributes. This would be unnecessary if we use CSS. The table, th, tr, and td selectors can use many of the properties we have defined previously in this tutorial such as, but not limited to, those for text, font, border, color, and background.  Let us create an example,
table { border: 0; font-family: arial; font-size:14px; } th { background-color:yellow; } td { border-bottom:1 solid #000000; } .fail { color:#FF0000; }  Style sheet codes
Following html codes: <table> <tr> <th>Student Name</th> <th>Score</th> </tr> <tr> <td>Stella</td> <td>85</td> </tr> <tr> <td>Sophie</td> <td>95</td> </tr> <tr> <td>Alice</td> <td class=&quot;fail&quot;>55</td> </tr> </table>
Student Name  Score Stella    85 Sophie    95 Alice    55 would render the following:
Links : The default style for a link is blue font with an underline. This is, however, not always ideal. There are times when we want links to have a different style. This can be achieved using the following selectors: a:link:  Specifies how the link looks if the page it links to has not yet been visited. a:visited:  Specifies how the link looks if the page it links to has already been visited. a:hover:  Specifies how the link looks like when the user mouses over the link. a:active:  Specifies how the link looks like when the user clicks on it.
Let's take a look at the following declaration: a:link {color:#FF0000; text-decoration:none;} a:visited {color:#0000FF; text-decoration:none;} a:hover {font-size:20; color:#00FF00; text-decoration:underline;} a:active {color:#FF00FF; text-decoration:underline;}
What this means is the following: 1) When the page is first loaded, the font color is red. 2) Once the link is visited, the font color becomes blue. 3) When you mouse over the link, font size becomes 20, font color becomes green, and an underline appears. 4) When you click on the link, font color becomes pink, and the underline remain
Class is specified by including a period (.) before the selector name. The syntax for declaring a Class selector is as follows: .[Class Name] { property:value; ...} For example, .navbar { color:#0000FF; } To apply this style to the HTML, using the following code: <p class=&quot;navbar&quot;>This is a sample using a Class selector.</p> The above HTML code renders: This is a sample using a Class selector. Class
Media types: One can apply different CSS stylesheets for different media types (devices). For example, a stylesheet can be applied when a document is rendered on the screen, and a different stylesheet can be applied when that same document is to be printed. The syntax for specifying the media type for a stylesheet is as follows: External Link <link rel=&quot;stylesheet&quot; href=&quot;style.css&quot; type=&quot;text/css&quot; media=&quot;[media type]&quot;> Embed <style type=&quot;text/css&quot; media=&quot;[media type]&quot;> Import @import url(&quot;style.css&quot;) [media type];
Box model: The box model is an important concept in CSS. It dictates how elements are laid out. The box model is shown beside:The innermost component is the content. Padding is applied outside the content area.
css-cursors { cursor: crosshair; } Mouse cursor is set to crosshair { cursor: pointer; } Mouse cursor is set to pointer { cursor: text; } Mouse cursor is set to text { cursor: move; } Mouse cursor is set to move { cursor: wait; } Mouse cursor is set to wait { cursor: help; } Mouse cursor is set to help { cursor: progress; } Mouse cursor is set to progress wed { cursor: all-scroll; } Mouse cursor is set to all-scroll { cursor: col-resize; } Mouse cursor is set to col-resize { cursor: row-resize; } Mouse cursor is set to row-resize { cursor: e-resize; } Mouse cursor is set to e-resize { cursor: ne-resize; } Mouse cursor is set to ne-resize

More Related Content

What's hot (20)

Css
CssCss
Css
Balakumaran Arunachalam
 
CSS ppt
CSS pptCSS ppt
CSS ppt
Sanmuga Nathan
 
Cascading Style Sheets - Part 01
Cascading Style Sheets - Part 01Cascading Style Sheets - Part 01
Cascading Style Sheets - Part 01
Hatem Mahmoud
 
Html, CSS & Web Designing
Html, CSS & Web DesigningHtml, CSS & Web Designing
Html, CSS & Web Designing
Leslie Steele
 
Css Complete Notes
Css Complete NotesCss Complete Notes
Css Complete Notes
EPAM Systems
 
CSS
CSSCSS
CSS
Vladimir Zhidal
 
Css
CssCss
Css
jayakarthi
 
Cascading Style Sheets
Cascading Style SheetsCascading Style Sheets
Cascading Style Sheets
Paul Dionysius
 
css.ppt
css.pptcss.ppt
css.ppt
bhasula
 
Introduction to css by programmerblog.net
Introduction to css by programmerblog.netIntroduction to css by programmerblog.net
Introduction to css by programmerblog.net
Programmer Blog
 
How Cascading Style Sheets (CSS) Works
How Cascading Style Sheets (CSS) WorksHow Cascading Style Sheets (CSS) Works
How Cascading Style Sheets (CSS) Works
Amit Tyagi
 
Introduction to Cascading Style Sheets
Introduction to Cascading Style SheetsIntroduction to Cascading Style Sheets
Introduction to Cascading Style Sheets
Tushar Joshi
 
Css lecture notes
Css lecture notesCss lecture notes
Css lecture notes
Santhiya Grace
 
Basics Of Css And Some Common Mistakes
Basics Of Css And Some Common MistakesBasics Of Css And Some Common Mistakes
Basics Of Css And Some Common Mistakes
sanjay2211
 
Css
CssCss
Css
Hemant Saini
 
html-css
html-csshtml-css
html-css
Dhirendra Chauhan
 
CSS notes
CSS notesCSS notes
CSS notes
Rajendra Prasad
 
Html
HtmlHtml
Html
EPAM Systems
 
Chapter 4a cascade style sheet css
Chapter 4a cascade style sheet cssChapter 4a cascade style sheet css
Chapter 4a cascade style sheet css
Tesfaye Yenealem
 
L4 Fashioning Text Styles and Colors
L4   Fashioning Text Styles and ColorsL4   Fashioning Text Styles and Colors
L4 Fashioning Text Styles and Colors
mykella
 

Similar to Css (20)

Css
CssCss
Css
NIRMAL FELIX
 
css3.0.( Cascading Style Sheets ) pptx
css3.0.( Cascading  Style  Sheets ) pptxcss3.0.( Cascading  Style  Sheets ) pptx
css3.0.( Cascading Style Sheets ) pptx
neelkamal72809
 
Css
CssCss
Css
Abhishek Kesharwani
 
cascading stylesheet_cssppt-100604051600-phpapp02.pdf
cascading stylesheet_cssppt-100604051600-phpapp02.pdfcascading stylesheet_cssppt-100604051600-phpapp02.pdf
cascading stylesheet_cssppt-100604051600-phpapp02.pdf
hinalsomani93
 
Introduction to Cascading Style Sheets (CSS)
Introduction to Cascading Style Sheets (CSS)Introduction to Cascading Style Sheets (CSS)
Introduction to Cascading Style Sheets (CSS)
Chris Poteet
 
uptu web technology unit 2 Css
uptu web technology unit 2 Cssuptu web technology unit 2 Css
uptu web technology unit 2 Css
Abhishek Kesharwani
 
v5-introduction to html-css-210321161444.pptx
v5-introduction to html-css-210321161444.pptxv5-introduction to html-css-210321161444.pptx
v5-introduction to html-css-210321161444.pptx
hannahroseline2
 
Css
CssCss
Css
MAGNA COLLEGE OF ENGINEERING
 
Cordova training - Day 2 Introduction to CSS 3
Cordova training - Day 2 Introduction to CSS 3Cordova training - Day 2 Introduction to CSS 3
Cordova training - Day 2 Introduction to CSS 3
Binu Paul
 
Web - CSS 1.pptx
Web - CSS 1.pptxWeb - CSS 1.pptx
Web - CSS 1.pptx
haroon451422
 
Css
CssCss
Css
Venkat Krishnan
 
CSS Basics
CSS BasicsCSS Basics
CSS Basics
WordPress Memphis
 
Css
CssCss
Css
Yudha Arif Budiman
 
CSS Basics part One
CSS Basics part OneCSS Basics part One
CSS Basics part One
M Ashraful Islam Jewel
 
CSS tutorial chapter 1
CSS tutorial chapter 1CSS tutorial chapter 1
CSS tutorial chapter 1
jeweltutin
 
Css Introduction
Css IntroductionCss Introduction
Css Introduction
SathyaseelanK1
 
basics of css
basics of cssbasics of css
basics of css
Priya Goyal
 
Embrace the Mullet: CSS is the 'Party in the Back' (a CSS How-to)
Embrace the Mullet: CSS is the 'Party in the Back' (a CSS How-to)Embrace the Mullet: CSS is the 'Party in the Back' (a CSS How-to)
Embrace the Mullet: CSS is the 'Party in the Back' (a CSS How-to)
Tom Hapgood
 
Web Programming-css.pptx
Web Programming-css.pptxWeb Programming-css.pptx
Web Programming-css.pptx
MarwaAnany1
 
CSS
CSSCSS
CSS
anandha ganesh
 

More from Rathan Raj (9)

Database Normalization
Database NormalizationDatabase Normalization
Database Normalization
Rathan Raj
 
Photochemical smog
Photochemical smogPhotochemical smog
Photochemical smog
Rathan Raj
 
Web20
Web20Web20
Web20
Rathan Raj
 
Ajax
AjaxAjax
Ajax
Rathan Raj
 
Apache
ApacheApache
Apache
Rathan Raj
 
Html
HtmlHtml
Html
Rathan Raj
 
Linux
LinuxLinux
Linux
Rathan Raj
 
Mysql
MysqlMysql
Mysql
Rathan Raj
 
Php
PhpPhp
Php
Rathan Raj
 

Recently uploaded (20)

6th Power Grid Model Meetup - 21 May 2025
6th Power Grid Model Meetup - 21 May 20256th Power Grid Model Meetup - 21 May 2025
6th Power Grid Model Meetup - 21 May 2025
DanBrown980551
 
Contributing to WordPress With & Without Code.pptx
Contributing to WordPress With & Without Code.pptxContributing to WordPress With & Without Code.pptx
Contributing to WordPress With & Without Code.pptx
Patrick Lumumba
 
Protecting Your Sensitive Data with Microsoft Purview - IRMS 2025
Protecting Your Sensitive Data with Microsoft Purview - IRMS 2025Protecting Your Sensitive Data with Microsoft Purview - IRMS 2025
Protecting Your Sensitive Data with Microsoft Purview - IRMS 2025
Nikki Chapple
 
Microsoft Build 2025 takeaways in one presentation
Microsoft Build 2025 takeaways in one presentationMicrosoft Build 2025 takeaways in one presentation
Microsoft Build 2025 takeaways in one presentation
Digitalmara
 
Palo Alto Networks Cybersecurity Foundation
Palo Alto Networks Cybersecurity FoundationPalo Alto Networks Cybersecurity Foundation
Palo Alto Networks Cybersecurity Foundation
VICTOR MAESTRE RAMIREZ
 
Create Your First AI Agent with UiPath Agent Builder
Create Your First AI Agent with UiPath Agent BuilderCreate Your First AI Agent with UiPath Agent Builder
Create Your First AI Agent with UiPath Agent Builder
DianaGray10
 
Nix(OS) for Python Developers - PyCon 25 (Bologna, Italia)
Nix(OS) for Python Developers - PyCon 25 (Bologna, Italia)Nix(OS) for Python Developers - PyCon 25 (Bologna, Italia)
Nix(OS) for Python Developers - PyCon 25 (Bologna, Italia)
Peter Bittner
 
Supercharge Your AI Development with Local LLMs
Supercharge Your AI Development with Local LLMsSupercharge Your AI Development with Local LLMs
Supercharge Your AI Development with Local LLMs
Francesco Corti
 
Agentic AI - The New Era of Intelligence
Agentic AI - The New Era of IntelligenceAgentic AI - The New Era of Intelligence
Agentic AI - The New Era of Intelligence
Muzammil Shah
 
End-to-end Assurance for SD-WAN & SASE with ThousandEyes
End-to-end Assurance for SD-WAN & SASE with ThousandEyesEnd-to-end Assurance for SD-WAN & SASE with ThousandEyes
End-to-end Assurance for SD-WAN & SASE with ThousandEyes
ThousandEyes
 
Cognitive Chasms - A Typology of GenAI Failure Failure Modes
Cognitive Chasms - A Typology of GenAI Failure Failure ModesCognitive Chasms - A Typology of GenAI Failure Failure Modes
Cognitive Chasms - A Typology of GenAI Failure Failure Modes
Dr. Tathagat Varma
 
New Ways to Reduce Database Costs with ScyllaDB
New Ways to Reduce Database Costs with ScyllaDBNew Ways to Reduce Database Costs with ScyllaDB
New Ways to Reduce Database Costs with ScyllaDB
ScyllaDB
 
AI Emotional Actors: “When Machines Learn to Feel and Perform"
AI Emotional Actors:  “When Machines Learn to Feel and Perform"AI Emotional Actors:  “When Machines Learn to Feel and Perform"
AI Emotional Actors: “When Machines Learn to Feel and Perform"
AkashKumar809858
 
Securiport - A Border Security Company
Securiport  -  A Border Security CompanySecuriport  -  A Border Security Company
Securiport - A Border Security Company
Securiport
 
Grannie’s Journey to Using Healthcare AI Experiences
Grannie’s Journey to Using Healthcare AI ExperiencesGrannie’s Journey to Using Healthcare AI Experiences
Grannie’s Journey to Using Healthcare AI Experiences
Lauren Parr
 
Cyber security cyber security cyber security cyber security cyber security cy...
Cyber security cyber security cyber security cyber security cyber security cy...Cyber security cyber security cyber security cyber security cyber security cy...
Cyber security cyber security cyber security cyber security cyber security cy...
pranavbodhak
 
Dev Dives: System-to-system integration with UiPath API Workflows
Dev Dives: System-to-system integration with UiPath API WorkflowsDev Dives: System-to-system integration with UiPath API Workflows
Dev Dives: System-to-system integration with UiPath API Workflows
UiPathCommunity
 
Co-Constructing Explanations for AI Systems using Provenance
Co-Constructing Explanations for AI Systems using ProvenanceCo-Constructing Explanations for AI Systems using Provenance
Co-Constructing Explanations for AI Systems using Provenance
Paul Groth
 
ELNL2025 - Unlocking the Power of Sensitivity Labels - A Comprehensive Guide....
ELNL2025 - Unlocking the Power of Sensitivity Labels - A Comprehensive Guide....ELNL2025 - Unlocking the Power of Sensitivity Labels - A Comprehensive Guide....
ELNL2025 - Unlocking the Power of Sensitivity Labels - A Comprehensive Guide....
Jasper Oosterveld
 
Agentic AI Explained: The Next Frontier of Autonomous Intelligence & Generati...
Agentic AI Explained: The Next Frontier of Autonomous Intelligence & Generati...Agentic AI Explained: The Next Frontier of Autonomous Intelligence & Generati...
Agentic AI Explained: The Next Frontier of Autonomous Intelligence & Generati...
Aaryan Kansari
 
6th Power Grid Model Meetup - 21 May 2025
6th Power Grid Model Meetup - 21 May 20256th Power Grid Model Meetup - 21 May 2025
6th Power Grid Model Meetup - 21 May 2025
DanBrown980551
 
Contributing to WordPress With & Without Code.pptx
Contributing to WordPress With & Without Code.pptxContributing to WordPress With & Without Code.pptx
Contributing to WordPress With & Without Code.pptx
Patrick Lumumba
 
Protecting Your Sensitive Data with Microsoft Purview - IRMS 2025
Protecting Your Sensitive Data with Microsoft Purview - IRMS 2025Protecting Your Sensitive Data with Microsoft Purview - IRMS 2025
Protecting Your Sensitive Data with Microsoft Purview - IRMS 2025
Nikki Chapple
 
Microsoft Build 2025 takeaways in one presentation
Microsoft Build 2025 takeaways in one presentationMicrosoft Build 2025 takeaways in one presentation
Microsoft Build 2025 takeaways in one presentation
Digitalmara
 
Palo Alto Networks Cybersecurity Foundation
Palo Alto Networks Cybersecurity FoundationPalo Alto Networks Cybersecurity Foundation
Palo Alto Networks Cybersecurity Foundation
VICTOR MAESTRE RAMIREZ
 
Create Your First AI Agent with UiPath Agent Builder
Create Your First AI Agent with UiPath Agent BuilderCreate Your First AI Agent with UiPath Agent Builder
Create Your First AI Agent with UiPath Agent Builder
DianaGray10
 
Nix(OS) for Python Developers - PyCon 25 (Bologna, Italia)
Nix(OS) for Python Developers - PyCon 25 (Bologna, Italia)Nix(OS) for Python Developers - PyCon 25 (Bologna, Italia)
Nix(OS) for Python Developers - PyCon 25 (Bologna, Italia)
Peter Bittner
 
Supercharge Your AI Development with Local LLMs
Supercharge Your AI Development with Local LLMsSupercharge Your AI Development with Local LLMs
Supercharge Your AI Development with Local LLMs
Francesco Corti
 
Agentic AI - The New Era of Intelligence
Agentic AI - The New Era of IntelligenceAgentic AI - The New Era of Intelligence
Agentic AI - The New Era of Intelligence
Muzammil Shah
 
End-to-end Assurance for SD-WAN & SASE with ThousandEyes
End-to-end Assurance for SD-WAN & SASE with ThousandEyesEnd-to-end Assurance for SD-WAN & SASE with ThousandEyes
End-to-end Assurance for SD-WAN & SASE with ThousandEyes
ThousandEyes
 
Cognitive Chasms - A Typology of GenAI Failure Failure Modes
Cognitive Chasms - A Typology of GenAI Failure Failure ModesCognitive Chasms - A Typology of GenAI Failure Failure Modes
Cognitive Chasms - A Typology of GenAI Failure Failure Modes
Dr. Tathagat Varma
 
New Ways to Reduce Database Costs with ScyllaDB
New Ways to Reduce Database Costs with ScyllaDBNew Ways to Reduce Database Costs with ScyllaDB
New Ways to Reduce Database Costs with ScyllaDB
ScyllaDB
 
AI Emotional Actors: “When Machines Learn to Feel and Perform"
AI Emotional Actors:  “When Machines Learn to Feel and Perform"AI Emotional Actors:  “When Machines Learn to Feel and Perform"
AI Emotional Actors: “When Machines Learn to Feel and Perform"
AkashKumar809858
 
Securiport - A Border Security Company
Securiport  -  A Border Security CompanySecuriport  -  A Border Security Company
Securiport - A Border Security Company
Securiport
 
Grannie’s Journey to Using Healthcare AI Experiences
Grannie’s Journey to Using Healthcare AI ExperiencesGrannie’s Journey to Using Healthcare AI Experiences
Grannie’s Journey to Using Healthcare AI Experiences
Lauren Parr
 
Cyber security cyber security cyber security cyber security cyber security cy...
Cyber security cyber security cyber security cyber security cyber security cy...Cyber security cyber security cyber security cyber security cyber security cy...
Cyber security cyber security cyber security cyber security cyber security cy...
pranavbodhak
 
Dev Dives: System-to-system integration with UiPath API Workflows
Dev Dives: System-to-system integration with UiPath API WorkflowsDev Dives: System-to-system integration with UiPath API Workflows
Dev Dives: System-to-system integration with UiPath API Workflows
UiPathCommunity
 
Co-Constructing Explanations for AI Systems using Provenance
Co-Constructing Explanations for AI Systems using ProvenanceCo-Constructing Explanations for AI Systems using Provenance
Co-Constructing Explanations for AI Systems using Provenance
Paul Groth
 
ELNL2025 - Unlocking the Power of Sensitivity Labels - A Comprehensive Guide....
ELNL2025 - Unlocking the Power of Sensitivity Labels - A Comprehensive Guide....ELNL2025 - Unlocking the Power of Sensitivity Labels - A Comprehensive Guide....
ELNL2025 - Unlocking the Power of Sensitivity Labels - A Comprehensive Guide....
Jasper Oosterveld
 
Agentic AI Explained: The Next Frontier of Autonomous Intelligence & Generati...
Agentic AI Explained: The Next Frontier of Autonomous Intelligence & Generati...Agentic AI Explained: The Next Frontier of Autonomous Intelligence & Generati...
Agentic AI Explained: The Next Frontier of Autonomous Intelligence & Generati...
Aaryan Kansari
 

Css

  • 1. Cascading Style Sheets [c.s.s] Cascading Style Sheets (CSS) is a style sheet language used to describe the presentation semantics (that is, the look and formatting) of a document written in a markup language. Its most common application is to style web pages written in HTML and XHTML, but the language can also be applied to any kind of XML document, including SVG and XUL. CSS is designed primarily to enable the separation of document content (written in HTML or a similar markup language) from document presentation, including elements such as the layout, colors, and f ont s
  • 2. SYNTAX: CSS has a simple syntax and uses a number of English keywords to specify the names of various style properties. A style sheet consists of a list of rules. Each rule or rule-set consists of one or more selectors and a declaration block. A declaration-block consists of a list of declarations in braces. Each declaration itself consists of a property, a colon (:), a value, then a semi-colon (;) selector [, selector2, ...][:pseudo-class] { property: value; [property2: value2; ...] } /* comment */
  • 3. USE: Prior to CSS, nearly all of the presentational attributes of HTML documents were contained within the HTML markup; all font colors, background styles, element alignments, borders and sizes had to be explicitly described, often repeatedly, within the HTML. CSS allows authors to move much of that information to a separate style sheet resulting in considerably simpler HTML markup.
  • 4. SOURCES: One of the goals of CSS is also to allow users a greater degree of control over presentation; those who find the red italic headings difficult to read may apply other style sheets to the document. Depending on their browser and the web site, a user may choose from various style sheets provided by the designers, may remove all added style and view the site using his or her browser's default styling or may perhaps override just the red italic heading style without altering other attribute s. h1 { color: white; background-color: orange !important; } h2 { color: white; background-color: green !important; }
  • 5. where possible values for [media type] include the following: Value Suitable For all All devices. aural Speech synthesizers. braille Braille tactile feedback devices. handheld handheld devices. print material to be printed. projection Projected presentations. screen Computer screens. tv TV-type device
  • 6. Advantages: *Flexibility *Separation of Content from Presentation *Site-wide consistency *Bandwidth *Page reformatting
  • 7. Limitations: *Poor layout controls for flexible layouts *Selectors are unable to ascen *Vertical control limitations *Absence of expressions *Lack of orthogonality *Control of element shapes *Lack of column declaration *Cannot explicitly declare new scope independently of position *Pseudo-class dynamic behavior not controllable *Inconsistent browser support
  • 8. Color property: The color property allows webmasters to define the color of an element in a CSS stylesheet. This property takes values in 3 forms: # Hexadecimal code # RGB # Color name The general syntax for the color property is as follows: Hexadecimal code: {color:#XXXXXX;} -where X is a hexadecimal code. RGB: {color:rgb(X,Y,Z); } where X, Y, and Z are numbers between 0 and 255 OR Color name: {color:[color_name];}
  • 9. Text-decoration p {text-decoration:underline;} -for underlining p {text-decoration:underline;} -for underline p {text-decoration:line-through;}-line through
  • 10. text-align p {text-align:left;} -This sentence illustrates what it looks like to be left-justified. p {text-align:right;} -This sentence illustrates what it looks like to be right-justified. p {text-align:center;} -This sentence illustrates what it looks like to be centered. p {text-align:justify;} -This sentence illustrates what it looks like to be fully-justified.
  • 11. text-transform p {text-transform:capitalize;} -this is a LAWYER p {text-transform:uppercase;} -this is a LAWYER p {text-transform:lowercase;} -this is a LAWYER
  • 12. word-spacing The word-spacing property controls the amount of space between words. For example, with a CSS declaration of, p {word-spacing:5px;} The following HTML, <p>Words here are separated by 5px.</p> renders Words here are separated by 5px.
  • 13. Float property One of the commonly-seen layout, especially in large websites displaying ads, is wrapping the text around an advertising block. This is accomplished using the float property. The float property has three possible values: 'left', 'right', and 'none'. Let's take a look at the following examples: #leftfloat { float:left; } The following html: <span id=&quot;leftfloat&quot;><img src=&quot;yp.jpg&quot;></span>This example illustrates how float:left affects the appearance of a block. Notice how the image &quot;floats&quot; to the left This example illustrates how float:left affects the appearance of a block. Notice how the image &quot;floats&quot; to the left.
  • 14. Making table In HTML code, you will commonly see the table tag followed by border, cellpadding, and cellspacing attributes. This would be unnecessary if we use CSS. The table, th, tr, and td selectors can use many of the properties we have defined previously in this tutorial such as, but not limited to, those for text, font, border, color, and background. Let us create an example,
  • 15. table { border: 0; font-family: arial; font-size:14px; } th { background-color:yellow; } td { border-bottom:1 solid #000000; } .fail { color:#FF0000; } Style sheet codes
  • 16. Following html codes: <table> <tr> <th>Student Name</th> <th>Score</th> </tr> <tr> <td>Stella</td> <td>85</td> </tr> <tr> <td>Sophie</td> <td>95</td> </tr> <tr> <td>Alice</td> <td class=&quot;fail&quot;>55</td> </tr> </table>
  • 17. Student Name Score Stella 85 Sophie 95 Alice 55 would render the following:
  • 18. Links : The default style for a link is blue font with an underline. This is, however, not always ideal. There are times when we want links to have a different style. This can be achieved using the following selectors: a:link: Specifies how the link looks if the page it links to has not yet been visited. a:visited: Specifies how the link looks if the page it links to has already been visited. a:hover: Specifies how the link looks like when the user mouses over the link. a:active: Specifies how the link looks like when the user clicks on it.
  • 19. Let's take a look at the following declaration: a:link {color:#FF0000; text-decoration:none;} a:visited {color:#0000FF; text-decoration:none;} a:hover {font-size:20; color:#00FF00; text-decoration:underline;} a:active {color:#FF00FF; text-decoration:underline;}
  • 20. What this means is the following: 1) When the page is first loaded, the font color is red. 2) Once the link is visited, the font color becomes blue. 3) When you mouse over the link, font size becomes 20, font color becomes green, and an underline appears. 4) When you click on the link, font color becomes pink, and the underline remain
  • 21. Class is specified by including a period (.) before the selector name. The syntax for declaring a Class selector is as follows: .[Class Name] { property:value; ...} For example, .navbar { color:#0000FF; } To apply this style to the HTML, using the following code: <p class=&quot;navbar&quot;>This is a sample using a Class selector.</p> The above HTML code renders: This is a sample using a Class selector. Class
  • 22. Media types: One can apply different CSS stylesheets for different media types (devices). For example, a stylesheet can be applied when a document is rendered on the screen, and a different stylesheet can be applied when that same document is to be printed. The syntax for specifying the media type for a stylesheet is as follows: External Link <link rel=&quot;stylesheet&quot; href=&quot;style.css&quot; type=&quot;text/css&quot; media=&quot;[media type]&quot;> Embed <style type=&quot;text/css&quot; media=&quot;[media type]&quot;> Import @import url(&quot;style.css&quot;) [media type];
  • 23. Box model: The box model is an important concept in CSS. It dictates how elements are laid out. The box model is shown beside:The innermost component is the content. Padding is applied outside the content area.
  • 24. css-cursors { cursor: crosshair; } Mouse cursor is set to crosshair { cursor: pointer; } Mouse cursor is set to pointer { cursor: text; } Mouse cursor is set to text { cursor: move; } Mouse cursor is set to move { cursor: wait; } Mouse cursor is set to wait { cursor: help; } Mouse cursor is set to help { cursor: progress; } Mouse cursor is set to progress wed { cursor: all-scroll; } Mouse cursor is set to all-scroll { cursor: col-resize; } Mouse cursor is set to col-resize { cursor: row-resize; } Mouse cursor is set to row-resize { cursor: e-resize; } Mouse cursor is set to e-resize { cursor: ne-resize; } Mouse cursor is set to ne-resize