SlideShare ist ein Scribd-Unternehmen logo
1 von 23
CSS: Modern
Layout and Style
MODERN SCRIPTING
What is CSS?


It is a language that defines how page elements
marked up with HTML or XHTML are displayed in
the web browser or on other devices.



Example, how a page is printed.



CSS is like a “template” that defines the way
that each HTML element looks when displayed.
CSS 1


It became a recommendation in December
1996



It mainly provides methods of styling text- thus
replacing the <font> tag. Which is deprecated
in HTML 4.
Lets try this:
<html>
<head>
<title>Unstyled Example</title>
</head>
<body>
<h1>hello world!</h1>

<p>This is Structural XHTML</p>
</body>
</html>
Output of Code
Same Code but with external
sheet(using the link element)
<html>
<head>
<title>CSS Example</title>

<link rel="stylesheet" type="text/css" href="test.css" />
</head>
<body>
<h1>hello world!</h1>
<p>This is Structural XHTML</p>
</body>
</html>
Whats inside the test.css link?
h1 {
color:#339900;
background-color: Transparent;
font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
}
p{
color:#003399;

background-color: Transparent;
font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
}
Output of the two Codes
What was inside the CSS file?


The mark up consists of two rule sets, one for h1
(text within <h1></h1> tags)



And one for p (text within <p></p> tags).
Lets examine the code


Each of the rule sets consists of the selector (for example,
h1 or p)



A pair of curly braces ( { } )



Inside the curly braces are the directives, which states
how you wish the selector to be displayed in the screen



The directive themselves consist of property and value
combinations separated by a colon (:).



In English, you are saying “this is what to change , and
this is the value I want to change it to”.
Defining Styles


You only need to define how you want your tags
to be styled once.



If further <h1> and <p> elements are added to
the HTML documents, they will also be styled by
the CSS.
CSS in NotePad


You may use the NotePad in encoding the
stylesheet that you want to use in your CSS file.



Once that you defined the stylesheet, you can
save it using the extension name .css like the one
we used in the example “text.css”.
CSS2


It became a recommendation in May 1998



It builds on the CSS1 specification, adding
support for positioning elements (meaning
images, blocks of text, or other items on your
pages) and support for different “media
descriptors”.
CSS3


It is still in development and brings with a new,
modular, approach to CSS in order that devices
that do not have the capability to support the
entire specification can support necessary
modules.



As of November 2011, there are over 50 CSS
modules published from the CSS Working Group.
Some of these are Selectors, Namspaces and
Color and are all recommended by the W3C in
2011.
Separating Document Structures
from Presentation


Document structure includes your content, marked up in a logical
way by the us of tags that describe the content‟s meaning rather
than how it should be displayed. This include paragraphs (<p>),
heading levels (h1 to h6), line breaks (<br />), references to image
files (<img>), hyperlinks to other documents (<a>) and divs and
spans (<div> and <span>)



Presentation means any way of describing how the document
structure should be displayed. This is the whole purpose of CSS, but
in HTML this includes color attributes, align attributes, <center>
elements, and <font> elements.
Ways of Implementing CSS




Inline CSS
Embedded CSS
External Stylesheet
Inline CSS


These are applied to one page element at a time within the flow of
the document. They use a style attribute with a value equal to the
declaration part of the rules below:



<h1 style="color:sienna;margin-left:20px;">This is a paragraph.</h1>



This style will only effect this heading and if you make another, you
have to type again the code.



An inline style loses many of the advantages of style sheets by
mixing content with presentation. Use this method sparingly!
Embedded CSS


Is one that is placed within a <style> element
between the <head> and the </head> tags of a
document.



The style rules described in it will only affect that
particular document.
Embedded CSS
<html>
<head>
<title>Embedded CSS Example</title>
<style type=“text/css”>
h2 {
Font-family: Verdana, Arial, Helvetica, sans-serif;
Color:#cc99cc;
}

</style>
</head>
<body>
<h2>
Text to be styled

</h2>
</body>
</html>
External Stylesheets


This style allows you to fully benefit from CSS.



To make an external stylesheet, you simply take
a simple style rules and place them into a file
with the extension name „.css‟ then link it to the
document you want it affected.
h2 {
font-family: Verdana, Arial, Helvetica, sans-serif;
color: #cc99cc;

}


Save it as global.css,
then attach it to your document by adding the
follow line code between <head></head> tags of
your HTML document:
<html>
<head>
<title> External CSS Example</title>

