SlideShare a Scribd company logo
Understanding CSS
Using the Internal Method, External Method,
and Inline Style to Insert CSS Code
Engr. Esmeraldo T. Guimbarda Jr.
What is CSS
CSS stands for Cascading Style Sheets. They are a
way to control the look and feel of your HTML
documents in an organized and efficient manner. With
CSS you will be able to:
• Add new looks to your old HTML
• Completely restyle a web site with only a few
changes to your CSS code
• Use the “style” you created on other
webpages/websites
A style sheet can, and should be, completely separate
from your HTML documents. When you have mastered
CSS and HTML, you will be able to separate your
website’s design and formatting (CSS) from the
content (HTML).
BENEFITS OF USING CSS
• Consistency
If you make one change to your website’s CSS style
sheet, the change can automatically apply to every
page of the website. The bigger your website, the
more time CSS saves you.
• Bandwidth Reduction
When CSS separates your website's content from its
design language, you dramatically reduce your file
transfer size. Your reduced bandwidth needs will result
in a faster load time and could cut your web hosting
costs.
• Search Engines
CSS is considered a clean coding technique, which
means search engines won't have to struggle to "read"
its content.
• Browser Compatibility
CSS stylesheets increase your website's adaptability
and ensure that more visitors will be able to view your
website in the way you intended.
• Viewing Options
Another common web design concern is the increasing
need to make websites available for different media.
CSS can help you tackle this challenge by allowing the
same markup page to be presented in different
viewing styles —— for example, you may create a
separate stylesheet for print or for a mobile device.
CSS SYNTAX
The CSS syntax is different from that of HTML, though
it is not too confusing once you take a look at it. It
consists of 3 parts.
Each selector can have multiple properties, and each
property within that selector can have independent
values. The property and value are separated with a
colon and contained within curly brackets. Multiple
properties are separated by a semi colon. Multiple
values within a property are sperated by commas, and
if an individual value contains more than one word you
surround it with quotation marks, as shown below:
INHERITANCE
When you nest one element inside another, the nested
element will inherit the properties assigned to the
containing element. Unless you modify the inner
elements values independently.
For example, a font declared in the body will be
inherited by all text in the file no matter the
containing element, unless you declare another font
for a specific nested element.
Now all text within the HTML file will be set to
Verdana.
If you wanted to style certain text with another font,
like an h1 or a paragraph then you could do the
following:
Now all <h1> tags within the file will be set to
Georgia and all <p> tags are set to Tahoma, leaving
text within other elements unchanged from the body
declaration of Verdana.
Combining Selectors
You can combine elements within one selector in the
following fashion:
As you can see in the above code, The header
elements have been grouped into one selector. Each
one is separated by a comma. The final result of the
above code sets all headers to green and to the
specified font.
Comment Tags
Comments can be used to explain why you added
certain selectors within your css file. They are also
used to help others who may see your file, or to help
you remember what you we’re thinking at a later date.
You can add comments that will be ignored by
browsers in the following manner:
Inserting a CSS Code
Internal Style Sheet
An internal style sheet should be used when a single
document has a unique style. You define internal
styles in the head section of an HTML page, by using
the <style> tag, like this:
External Style Sheet
An external CSS file can be created with any text or
HTML editor such as Notepad or Dreamweaver. A CSS
file contains no HTML code, only CSS. You simply save
it with the .css file extension. You can link to the file
externally by placing one of the following links in the
head section of every HTML file you want to style with
the CSS file:
Or you can also use the @import method as shown
below:
By using an external style sheet, all of your HTML
files link to one CSS file in order to style the pages.
This means that if you need to alter the design of all
your pages, you only need to edit one .css file to
make global changes to your entire website.
CSS vs. Inline Styles
Inline styles are defined right in the HTML file
alongside the element you want to style. See example
below:
Activity
1. Open Notepad++. Click on Start > All Programs >
Notepad++ folder > Notepad++.
2. Create a new HTML file by clicking File > New, or
pressing Ctrl+N on your keyboard.
3. Save the HTML file
* Create a folder named “songs” and go to that folder
* Save the file as “index.html”.
Note: To save the file, go to File > Save As. Type
“index.html” in the File name box. Select Hypertext
Markup Language file in the Save as type selection
menu. Save the file in your desktop.
4. Type the basic skeleton code of an HTML document
in index.html. Define the title as “’s Songs”. In this
case, we’ll use “The Script’s Songs” as an example.
5. Let’s put the content of the body. Add a heading
using the < h1 > tag and define it as “< Your Favorite
Band >’s Songs”, similar to what you’ve typed in the
title. Display three of your favorite band’s songs as
links using the href attribute. Each of them should link
to an html file whose file name is identical to the song
title.
6. Create the html files for the three songs you have
listed. For every song, click File > New, then File >
Save As. Type the song title in the File name box.
Select Hypertext Markup Language file in the Save as
type selection menu. Save the file on the folder
created (song folder).
7. Type the basic skeleton code of an HTML document
in the html file of each song. Define the title as the
actual song title.
8. Encode the lyrics of each song (chorus) , and place
them on the body of the corresponding html file using
a paragraph tag (< p >). Add a heading and define it
as “< Band Name > - < Song Title >”. Add a line
break (< /br >) after every line of the lyrics.
9. At the end of each lyrics, add a link that goes back
to index.html and name it “Back”. Sample code:
< a href = “index.html>Back< /a>
10. Insert CSS code using the internal method to
modify the appearance of the first song’s page. The
code should be placed between the < head > and <
/head > tags. The code should be able to change the
body’s background and font family. Sample code:
11. To modify the appearance of the second song’s
page using the external method, you must first create
an External Style Sheet. Click File > New, then File >
Save As. Type “style.css” on the File name box. Select
Cascade Style Sheets File in the Save as type selection
menu. Save the file on your songs folder.
12. Add CSS code to your External Style Sheet. The file
should not contain any HTML tags. The code should be
able to change the body’s background and font family.
Sample code:
13. Link the second song’s html file to the external
stylesheet. Add this code between the < head > and <
/head > tags:
< link rel="stylesheet" type="text/css" href="style.
css" />
14. Insert CSS code using the inline style to modify the
appearance of the third song’s page. The code should
be able to change the body’s background and font
family, therefore the code should be inserted in the <
body > tag. Sample code:
15. Save the file by clicking the Save all icon . Open
the index.html file in a web browser.