<link rel="stylesheet" type="text/css" href="global.css" />
</head>
<body>
<h2>
Text to be styled using the external stylesheet.
</h2>
</body>
</html>

Weitere ähnliche Inhalte

Was ist angesagt?

Cascading style sheets (CSS)
Cascading style sheets (CSS)Cascading style sheets (CSS)
Cascading style sheets (CSS)Harshita Yadav
 
Cascading Style Sheets (CSS)
Cascading Style Sheets (CSS)Cascading Style Sheets (CSS)
Cascading Style Sheets (CSS)Harshil Darji
 
Cascading Style Sheets
Cascading Style SheetsCascading Style Sheets
Cascading Style SheetsMarc Steel
 
Cascading Style Sheet (CSS)
Cascading Style Sheet (CSS)Cascading Style Sheet (CSS)
Cascading Style Sheet (CSS)AakankshaR
 
Introduction to css & its attributes with syntax
Introduction to css & its attributes with syntaxIntroduction to css & its attributes with syntax
Introduction to css & its attributes with syntaxpriyadharshini murugan
 
Cascading Style Sheet
Cascading Style SheetCascading Style Sheet
Cascading Style Sheetvijayta
 
Html, css and jquery introduction
Html, css and jquery introductionHtml, css and jquery introduction
Html, css and jquery introductioncncwebworld
 
Cascading Style Sheets (CSS) help
Cascading Style Sheets (CSS) helpCascading Style Sheets (CSS) help
Cascading Style Sheets (CSS) helpcasestudyhelp
 
Cascading style sheets
Cascading style sheetsCascading style sheets
Cascading style sheetsJafar Nesargi
 
Cascading style sheets
Cascading style sheetsCascading style sheets
Cascading style sheetsJafar Nesargi
 
Styling of css
Styling of cssStyling of css
Styling of cssJayjZens
 
Cascading Style Sheets - CSS - Tutorial
Cascading Style Sheets - CSS  -  TutorialCascading Style Sheets - CSS  -  Tutorial
Cascading Style Sheets - CSS - TutorialMSA Technosoft
 

Was ist angesagt? (20)

Cascading style sheets (CSS)
Cascading style sheets (CSS)Cascading style sheets (CSS)
Cascading style sheets (CSS)
 
Cascading Style Sheets (CSS)
Cascading Style Sheets (CSS)Cascading Style Sheets (CSS)
Cascading Style Sheets (CSS)
 
Introduction to css
Introduction to cssIntroduction to css
Introduction to css
 
Session v(css)
Session v(css)Session v(css)
Session v(css)
 
Introduction to css
Introduction to cssIntroduction to css
Introduction to css
 
Cascading Style Sheets
Cascading Style SheetsCascading Style Sheets
Cascading Style Sheets
 
Cascading Style Sheet (CSS)
Cascading Style Sheet (CSS)Cascading Style Sheet (CSS)
Cascading Style Sheet (CSS)
 
Cascading Style Sheet
Cascading Style SheetCascading Style Sheet
Cascading Style Sheet
 
Introduction to css & its attributes with syntax
Introduction to css & its attributes with syntaxIntroduction to css & its attributes with syntax
Introduction to css & its attributes with syntax
 
Cascading Style Sheet
Cascading Style SheetCascading Style Sheet
Cascading Style Sheet
 
Week 12 CSS - Review from last week
Week 12 CSS - Review from last weekWeek 12 CSS - Review from last week
Week 12 CSS - Review from last week
 
Html, css and jquery introduction
Html, css and jquery introductionHtml, css and jquery introduction
Html, css and jquery introduction
 
HTML and CSS
HTML and CSSHTML and CSS
HTML and CSS
 
Basic HTML/CSS
Basic HTML/CSSBasic HTML/CSS
Basic HTML/CSS
 
CSS
CSS CSS
CSS
 
Cascading Style Sheets (CSS) help
Cascading Style Sheets (CSS) helpCascading Style Sheets (CSS) help
Cascading Style Sheets (CSS) help
 
Cascading style sheets
Cascading style sheetsCascading style sheets
Cascading style sheets
 
Cascading style sheets
Cascading style sheetsCascading style sheets
Cascading style sheets
 
Styling of css
Styling of cssStyling of css
Styling of css
 
Cascading Style Sheets - CSS - Tutorial
Cascading Style Sheets - CSS  -  TutorialCascading Style Sheets - CSS  -  Tutorial
Cascading Style Sheets - CSS - Tutorial
 