More Related Content

What's hot

N5 CSS
N5 CSSN5 CSS
Introduction to HTML
Introduction to HTMLIntroduction to HTML
Introduction to HTML
yht4ever
 
Html and its tags
Html and its tagsHtml and its tags
Html and its tags
Afrasiyab Haider
 
HTML email design and usability
HTML email design and usabilityHTML email design and usability
HTML email design and usability
Keith Kmett
 
PPT on Basic HTML Tags
PPT on Basic HTML TagsPPT on Basic HTML Tags
PPT on Basic HTML Tags
VinitaPaliwal1
 
Website Structure Games Class #2
Website Structure Games Class #2Website Structure Games Class #2
Website Structure Games Class #2
Holly Akers
 
html tags
 html tags html tags
html tags
YogeshDhamke2
 
How to create basic webpage
How to create basic webpageHow to create basic webpage
How to create basic webpage
James Erro
 
Web Page Designing Using HTML
Web Page Designing Using HTMLWeb Page Designing Using HTML
Web Page Designing Using HTML
Arunima Education Foundation
 
Coding a Website with HTML
Coding a Website with HTMLCoding a Website with HTML
Coding a Website with HTMLwrhsbusiness
 
Html tags
Html tagsHtml tags
Html tags
sotero66
 
Introduction to web design discussing which languages is used for website des...
Introduction to web design discussing which languages is used for website des...Introduction to web design discussing which languages is used for website des...
Introduction to web design discussing which languages is used for website des...
Aditya Dwivedi
 
Introduction to HTML
Introduction to HTMLIntroduction to HTML
Introduction to HTML
Ameer Khan
 
Lesson 1: Introduction to HTML
Lesson 1: Introduction to HTMLLesson 1: Introduction to HTML
Lesson 1: Introduction to HTML
Olivia Moran
 
Html 5
Html 5Html 5
Styling of css
Styling of cssStyling of css
Styling of css
JayjZens
 
Introduction to HTML
Introduction to HTMLIntroduction to HTML
Introduction to HTML
Ann Alcid
 

What's hot (20)

N5 CSS
N5 CSSN5 CSS
N5 CSS
 
Introduction to HTML
Introduction to HTMLIntroduction to HTML
Introduction to HTML
 
Html and its tags
Html and its tagsHtml and its tags
Html and its tags
 
HTML email design and usability
HTML email design and usabilityHTML email design and usability
HTML email design and usability
 
PPT on Basic HTML Tags
PPT on Basic HTML TagsPPT on Basic HTML Tags
PPT on Basic HTML Tags
 
Website Structure Games Class #2
Website Structure Games Class #2Website Structure Games Class #2
Website Structure Games Class #2
 
html tags
 html tags html tags
html tags
 
How to create basic webpage
How to create basic webpageHow to create basic webpage
How to create basic webpage
 
CSS in HTML
CSS in HTMLCSS in HTML
CSS in HTML
 
Coding
CodingCoding
Coding
 
Web Page Designing Using HTML
Web Page Designing Using HTMLWeb Page Designing Using HTML
Web Page Designing Using HTML
 
Coding a Website with HTML
Coding a Website with HTMLCoding a Website with HTML
Coding a Website with HTML
 
Html tags
Html tagsHtml tags
Html tags
 
Introduction to web design discussing which languages is used for website des...
Introduction to web design discussing which languages is used for website des...Introduction to web design discussing which languages is used for website des...
Introduction to web design discussing which languages is used for website des...
 
Introduction to HTML
Introduction to HTMLIntroduction to HTML
Introduction to HTML
 
Intro to HTML
Intro to HTMLIntro to HTML
Intro to HTML
 
Lesson 1: Introduction to HTML
Lesson 1: Introduction to HTMLLesson 1: Introduction to HTML
Lesson 1: Introduction to HTML
 
Html 5
Html 5Html 5
Html 5
 
Styling of css
Styling of cssStyling of css
Styling of css
 
Introduction to HTML
Introduction to HTMLIntroduction to HTML
Introduction to HTML
 

Similar to Tm 1st quarter - 3rd meeting

Cascading Style Sheets (CSS) help
Cascading Style Sheets (CSS) helpCascading Style Sheets (CSS) help
Cascading Style Sheets (CSS) help
casestudyhelp
 
Css introduction
Css introductionCss introduction
Css introductionSridhar P
 
Css basics
Css basicsCss basics
Css basics
Franc Santos
 
Css basics
Css basicsCss basics
Css basics
Franc Santos
 
CSS Training in Bangalore
CSS Training in BangaloreCSS Training in Bangalore
CSS Training in Bangalore
rajkamal560066
 
Chapter 3 - CSS.pdf
Chapter 3 - CSS.pdfChapter 3 - CSS.pdf
Chapter 3 - CSS.pdf
wubiederebe1
 
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
JJFajardo1
 
Css Basics
Css BasicsCss Basics
Css Basics
Jay Patel
 
chitra
chitrachitra
chitra
sweet chitra
 
Using Templates And Cascading Style Sheets10
Using Templates And Cascading Style Sheets10Using Templates And Cascading Style Sheets10
Using Templates And Cascading Style Sheets10Sutinder Mann
 
Using Cascading Style Sheets2
Using Cascading Style Sheets2Using Cascading Style Sheets2
Using Cascading Style Sheets2Sutinder Mann
 
CSS.ppt
CSS.pptCSS.ppt
Shyam sunder Rajasthan Computer
Shyam sunder Rajasthan ComputerShyam sunder Rajasthan Computer
Shyam sunder Rajasthan Computer
shyamverma305
 
Css
CssCss
Css
CssCss
Css introduction
Css  introductionCss  introduction
Css introduction
vishnu murthy
 

Similar to Tm 1st quarter - 3rd meeting (20)

Cascading Style Sheets (CSS) help
Cascading Style Sheets (CSS) helpCascading Style Sheets (CSS) help
Cascading Style Sheets (CSS) help
 