Andere mochten auch

Introduction to computers
Introduction to computersIntroduction to computers
Introduction to computersAkash Varaiya
 
Page Layout 2010
Page Layout 2010Page Layout 2010
Page Layout 2010Cathie101
 
The Box Model [CSS Introduction]
The Box Model [CSS Introduction]The Box Model [CSS Introduction]
The Box Model [CSS Introduction]Nicole Ryan
 
CSS Box Model and Dimensions
CSS Box Model and DimensionsCSS Box Model and Dimensions
CSS Box Model and DimensionsGerson Abesamis
 
Introduction to computers new 2010
Introduction to computers new 2010Introduction to computers new 2010
Introduction to computers new 2010Cyrus Kyle
 
End User Computing (EUC)
End User Computing (EUC)End User Computing (EUC)
End User Computing (EUC)Jashisha Gupta
 
Introduction To Computers
Introduction To ComputersIntroduction To Computers
Introduction To ComputersDoug Baldwin
 
CSS Layout Techniques
CSS Layout TechniquesCSS Layout Techniques
CSS Layout TechniquesHarshal Patil
 
Chapter 01 - Introduction to Computers
Chapter 01 - Introduction to ComputersChapter 01 - Introduction to Computers
Chapter 01 - Introduction to ComputersAchmad Solichin
 
CSS Box Model Presentation
CSS Box Model PresentationCSS Box Model Presentation
CSS Box Model PresentationReed Crouch
 
CSS Layouting #3 : Box Model
CSS Layouting #3 : Box ModelCSS Layouting #3 : Box Model
CSS Layouting #3 : Box ModelSandhika Galih
 
Template & Content Control (Basics) - Microsoft Word 2013
Template & Content Control (Basics) - Microsoft Word 2013Template & Content Control (Basics) - Microsoft Word 2013
Template & Content Control (Basics) - Microsoft Word 2013Coco Tan
 
CSS, CSS Selectors, CSS Box Model
CSS, CSS Selectors, CSS Box ModelCSS, CSS Selectors, CSS Box Model
CSS, CSS Selectors, CSS Box Modeljamiecavanaugh
 
Introduction to computers
Introduction to computersIntroduction to computers
Introduction to computersTushar B Kute
 
Introduction to computers pdf
Introduction to computers pdfIntroduction to computers pdf
Introduction to computers pdfblufishocean
 

Andere mochten auch (20)

Css page layout
Css page layoutCss page layout
Css page layout
 
Introduction to computers
Introduction to computersIntroduction to computers
Introduction to computers
 
Page Layout 2010
Page Layout 2010Page Layout 2010
Page Layout 2010
 
The Box Model [CSS Introduction]
The Box Model [CSS Introduction]The Box Model [CSS Introduction]
The Box Model [CSS Introduction]
 
CSS Box Model and Dimensions
CSS Box Model and DimensionsCSS Box Model and Dimensions
CSS Box Model and Dimensions
 
Css box-model
Css box-modelCss box-model
Css box-model
 
Introduction to computers new 2010
Introduction to computers new 2010Introduction to computers new 2010
Introduction to computers new 2010
 
The CSS Box Model
The CSS Box ModelThe CSS Box Model
The CSS Box Model
 
End User Computing (EUC)
End User Computing (EUC)End User Computing (EUC)
End User Computing (EUC)
 
Introduction To Computers
Introduction To ComputersIntroduction To Computers
Introduction To Computers
 
CSS Layout Techniques
CSS Layout TechniquesCSS Layout Techniques
CSS Layout Techniques
 
Chapter 01 - Introduction to Computers
Chapter 01 - Introduction to ComputersChapter 01 - Introduction to Computers
Chapter 01 - Introduction to Computers
 
CSS Box Model Presentation
CSS Box Model PresentationCSS Box Model Presentation
CSS Box Model Presentation
 
CSS Box Model
CSS Box ModelCSS Box Model
CSS Box Model
 
Css box model
Css  box modelCss  box model
Css box model
 
CSS Layouting #3 : Box Model
CSS Layouting #3 : Box ModelCSS Layouting #3 : Box Model
CSS Layouting #3 : Box Model
 
Template & Content Control (Basics) - Microsoft Word 2013
Template & Content Control (Basics) - Microsoft Word 2013Template & Content Control (Basics) - Microsoft Word 2013
Template & Content Control (Basics) - Microsoft Word 2013
 