Introduction to css
Introduction to cssIntroduction to css
Introduction to css
 
Css introduction
Css introductionCss introduction
Css introduction
 
Css notes
Css notesCss notes
Css notes
 
Css basics
Css basicsCss basics
Css basics
 
Css basics
Css basicsCss basics
Css basics
 
CSS Training in Bangalore
CSS Training in BangaloreCSS Training in Bangalore
CSS Training in Bangalore
 
Chapter 3 - CSS.pdf
Chapter 3 - CSS.pdfChapter 3 - CSS.pdf
Chapter 3 - CSS.pdf
 
Lecture-6.pptx
Lecture-6.pptxLecture-6.pptx
Lecture-6.pptx
 
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
 
Css Basics
Css BasicsCss Basics
Css Basics
 
chitra
chitrachitra
chitra
 
Using Templates And Cascading Style Sheets10
Using Templates And Cascading Style Sheets10Using Templates And Cascading Style Sheets10
Using Templates And Cascading Style Sheets10
 
Using Cascading Style Sheets2
Using Cascading Style Sheets2Using Cascading Style Sheets2
Using Cascading Style Sheets2
 
Css
CssCss
Css
 
CSS.ppt
CSS.pptCSS.ppt
CSS.ppt
 
Shyam sunder Rajasthan Computer
Shyam sunder Rajasthan ComputerShyam sunder Rajasthan Computer
Shyam sunder Rajasthan Computer
 
Css
CssCss
Css
 
Css
CssCss
Css
 
Css introduction
Css  introductionCss  introduction
Css introduction
 

More from Esmeraldo Jr Guimbarda

TM 2nd qtr-3ndmeeting(java script-functions)
TM 2nd qtr-3ndmeeting(java script-functions)TM 2nd qtr-3ndmeeting(java script-functions)
TM 2nd qtr-3ndmeeting(java script-functions)
Esmeraldo Jr Guimbarda
 
TM 2nd qtr-2ndmeeting(java script-animations)
TM 2nd qtr-2ndmeeting(java script-animations)TM 2nd qtr-2ndmeeting(java script-animations)
TM 2nd qtr-2ndmeeting(java script-animations)
Esmeraldo Jr Guimbarda
 
2nd quarter 1st meeting(autofill)
2nd quarter   1st meeting(autofill)2nd quarter   1st meeting(autofill)
2nd quarter 1st meeting(autofill)
Esmeraldo Jr Guimbarda
 
2ndQuarter2ndMeeting(formatting number)
2ndQuarter2ndMeeting(formatting number)2ndQuarter2ndMeeting(formatting number)
2ndQuarter2ndMeeting(formatting number)
Esmeraldo Jr Guimbarda
 
TM 2nd Quarter - 1st meeting(html backgrounds)
TM 2nd Quarter - 1st meeting(html backgrounds)TM 2nd Quarter - 1st meeting(html backgrounds)
TM 2nd Quarter - 1st meeting(html backgrounds)
Esmeraldo Jr Guimbarda
 
Debugging the mastery test
Debugging the mastery testDebugging the mastery test
Debugging the mastery test
Esmeraldo Jr Guimbarda
 
TM 1st quarter - 4th meeting
TM   1st quarter - 4th meetingTM   1st quarter - 4th meeting
TM 1st quarter - 4th meeting
Esmeraldo Jr Guimbarda
 
1st quarter 5th meeting- spreadsheet (formula- mdas)
1st quarter   5th meeting- spreadsheet (formula- mdas)1st quarter   5th meeting- spreadsheet (formula- mdas)
1st quarter 5th meeting- spreadsheet (formula- mdas)
Esmeraldo Jr Guimbarda
 
1st quarter 5th meeting
1st quarter   5th meeting1st quarter   5th meeting
1st quarter 5th meeting
Esmeraldo Jr Guimbarda
 
1st qtr 4th meeting-travel
1st qtr   4th meeting-travel1st qtr   4th meeting-travel
1st qtr 4th meeting-travel
Esmeraldo Jr Guimbarda
 
1st qtr 5th meeting-travel
1st qtr   5th meeting-travel1st qtr   5th meeting-travel
1st qtr 5th meeting-travel
Esmeraldo Jr Guimbarda
 
1st quarter 4th meeting- spreadsheet
1st quarter   4th meeting- spreadsheet1st quarter   4th meeting- spreadsheet
1st quarter 4th meeting- spreadsheet
Esmeraldo Jr Guimbarda
 
1st qtr 3rd meeting-travel
1st qtr   3rd meeting-travel1st qtr   3rd meeting-travel
1st qtr 3rd meeting-travel
Esmeraldo Jr Guimbarda
 
1st quarter 3rd meeting- spreadsheet
1st quarter   3rd meeting- spreadsheet1st quarter   3rd meeting- spreadsheet
1st quarter 3rd meeting- spreadsheet
Esmeraldo Jr Guimbarda
 
1st quarter 3rd meeting(poet)
1st quarter   3rd meeting(poet)1st quarter   3rd meeting(poet)
1st quarter 3rd meeting(poet)
Esmeraldo Jr Guimbarda
 
1st quarter 2nd meeting(poet)
1st quarter   2nd meeting(poet)1st quarter   2nd meeting(poet)
1st quarter 2nd meeting(poet)
Esmeraldo Jr Guimbarda
 
1st quarter 1st meeting(poet)
1st quarter   1st meeting(poet)1st quarter   1st meeting(poet)
1st quarter 1st meeting(poet)
Esmeraldo Jr Guimbarda
 
1st qtr 2nd metting- travel
1st qtr   2nd metting- travel1st qtr   2nd metting- travel
1st qtr 2nd metting- travel
Esmeraldo Jr Guimbarda
 
1st quarter 2nd meeting- spreadsheet
1st quarter   2nd meeting- spreadsheet1st quarter   2nd meeting- spreadsheet
1st quarter 2nd meeting- spreadsheet
Esmeraldo Jr Guimbarda
 
Tm 1st quarter - 2nd meeting
Tm   1st quarter - 2nd meetingTm   1st quarter - 2nd meeting
Tm 1st quarter - 2nd meeting
Esmeraldo Jr Guimbarda
 

More from Esmeraldo Jr Guimbarda (20)

TM 2nd qtr-3ndmeeting(java script-functions)
TM 2nd qtr-3ndmeeting(java script-functions)TM 2nd qtr-3ndmeeting(java script-functions)
TM 2nd qtr-3ndmeeting(java script-functions)
 
TM 2nd qtr-2ndmeeting(java script-animations)
TM 2nd qtr-2ndmeeting(java script-animations)TM 2nd qtr-2ndmeeting(java script-animations)
TM 2nd qtr-2ndmeeting(java script-animations)
 
2nd quarter 1st meeting(autofill)
2nd quarter   1st meeting(autofill)2nd quarter   1st meeting(autofill)
2nd quarter 1st meeting(autofill)
 
2ndQuarter2ndMeeting(formatting number)
2ndQuarter2ndMeeting(formatting number)2ndQuarter2ndMeeting(formatting number)
2ndQuarter2ndMeeting(formatting number)
 
TM 2nd Quarter - 1st meeting(html backgrounds)
TM 2nd Quarter - 1st meeting(html backgrounds)TM 2nd Quarter - 1st meeting(html backgrounds)
TM 2nd Quarter - 1st meeting(html backgrounds)
 
Debugging the mastery test
Debugging the mastery testDebugging the mastery test
Debugging the mastery test
 
TM 1st quarter - 4th meeting
TM   1st quarter - 4th meetingTM   1st quarter - 4th meeting
TM 1st quarter - 4th meeting
 
1st quarter 5th meeting- spreadsheet (formula- mdas)
1st quarter   5th meeting- spreadsheet (formula- mdas)1st quarter   5th meeting- spreadsheet (formula- mdas)
1st quarter 5th meeting- spreadsheet (formula- mdas)
 
1st quarter 5th meeting
1st quarter   5th meeting1st quarter   5th meeting
1st quarter 5th meeting
 
1st qtr 4th meeting-travel
1st qtr   4th meeting-travel1st qtr   4th meeting-travel
1st qtr 4th meeting-travel
 