CSS, CSS Selectors, CSS Box Model
CSS, CSS Selectors, CSS Box ModelCSS, CSS Selectors, CSS Box Model
CSS, CSS Selectors, CSS Box Model
 
Introduction to computers
Introduction to computersIntroduction to computers
Introduction to computers
 
Introduction to computers pdf
Introduction to computers pdfIntroduction to computers pdf
Introduction to computers pdf
 

Ähnlich wie Lesson One Fourth Quarter Fourth Year High School CSS Modern Layout and Style

Ähnlich wie Lesson One Fourth Quarter Fourth Year High School CSS Modern Layout and Style (20)

CSS Training in Bangalore
CSS Training in BangaloreCSS Training in Bangalore
CSS Training in Bangalore
 
Css
CssCss
Css
 
Cashcading stylesheets
Cashcading stylesheetsCashcading stylesheets
Cashcading stylesheets
 
Lecture-6.pptx
Lecture-6.pptxLecture-6.pptx
Lecture-6.pptx
 
Chapter 3 - CSS.pdf
Chapter 3 - CSS.pdfChapter 3 - CSS.pdf
Chapter 3 - CSS.pdf
 
Css training tutorial css3 &amp; css4 essentials
Css training tutorial css3 &amp; css4 essentialsCss training tutorial css3 &amp; css4 essentials
Css training tutorial css3 &amp; css4 essentials
 
Css inclusion
Css   inclusionCss   inclusion
Css inclusion
 
Css
CssCss
Css
 
Introduction to css
Introduction to cssIntroduction to css
Introduction to css
 
HTML to CSS Basics Exer 2.pptx
HTML to CSS Basics Exer 2.pptxHTML to CSS Basics Exer 2.pptx
HTML to CSS Basics Exer 2.pptx
 
Cascading Style Sheets
Cascading Style SheetsCascading Style Sheets
Cascading Style Sheets
 
This is css which compiled by alex that is impo
This is css which compiled by alex that is impoThis is css which compiled by alex that is impo
This is css which compiled by alex that is impo
 
Full
FullFull
Full
 
Using Cascading Style Sheets2
Using Cascading Style Sheets2Using Cascading Style Sheets2
Using Cascading Style Sheets2
 
Using Templates And Cascading Style Sheets10
Using Templates And Cascading Style Sheets10Using Templates And Cascading Style Sheets10
Using Templates And Cascading Style Sheets10
 
lecture CSS 1-2_2022_2023.pptx
lecture CSS 1-2_2022_2023.pptxlecture CSS 1-2_2022_2023.pptx
lecture CSS 1-2_2022_2023.pptx
 
Css notes
Css notesCss notes
Css notes
 
Css basics
Css basicsCss basics
Css basics
 
Css basics
Css basicsCss basics
Css basics
 
Css introduction
Css  introductionCss  introduction
Css introduction
 

Mehr von Perry Mallari

Film making fourth quarter lesson 2 third year
Film making  fourth quarter lesson 2 third yearFilm making  fourth quarter lesson 2 third year
Film making fourth quarter lesson 2 third yearPerry Mallari
 
Lesson 3 second year fourth quarter s
Lesson 3 second year fourth quarter sLesson 3 second year fourth quarter s
Lesson 3 second year fourth quarter sPerry Mallari
 
Second lesson for first year
Second lesson for first yearSecond lesson for first year
Second lesson for first yearPerry Mallari
 
Part two second year
Part two second yearPart two second year
Part two second yearPerry Mallari
 
Pointers for all year level 4th monthly test
Pointers for all year level 4th monthly testPointers for all year level 4th monthly test
Pointers for all year level 4th monthly testPerry Mallari
 
Part two second year
Part two second yearPart two second year
Part two second yearPerry Mallari
 
Sources for audio lesson two second year fourt quarter
Sources for audio lesson two second year fourt quarterSources for audio lesson two second year fourt quarter
Sources for audio lesson two second year fourt quarterPerry Mallari
 
Second year Lesson Two sources of sound
Second year Lesson Two sources of soundSecond year Lesson Two sources of sound
Second year Lesson Two sources of soundPerry Mallari
 
The three types of style sheet lesson two fourth quarter fourth year
The three types of style sheet lesson two fourth quarter fourth yearThe three types of style sheet lesson two fourth quarter fourth year
The three types of style sheet lesson two fourth quarter fourth yearPerry Mallari
 