1st qtr 5th meeting-travel
1st qtr   5th meeting-travel1st qtr   5th meeting-travel
1st qtr 5th meeting-travel
 
1st quarter 4th meeting- spreadsheet
1st quarter   4th meeting- spreadsheet1st quarter   4th meeting- spreadsheet
1st quarter 4th meeting- spreadsheet
 
1st qtr 3rd meeting-travel
1st qtr   3rd meeting-travel1st qtr   3rd meeting-travel
1st qtr 3rd meeting-travel
 
1st quarter 3rd meeting- spreadsheet
1st quarter   3rd meeting- spreadsheet1st quarter   3rd meeting- spreadsheet
1st quarter 3rd meeting- spreadsheet
 
1st quarter 3rd meeting(poet)
1st quarter   3rd meeting(poet)1st quarter   3rd meeting(poet)
1st quarter 3rd meeting(poet)
 
1st quarter 2nd meeting(poet)
1st quarter   2nd meeting(poet)1st quarter   2nd meeting(poet)
1st quarter 2nd meeting(poet)
 
1st quarter 1st meeting(poet)
1st quarter   1st meeting(poet)1st quarter   1st meeting(poet)
1st quarter 1st meeting(poet)
 
1st qtr 2nd metting- travel
1st qtr   2nd metting- travel1st qtr   2nd metting- travel
1st qtr 2nd metting- travel
 
1st quarter 2nd meeting- spreadsheet
1st quarter   2nd meeting- spreadsheet1st quarter   2nd meeting- spreadsheet
1st quarter 2nd meeting- spreadsheet
 
Tm 1st quarter - 2nd meeting
Tm   1st quarter - 2nd meetingTm   1st quarter - 2nd meeting
Tm 1st quarter - 2nd meeting
 

Recently uploaded

Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
Jean Carlos Nunes Paixão
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
TechSoup
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
SACHIN R KONDAGURI
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
Levi Shapiro
 
PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.
Dr. Shivangi Singh Parihar
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
Nguyen Thanh Tu Collection
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
EugeneSaldivar
 
Digital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental DesignDigital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental Design
amberjdewit93
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
Ashokrao Mane college of Pharmacy Peth-Vadgaon
 
A Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptxA Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptx
thanhdowork
 
MASS MEDIA STUDIES-835-CLASS XI Resource Material.pdf
MASS MEDIA STUDIES-835-CLASS XI Resource Material.pdfMASS MEDIA STUDIES-835-CLASS XI Resource Material.pdf
MASS MEDIA STUDIES-835-CLASS XI Resource Material.pdf
goswamiyash170123
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
Delapenabediema
 
Pride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School DistrictPride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School District
David Douglas School District
 
Assignment_4_ArianaBusciglio Marvel(1).docx
Assignment_4_ArianaBusciglio Marvel(1).docxAssignment_4_ArianaBusciglio Marvel(1).docx
Assignment_4_ArianaBusciglio Marvel(1).docx
ArianaBusciglio
 
How to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP ModuleHow to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP Module
Celine George
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
heathfieldcps1
 
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat  Leveraging AI for Diversity, Equity, and InclusionExecutive Directors Chat  Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
TechSoup
 
Aficamten in HCM (SEQUOIA HCM TRIAL 2024)
Aficamten in HCM (SEQUOIA HCM TRIAL 2024)Aficamten in HCM (SEQUOIA HCM TRIAL 2024)
Aficamten in HCM (SEQUOIA HCM TRIAL 2024)
Ashish Kohli
 
MATATAG CURRICULUM: ASSESSING THE READINESS OF ELEM. PUBLIC SCHOOL TEACHERS I...
MATATAG CURRICULUM: ASSESSING THE READINESS OF ELEM. PUBLIC SCHOOL TEACHERS I...MATATAG CURRICULUM: ASSESSING THE READINESS OF ELEM. PUBLIC SCHOOL TEACHERS I...
MATATAG CURRICULUM: ASSESSING THE READINESS OF ELEM. PUBLIC SCHOOL TEACHERS I...
NelTorrente
 
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdfANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
Priyankaranawat4
 

Recently uploaded (20)

Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
 
PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
 
Digital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental DesignDigital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental Design
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
 
A Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptxA Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptx
 
MASS MEDIA STUDIES-835-CLASS XI Resource Material.pdf
MASS MEDIA STUDIES-835-CLASS XI Resource Material.pdfMASS MEDIA STUDIES-835-CLASS XI Resource Material.pdf
MASS MEDIA STUDIES-835-CLASS XI Resource Material.pdf
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
 
Pride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School DistrictPride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School District
 
Assignment_4_ArianaBusciglio Marvel(1).docx
Assignment_4_ArianaBusciglio Marvel(1).docxAssignment_4_ArianaBusciglio Marvel(1).docx
Assignment_4_ArianaBusciglio Marvel(1).docx
 
How to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP ModuleHow to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP Module
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
 
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat  Leveraging AI for Diversity, Equity, and InclusionExecutive Directors Chat  Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
 
Aficamten in HCM (SEQUOIA HCM TRIAL 2024)
Aficamten in HCM (SEQUOIA HCM TRIAL 2024)Aficamten in HCM (SEQUOIA HCM TRIAL 2024)
Aficamten in HCM (SEQUOIA HCM TRIAL 2024)
 
MATATAG CURRICULUM: ASSESSING THE READINESS OF ELEM. PUBLIC SCHOOL TEACHERS I...
MATATAG CURRICULUM: ASSESSING THE READINESS OF ELEM. PUBLIC SCHOOL TEACHERS I...MATATAG CURRICULUM: ASSESSING THE READINESS OF ELEM. PUBLIC SCHOOL TEACHERS I...
MATATAG CURRICULUM: ASSESSING THE READINESS OF ELEM. PUBLIC SCHOOL TEACHERS I...
 
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdfANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
 