Lesson One Fourth QuarterThird Year High School Film Making
Lesson One Fourth QuarterThird Year High School Film MakingLesson One Fourth QuarterThird Year High School Film Making
Lesson One Fourth QuarterThird Year High School Film MakingPerry Mallari
 
Lesson One Fourth Quarter First Year High School Running A Presentation
Lesson One Fourth Quarter First Year High School Running A PresentationLesson One Fourth Quarter First Year High School Running A Presentation
Lesson One Fourth Quarter First Year High School Running A PresentationPerry Mallari
 
Lesson One Fourth Quarter Second Year High School Understanding Sounds
Lesson One Fourth Quarter Second Year High School Understanding SoundsLesson One Fourth Quarter Second Year High School Understanding Sounds
Lesson One Fourth Quarter Second Year High School Understanding SoundsPerry Mallari
 

Mehr von Perry Mallari (14)

Film making fourth quarter lesson 2 third year
Film making  fourth quarter lesson 2 third yearFilm making  fourth quarter lesson 2 third year
Film making fourth quarter lesson 2 third year
 
Lesson 3 second year fourth quarter s
Lesson 3 second year fourth quarter sLesson 3 second year fourth quarter s
Lesson 3 second year fourth quarter s
 
Second lesson for first year
Second lesson for first yearSecond lesson for first year
Second lesson for first year
 
Slide Design
Slide DesignSlide Design
Slide Design
 
Part two second year
Part two second yearPart two second year
Part two second year
 
Pointers for all year level 4th monthly test
Pointers for all year level 4th monthly testPointers for all year level 4th monthly test
Pointers for all year level 4th monthly test
 
Part two second year
Part two second yearPart two second year
Part two second year
 
Q and a god father
Q and a god fatherQ and a god father
Q and a god father
 
Sources for audio lesson two second year fourt quarter
Sources for audio lesson two second year fourt quarterSources for audio lesson two second year fourt quarter
Sources for audio lesson two second year fourt quarter
 
Second year Lesson Two sources of sound
Second year Lesson Two sources of soundSecond year Lesson Two sources of sound
Second year Lesson Two sources of sound
 
The three types of style sheet lesson two fourth quarter fourth year
The three types of style sheet lesson two fourth quarter fourth yearThe three types of style sheet lesson two fourth quarter fourth year
The three types of style sheet lesson two fourth quarter fourth year
 
Lesson One Fourth QuarterThird Year High School Film Making
Lesson One Fourth QuarterThird Year High School Film MakingLesson One Fourth QuarterThird Year High School Film Making
Lesson One Fourth QuarterThird Year High School Film Making
 
Lesson One Fourth Quarter First Year High School Running A Presentation
Lesson One Fourth Quarter First Year High School Running A PresentationLesson One Fourth Quarter First Year High School Running A Presentation
Lesson One Fourth Quarter First Year High School Running A Presentation
 
Lesson One Fourth Quarter Second Year High School Understanding Sounds
Lesson One Fourth Quarter Second Year High School Understanding SoundsLesson One Fourth Quarter Second Year High School Understanding Sounds
Lesson One Fourth Quarter Second Year High School Understanding Sounds
 

Kürzlich hochgeladen

Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-IIFood Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-IIShubhangi Sonawane
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptxMaritesTamaniVerdade
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfPoh-Sun Goh
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701bronxfugly43
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docxPoojaSen20
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxDenish Jangid
 
Energy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural Resources
Energy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural ResourcesEnergy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural Resources
Energy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural ResourcesShubhangi Sonawane
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...christianmathematics
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...Poonam Aher Patil
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
Role Of Transgenic Animal In Target Validation-1.pptx
Role Of Transgenic Animal In Target Validation-1.pptxRole Of Transgenic Animal In Target Validation-1.pptx
Role Of Transgenic Animal In Target Validation-1.pptxNikitaBankoti2
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxnegromaestrong
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...Nguyen Thanh Tu Collection
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 

Kürzlich hochgeladen (20)

Asian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptxAsian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptx
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-IIFood Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Energy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural Resources
Energy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural ResourcesEnergy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural Resources
Energy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural Resources
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Role Of Transgenic Animal In Target Validation-1.pptx
Role Of Transgenic Animal In Target Validation-1.pptxRole Of Transgenic Animal In Target Validation-1.pptx
Role Of Transgenic Animal In Target Validation-1.pptx
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 