Tm 1st quarter - 3rd meeting

  • 1. Understanding CSS Using the Internal Method, External Method, and Inline Style to Insert CSS Code Engr. Esmeraldo T. Guimbarda Jr.
  • 2. What is CSS CSS stands for Cascading Style Sheets. They are a way to control the look and feel of your HTML documents in an organized and efficient manner. With CSS you will be able to: • Add new looks to your old HTML • Completely restyle a web site with only a few changes to your CSS code • Use the “style” you created on other webpages/websites
  • 3. A style sheet can, and should be, completely separate from your HTML documents. When you have mastered CSS and HTML, you will be able to separate your website’s design and formatting (CSS) from the content (HTML).
  • 4. BENEFITS OF USING CSS • Consistency If you make one change to your website’s CSS style sheet, the change can automatically apply to every page of the website. The bigger your website, the more time CSS saves you.
  • 5. • Bandwidth Reduction When CSS separates your website's content from its design language, you dramatically reduce your file transfer size. Your reduced bandwidth needs will result in a faster load time and could cut your web hosting costs.
  • 6. • Search Engines CSS is considered a clean coding technique, which means search engines won't have to struggle to "read" its content.
  • 7. • Browser Compatibility CSS stylesheets increase your website's adaptability and ensure that more visitors will be able to view your website in the way you intended.
  • 8. • Viewing Options Another common web design concern is the increasing need to make websites available for different media. CSS can help you tackle this challenge by allowing the same markup page to be presented in different viewing styles —— for example, you may create a separate stylesheet for print or for a mobile device.
  • 9. CSS SYNTAX The CSS syntax is different from that of HTML, though it is not too confusing once you take a look at it. It consists of 3 parts.
  • 10. Each selector can have multiple properties, and each property within that selector can have independent values. The property and value are separated with a colon and contained within curly brackets. Multiple properties are separated by a semi colon. Multiple values within a property are sperated by commas, and if an individual value contains more than one word you surround it with quotation marks, as shown below:
  • 11. INHERITANCE When you nest one element inside another, the nested element will inherit the properties assigned to the containing element. Unless you modify the inner elements values independently. For example, a font declared in the body will be inherited by all text in the file no matter the containing element, unless you declare another font for a specific nested element.
  • 12. Now all text within the HTML file will be set to Verdana. If you wanted to style certain text with another font, like an h1 or a paragraph then you could do the following: Now all <h1> tags within the file will be set to Georgia and all <p> tags are set to Tahoma, leaving text within other elements unchanged from the body declaration of Verdana.
  • 13. Combining Selectors You can combine elements within one selector in the following fashion: As you can see in the above code, The header elements have been grouped into one selector. Each one is separated by a comma. The final result of the above code sets all headers to green and to the specified font.
  • 14. Comment Tags Comments can be used to explain why you added certain selectors within your css file. They are also used to help others who may see your file, or to help you remember what you we’re thinking at a later date. You can add comments that will be ignored by browsers in the following manner:
  • 15. Inserting a CSS Code Internal Style Sheet An internal style sheet should be used when a single document has a unique style. You define internal styles in the head section of an HTML page, by using the <style> tag, like this:
  • 16. External Style Sheet An external CSS file can be created with any text or HTML editor such as Notepad or Dreamweaver. A CSS file contains no HTML code, only CSS. You simply save it with the .css file extension. You can link to the file externally by placing one of the following links in the head section of every HTML file you want to style with the CSS file:
  • 17. Or you can also use the @import method as shown below: By using an external style sheet, all of your HTML files link to one CSS file in order to style the pages. This means that if you need to alter the design of all your pages, you only need to edit one .css file to make global changes to your entire website.
  • 18. CSS vs. Inline Styles Inline styles are defined right in the HTML file alongside the element you want to style. See example below:
  • 19. Activity 1. Open Notepad++. Click on Start > All Programs > Notepad++ folder > Notepad++.
  • 20. 2. Create a new HTML file by clicking File > New, or pressing Ctrl+N on your keyboard.
  • 21. 3. Save the HTML file * Create a folder named “songs” and go to that folder * Save the file as “index.html”. Note: To save the file, go to File > Save As. Type “index.html” in the File name box. Select Hypertext Markup Language file in the Save as type selection menu. Save the file in your desktop.
  • 22.
  • 23. 4. Type the basic skeleton code of an HTML document in index.html. Define the title as “’s Songs”. In this case, we’ll use “The Script’s Songs” as an example.
  • 24. 5. Let’s put the content of the body. Add a heading using the < h1 > tag and define it as “< Your Favorite Band >’s Songs”, similar to what you’ve typed in the title. Display three of your favorite band’s songs as links using the href attribute. Each of them should link to an html file whose file name is identical to the song title.
  • 25.
  • 26. 6. Create the html files for the three songs you have listed. For every song, click File > New, then File > Save As. Type the song title in the File name box. Select Hypertext Markup Language file in the Save as type selection menu. Save the file on the folder created (song folder).
  • 27. 7. Type the basic skeleton code of an HTML document in the html file of each song. Define the title as the actual song title.
  • 28. 8. Encode the lyrics of each song (chorus) , and place them on the body of the corresponding html file using a paragraph tag (< p >). Add a heading and define it as “< Band Name > - < Song Title >”. Add a line break (< /br >) after every line of the lyrics.
  • 29.
  • 30. 9. At the end of each lyrics, add a link that goes back to index.html and name it “Back”. Sample code: < a href = “index.html>Back< /a>
  • 31. 10. Insert CSS code using the internal method to modify the appearance of the first song’s page. The code should be placed between the < head > and < /head > tags. The code should be able to change the body’s background and font family. Sample code:
  • 32. 11. To modify the appearance of the second song’s page using the external method, you must first create an External Style Sheet. Click File > New, then File > Save As. Type “style.css” on the File name box. Select Cascade Style Sheets File in the Save as type selection menu. Save the file on your songs folder.
  • 33.
  • 34. 12. Add CSS code to your External Style Sheet. The file should not contain any HTML tags. The code should be able to change the body’s background and font family. Sample code:
  • 35. 13. Link the second song’s html file to the external stylesheet. Add this code between the < head > and < /head > tags: < link rel="stylesheet" type="text/css" href="style. css" />
  • 36.
  • 37. 14. Insert CSS code using the inline style to modify the appearance of the third song’s page. The code should be able to change the body’s background and font family, therefore the code should be inserted in the < body > tag. Sample code:
  • 38.
  • 39. 15. Save the file by clicking the Save all icon . Open the index.html file in a web browser.