Lesson One Fourth Quarter Fourth Year High School CSS Modern Layout and Style

  • 1. CSS: Modern Layout and Style MODERN SCRIPTING
  • 2. What is CSS?  It is a language that defines how page elements marked up with HTML or XHTML are displayed in the web browser or on other devices.  Example, how a page is printed.  CSS is like a “template” that defines the way that each HTML element looks when displayed.
  • 3. CSS 1  It became a recommendation in December 1996  It mainly provides methods of styling text- thus replacing the <font> tag. Which is deprecated in HTML 4.
  • 4. Lets try this: <html> <head> <title>Unstyled Example</title> </head> <body> <h1>hello world!</h1> <p>This is Structural XHTML</p> </body> </html>
  • 6. Same Code but with external sheet(using the link element) <html> <head> <title>CSS Example</title> <link rel="stylesheet" type="text/css" href="test.css" /> </head> <body> <h1>hello world!</h1> <p>This is Structural XHTML</p> </body> </html>
  • 7. Whats inside the test.css link? h1 { color:#339900; background-color: Transparent; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; } p{ color:#003399; background-color: Transparent; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; }
  • 8. Output of the two Codes
  • 9. What was inside the CSS file?  The mark up consists of two rule sets, one for h1 (text within <h1></h1> tags)  And one for p (text within <p></p> tags).
  • 10. Lets examine the code  Each of the rule sets consists of the selector (for example, h1 or p)  A pair of curly braces ( { } )  Inside the curly braces are the directives, which states how you wish the selector to be displayed in the screen  The directive themselves consist of property and value combinations separated by a colon (:).  In English, you are saying “this is what to change , and this is the value I want to change it to”.
  • 11. Defining Styles  You only need to define how you want your tags to be styled once.  If further <h1> and <p> elements are added to the HTML documents, they will also be styled by the CSS.
  • 12. CSS in NotePad  You may use the NotePad in encoding the stylesheet that you want to use in your CSS file.  Once that you defined the stylesheet, you can save it using the extension name .css like the one we used in the example “text.css”.
  • 13. CSS2  It became a recommendation in May 1998  It builds on the CSS1 specification, adding support for positioning elements (meaning images, blocks of text, or other items on your pages) and support for different “media descriptors”.
  • 14. CSS3  It is still in development and brings with a new, modular, approach to CSS in order that devices that do not have the capability to support the entire specification can support necessary modules.  As of November 2011, there are over 50 CSS modules published from the CSS Working Group. Some of these are Selectors, Namspaces and Color and are all recommended by the W3C in 2011.
  • 15. Separating Document Structures from Presentation  Document structure includes your content, marked up in a logical way by the us of tags that describe the content‟s meaning rather than how it should be displayed. This include paragraphs (<p>), heading levels (h1 to h6), line breaks (<br />), references to image files (<img>), hyperlinks to other documents (<a>) and divs and spans (<div> and <span>)  Presentation means any way of describing how the document structure should be displayed. This is the whole purpose of CSS, but in HTML this includes color attributes, align attributes, <center> elements, and <font> elements.
  • 16. Ways of Implementing CSS    Inline CSS Embedded CSS External Stylesheet
  • 17. Inline CSS  These are applied to one page element at a time within the flow of the document. They use a style attribute with a value equal to the declaration part of the rules below:  <h1 style="color:sienna;margin-left:20px;">This is a paragraph.</h1>  This style will only effect this heading and if you make another, you have to type again the code.  An inline style loses many of the advantages of style sheets by mixing content with presentation. Use this method sparingly!
  • 18.
  • 19. Embedded CSS  Is one that is placed within a <style> element between the <head> and the </head> tags of a document.  The style rules described in it will only affect that particular document.
  • 20. Embedded CSS <html> <head> <title>Embedded CSS Example</title> <style type=“text/css”> h2 { Font-family: Verdana, Arial, Helvetica, sans-serif; Color:#cc99cc; } </style> </head> <body> <h2> Text to be styled </h2> </body> </html>
  • 21. External Stylesheets  This style allows you to fully benefit from CSS.  To make an external stylesheet, you simply take a simple style rules and place them into a file with the extension name „.css‟ then link it to the document you want it affected.
  • 22. h2 { font-family: Verdana, Arial, Helvetica, sans-serif; color: #cc99cc; }  Save it as global.css,
  • 23. then attach it to your document by adding the follow line code between <head></head> tags of your HTML document: <html> <head> <title> External CSS Example</title> <link rel="stylesheet" type="text/css" href="global.css" /> </head> <body> <h2> Text to be styled using the external stylesheet. </h2> </body> </html>