SlideShare a Scribd company logo
Lunch & Learn: CSS
Oct 23 & 30 2013 // bswift
What we will talk about:
Front-end vs Back-end coding at bswift
Defining HTML, CSS and Javascript
How the client stylesheets work
Examples
Tools
Let’s get started!
Static Pages / Dynamic Pages
SERVER

page.html

page.html

page.html

A static website is a group of self-contained,
individual pages (or page), sent to the browser from
the server one-page-at-a-time.
.net

SERVER

page.html

SQL databases
HTML

Dyamic web content is built when it is requested,
by the user directly, or programmatically while
a user is on a page (e.g., facebook updates).
Most websites contain both static and dynamic elements.
front-end

SERVER
REQUEST

HTML
CSS
Javascript

thanks!

Can I have
a webpage,
please?

.net

SQL databases

back-end “recipe”

SERVER
RESPONSE
Server-side / Client-side
aka

Back End / Front-end
.net
.asp
SQL

page.html

SERVER

BROWSER
style.css

etc
script.js

Client-side (front-end) coding includes HTML, CSS
and Javascript. This just means that our code will be
downloaded from the server and then compiled
entirely in the browser.
HTML, CSS, Javascript
Three layers of web design:
Structure, Style, Behavior
BEHAVIOR
Javascript

PRESENTATION
CSS
Imagery

STRUCTURE
HTML markup
Site planning

Three layers of web design
Three layers of web design
Three layers of web design
Three layers of web design
Three layers of web design
HTML
Hyper Text
+
Markup Language
Hyper Text
Markup Language
A markup language is a
set of markup tags.
The purpose of the tags is to
group and describe page content.
Markup Language
Without any markup to give your content structure, the
browser renders unformatted and unstyled text, also
known as “plain text”.
Html / CSS Presentation
Markup Language
HTML tags give structure and meaning to your content.
“Semantic markup” refers to the use of meaningful tags to
describe content (e.g. using header tags for header content).
Markup Language
Once your content is marked up, the browser applies built-in
default styles to the tags. While you can override these styles
with css, your marked up, non-css styled document should be
readable and have a clear hierarchy.
doctype
html
head
body
EXCEPTION

<!DOCTYPE html>
The doctype is not actually a tag,
but a declaration, telling the browser
what kind of html you are using. The
doctype above declares HTML 5.
<html></html>

The <html> element defines
the whole HTML document.
<head></head>
The <head> element contains special
elements that instruct the browser
where to find stylesheets, provide meta
info, and more.
<body></body>

The <body> element contains
the document content (what is shown
inside the browser window).
Nesting
The use of our first three tags (html, head and body),
introduces and important concept: Nesting, which is when
tags “wrap” other tags. When you create markup, you should
indicate nesting by indenting the nested tags with 2 spaces
(preferred) or a tab.
<html>
<head> </head>
<body>
<h1></h1>
<p></p>
</body>
</html>
Document Hierarchy: Parents, children and siblings
Just as in a genealogy tree, the family hierarchy is described in
terms of relationships. All elements in the document have a
parent (up to ‘document’, which is at the top), and may have
children (nested inside) or siblings (placed alongside).

<parent x>
<child and sibling y> </child and sibling y>
<child and sibling z> </child and sibling z>
</parent x>
The ‘address’ of an element
The document hierarchy provides us with an ‘address’ for each
element.

in the div with class “client-text-container”, make all of the h2
elements orange and 24px.
HTML Elements
Anatomy of an Element

<tag>Content</tag>
An HTML element includes both
the HTML tag and everything between
the tag (the content).
Anatomy of an Element

<tag>Content</tag>
Tags normally come in pairs. The
first tag is the start tag, and the second
tag is the end tag.
Anatomy of an Element

<h1>Main Headline</h1>
HTML has a defined set of tag
names (also called keywords) that
the browser understands.
The essential element tags
Primary
Structure
html

Structural
Elements
(block)

Formatting
Elements
(inline)

head

p

em

body

br
h1 – h6
ul
ol
a
img
(div)

i
strong

Head
Elements
title
meta
link

b
q
blockquote
(span)
Anatomy of an Element

<html lang=”en”></html>
Most elements can have attributes,
which provides additional information
about the element.
Anatomy of an Element

<div class=”left-nav”></div>
Attributes always follow the same
format: name=”value”. You can use
either single or double quotes.
The essential attributes

link

<link rel=”stylesheet” type-”text/css” href=”stylesheet/styles.css”>

img

<img src=”images/image.jpg” alt=”Sam”>

a

<a href=”http://colum.edu”>My school</a>
CSS
Cascading
+
Style Sheet
The Stylesheet
A stylesheet is a set of rules defining
how an html element will be “presented”
in the browser.
These rules are targeted to specific
elements in the html document.
The Cascade
The “cascade” part of CSS is a set of rules
for resolving conflicts with multiple CSS
rules applied to the same elements.
For example, if there are two rules defining
the color or your h1 elements, the rule that
comes last in the cascade order will
“trump” the other.
low importance

Browser stylesheet

high importance

Linked (external) stylesheet

Embedded (internal) stylesheet

Inline (internal) Styles
Html / CSS Presentation
Inheritance
Most elements will inherit many style properties
from their parent elements by default.
HTML

relationship

<body>
<div>
<ul>
<li></li>
</ul>
</div>
</body>

parent of site
parent of ul and li, child of body
parent of li, child of div and body
child of ul, div, and body
Inheritance
body
make the paragraph 16px, Verdana, red
p
make the paragraph blue

16px, Verdana, blue
Specificity
Shortly after styling your first html elements,
you will find yourself wanting more control over
where your styles are applied.
This is where specificity comes in.
Specificity refers to how specific your selector is
in naming an element.
Specificity
body
make the paragraph 16px, Verdana, red
p
make the paragraph blue
p.pink
make the paragraph pink
16px, Verdana, pink
HTML

<div id=”plan-2323”>
<p>Here is some text.</p>
<p>Hide this text.</p>
<div>

<div id=”plan-2323”>
<p>Here is some text.</p>
<p class=”hideclass”>Hide this text.</p>
<div>
CSS

#plan-2323.hideclass {display: none}
Html / CSS Presentation
CSS Syntax

Syntax = the rules for how to write the language
Three terms for describing your styles:

CSS rule
CSS selector
CSS declaration
CSS Rule

selector {property: value;}
declaration

Every style is defined by a selector and
a declaration. The declaration contains at least
one property/value pair.Together they are
called a CSS Rule.
CSS Selector
body {font-family: Arial, Helvetica}
p {color: #666666}
h1 {font-size: 24px}
a {color: blue}

The selector associates css rules with
HTML elements.
CSS Selector
p {
color: red
}

The selector is typed in front of the declaration,
with a space separating it and the opening
curly-bracket (aka curly-brace).
Typically, extra spaces and returns are added as
shown for the sake of readability.
CSS Selector
h1,h2,h3,h4 {
font-weight: bold
}

You can apply styles to multiple selectors in the
same rule by separating the selectors with
commas.
CSS Declaration
p {
property: value
}

The declaration is always defined in a property/
value pair. The two are separated by a colon.
How you define the properties will affect how
HTML elements are displayed.
CSS Declaration
p {
font-family: Arial, sans-serif;
font-size: 14px;
color: #666666;
}

You can apply multiple declarations to a
selector(s) by separating the delcarations with
semi-colons.
CSS Selectors
p

Type (element)

#

ID

.

Class
Type (element) Selectors
body {declaration}
p {declaration}
h1 {declaration}
ul {declaration}

The simplest selector is the type selector, which
targets an html element by name.
The essential selector types (elements)
Primary
Structure
html

Body
Elements
p

Formatting
Elements
em

body

br

i

h1 – h6
ul
ol
a
img
div

strong
b
q
blockquote
span
ID Selectors
CSS

#logo {declaration}
HTML

<img id=”logo” src=”” alt=””>

An ID is an html attribute that is added to your
html markup. You reference that ID in your css
with a hash.
Class Selectors
CSS

.ingredients {declaration}
HTML

<ul class=”ingredients”>

A class is an html attribute that is added to your
html markup. You reference that ID in your css
with a period.
IDs vs Classes

The most important difference between IDs
and classes is that there can be only one ID
on a page, but multiple classes.
An ID is more specific than a class.
An element can have both an ID and
multiple classes.
IDs vs Classes

ID: #344-34-4344
Class: Male
Class: Employee

ID: #123-54-9877
Class: Female
Class: Employee
Descendant Selectors
CSS

#sidebar .author {declaration}
HTML

<div id=”sidebar”>
<p class=”author”></p>
</div>

A space between two selectors indicates a
descendant selector. In the example above, the
style is targeted to an element with the class
“author” inside the id “sidebar”.
Multiple classes
CSS

.ingredients.time {declaration}
HTML

<div class=”ingredients time”>
<h1></h1>
</div>

Elements can have multiple classes, giving you
more control. The are written in the CSS in the
exact order they appear in the html, with no
spaces.
bswift Client Stylesheets
Html / CSS Presentation
Html / CSS Presentation
Common uses:

Hiding elements
Tweaking specific text styles
Branding
Some things you can change with CSS
colors
type
type size
backgrounds
spacing
sizes
borders
positions (layout)
Some things you can’t change with CSS
content
markup
Example:

Client text + Client CSS
Html / CSS Presentation
Html / CSS Presentation
Example:

Login Branding
Html / CSS Presentation
Html / CSS Presentation
Html / CSS Presentation
Html / CSS Presentation
Html / CSS Presentation
Html / CSS Presentation
Html / CSS Presentation
Html / CSS Presentation
Example:

Login Examples
Html / CSS Presentation
Html / CSS Presentation
Html / CSS Presentation
Html / CSS Presentation
END NOTES

You are not expected to write
your own html & css
If you do, please run it by the UX team
Apply big changes only to ‘safe’ pages
Make sure we aren’t just fixing symptoms
Don’t make changes that damage
usability / readability / legibility
Tools
Html / CSS Presentation
Html / CSS Presentation

More Related Content

What's hot (20)

PPTX
css.ppt
bhasula
 
PPTX
Complete Lecture on Css presentation
Salman Memon
 
PDF
Intro to HTML & CSS
Syed Sami
 
PDF
Introduction to HTML5
Gil Fink
 
PPT
Html & Css presentation
joilrahat
 
PDF
Bootstrap
Jadson Santos
 
PDF
Introduction to HTML and CSS
Mario Hernandez
 
PDF
jQuery for beginners
Arulmurugan Rajaraman
 
PPTX
Basic HTML
Sayan De
 
PPTX
Presentation of bootstrap
1amitgupta
 
PPTX
(Fast) Introduction to HTML & CSS
Dave Kelly
 
PPTX
html-css
Dhirendra Chauhan
 
PPTX
HTML5 & CSS3
Ian Lintner
 
PPT
CSS for Beginners
Amit Kumar Singh
 
PPTX
Java script
Shyam Khant
 
PPT
Introduction to Cascading Style Sheets (CSS)
Chris Poteet
 
PPTX
HTML-(workshop)7557.pptx
Raja980775
 
PPTX
Images and Tables in HTML
Aarti P
 
PPTX
Introduction to HTML and CSS
Ferdous Mahmud Shaon
 
PPTX
Html5 and-css3-overview
Jacob Nelson
 
css.ppt
bhasula
 
Complete Lecture on Css presentation
Salman Memon
 
Intro to HTML & CSS
Syed Sami
 
Introduction to HTML5
Gil Fink
 
Html & Css presentation
joilrahat
 
Bootstrap
Jadson Santos
 
Introduction to HTML and CSS
Mario Hernandez
 
jQuery for beginners
Arulmurugan Rajaraman
 
Basic HTML
Sayan De
 
Presentation of bootstrap
1amitgupta
 
(Fast) Introduction to HTML & CSS
Dave Kelly
 
HTML5 & CSS3
Ian Lintner
 
CSS for Beginners
Amit Kumar Singh
 
Java script
Shyam Khant
 
Introduction to Cascading Style Sheets (CSS)
Chris Poteet
 
HTML-(workshop)7557.pptx
Raja980775
 
Images and Tables in HTML
Aarti P
 
Introduction to HTML and CSS
Ferdous Mahmud Shaon
 
Html5 and-css3-overview
Jacob Nelson
 

Viewers also liked (20)

PPT
CSS Basics
WordPress Memphis
 
PPT
Introduction to CSS
Amit Tyagi
 
PPT
CSS ppt
Sanmuga Nathan
 
KEY
HTML presentation for beginners
jeroenvdmeer
 
PDF
Basic css-tutorial
mohamed ashraf
 
PPT
Html Ppt
vijayanit
 
PPT
cascading style sheet ppt
abhilashagupta
 
PPT
Css Ppt
Hema Prasanth
 
PPTX
Cookie and session
Aashish Ghale
 
PDF
3. tutorial html web desain
faizibra
 
PDF
HTTP & HTML & Web
Peter R. Egli
 
ODP
[Old] Curso de programação web dia 01
ailton bsj
 
PDF
HTML Web Platform
dynamis
 
PPT
Introduction au Génie Logiciel
guest0032c8
 
PDF
WebSide - eBrouchure & Presentation
WebSide
 
PDF
Introduction to WEB HTML, CSS
University of Technology
 
PDF
The Future of the Web: HTML5
Derek Bender
 
PPT
How Cascading Style Sheets (CSS) Works
Amit Tyagi
 
PPT
Introduction to html
vikasgaur31
 
PPTX
Cookies!
kellimccabe
 
CSS Basics
WordPress Memphis
 
Introduction to CSS
Amit Tyagi
 
HTML presentation for beginners
jeroenvdmeer
 
Basic css-tutorial
mohamed ashraf
 
Html Ppt
vijayanit
 
cascading style sheet ppt
abhilashagupta
 
Css Ppt
Hema Prasanth
 
Cookie and session
Aashish Ghale
 
3. tutorial html web desain
faizibra
 
HTTP & HTML & Web
Peter R. Egli
 
[Old] Curso de programação web dia 01
ailton bsj
 
HTML Web Platform
dynamis
 
Introduction au Génie Logiciel
guest0032c8
 
WebSide - eBrouchure & Presentation
WebSide
 
Introduction to WEB HTML, CSS
University of Technology
 
The Future of the Web: HTML5
Derek Bender
 
How Cascading Style Sheets (CSS) Works
Amit Tyagi
 
Introduction to html
vikasgaur31
 
Cookies!
kellimccabe
 
Ad

Similar to Html / CSS Presentation (20)

PPTX
html css js bootstrap framework thisis i
ssusered83521
 
PPTX
Workshop 2 Slides.pptx
DaniyalSardar
 
PDF
Girl Develop It Cincinnati: Intro to HTML/CSS Class 2
Erin M. Kidwell
 
PPTX
WEBSITE DESIGN AND DEVELOPMENT WITH CASCADING STYLE SHEETS(CSS)
brianbyamukama302
 
PDF
Web Design & Development - Session 2
Shahrzad Peyman
 
PPTX
Html-Prabakaran
DrPrabakaranPerumal
 
PDF
Web Concepts - an introduction - introduction
clement swarnappa
 
PPTX
Web Development - Lecture 5
Syed Shahzaib Sohail
 
PPTX
Ifi7174 lesson2
Sónia
 
PPTX
Java script and html
Malik M. Ali Shahid
 
PPTX
Java script and html new
Malik M. Ali Shahid
 
PDF
CSS Foundations, pt 1
Shawn Calvert
 
PPT
HTML & CSS.ppt
vaseemshaik21
 
PPTX
Introduction to Web Development.pptx
GDSCVJTI
 
PPTX
Introduction to Web Development.pptx
Alisha Kamat
 
PPTX
Introduction to Web Development.pptx
Alisha Kamat
 
PPT
Unit 2-CSS & Bootstrap.ppt
TusharTikia
 
PPTX
CSS
Akila Iroshan
 
PDF
HTML2.pdf
202GCET19
 
PPTX
Web Information Systems Html and css
Artificial Intelligence Institute at UofSC
 
html css js bootstrap framework thisis i
ssusered83521
 
Workshop 2 Slides.pptx
DaniyalSardar
 
Girl Develop It Cincinnati: Intro to HTML/CSS Class 2
Erin M. Kidwell
 
WEBSITE DESIGN AND DEVELOPMENT WITH CASCADING STYLE SHEETS(CSS)
brianbyamukama302
 
Web Design & Development - Session 2
Shahrzad Peyman
 
Html-Prabakaran
DrPrabakaranPerumal
 
Web Concepts - an introduction - introduction
clement swarnappa
 
Web Development - Lecture 5
Syed Shahzaib Sohail
 
Ifi7174 lesson2
Sónia
 
Java script and html
Malik M. Ali Shahid
 
Java script and html new
Malik M. Ali Shahid
 
CSS Foundations, pt 1
Shawn Calvert
 
HTML & CSS.ppt
vaseemshaik21
 
Introduction to Web Development.pptx
GDSCVJTI
 
Introduction to Web Development.pptx
Alisha Kamat
 
Introduction to Web Development.pptx
Alisha Kamat
 
Unit 2-CSS & Bootstrap.ppt
TusharTikia
 
HTML2.pdf
202GCET19
 
Web Information Systems Html and css
Artificial Intelligence Institute at UofSC
 
Ad

More from Shawn Calvert (20)

PDF
HTML Email
Shawn Calvert
 
PDF
Basics of Web Navigation
Shawn Calvert
 
PDF
User Centered Design
Shawn Calvert
 
PDF
Intro to jQuery
Shawn Calvert
 
PDF
Images on the Web
Shawn Calvert
 
PDF
Introduction to Responsive Web Design
Shawn Calvert
 
PDF
Web Layout
Shawn Calvert
 
PDF
Web Typography
Shawn Calvert
 
PDF
Class Intro / HTML Basics
Shawn Calvert
 
PDF
Week 2-intro-html
Shawn Calvert
 
PDF
Web Design I Syllabus 22 3375-03
Shawn Calvert
 
PDF
Intro to Javascript and jQuery
Shawn Calvert
 
PDF
HTML Foundations, pt 3: Forms
Shawn Calvert
 
PDF
10 Usability & UX Guidelines
Shawn Calvert
 
PDF
Usability and User Experience
Shawn Calvert
 
PDF
Creating Images for the Web
Shawn Calvert
 
PDF
Web Design Process
Shawn Calvert
 
PDF
CSS Foundations, pt 2
Shawn Calvert
 
PDF
HTML Foundations, pt 2
Shawn Calvert
 
PDF
HTML Foundations, part 1
Shawn Calvert
 
HTML Email
Shawn Calvert
 
Basics of Web Navigation
Shawn Calvert
 
User Centered Design
Shawn Calvert
 
Intro to jQuery
Shawn Calvert
 
Images on the Web
Shawn Calvert
 
Introduction to Responsive Web Design
Shawn Calvert
 
Web Layout
Shawn Calvert
 
Web Typography
Shawn Calvert
 
Class Intro / HTML Basics
Shawn Calvert
 
Week 2-intro-html
Shawn Calvert
 
Web Design I Syllabus 22 3375-03
Shawn Calvert
 
Intro to Javascript and jQuery
Shawn Calvert
 
HTML Foundations, pt 3: Forms
Shawn Calvert
 
10 Usability & UX Guidelines
Shawn Calvert
 
Usability and User Experience
Shawn Calvert
 
Creating Images for the Web
Shawn Calvert
 
Web Design Process
Shawn Calvert
 
CSS Foundations, pt 2
Shawn Calvert
 
HTML Foundations, pt 2
Shawn Calvert
 
HTML Foundations, part 1
Shawn Calvert
 

Recently uploaded (20)

PDF
5 Things to Consider When Deploying AI in Your Enterprise
Safe Software
 
PPTX
𝙳𝚘𝚠𝚗𝚕𝚘𝚊𝚍—Wondershare Filmora Crack 14.0.7 + Key Download 2025
sebastian aliya
 
PDF
2025_06_18 - OpenMetadata Community Meeting.pdf
OpenMetadata
 
PDF
“Scaling i.MX Applications Processors’ Native Edge AI with Discrete AI Accele...
Edge AI and Vision Alliance
 
PDF
The Growing Value and Application of FME & GenAI
Safe Software
 
PDF
Salesforce Summer '25 Release Frenchgathering.pptx.pdf
yosra Saidani
 
PDF
Darley - FIRST Copenhagen Lightning Talk (2025-06-26) Epochalypse 2038 - Time...
treyka
 
PPTX
UserCon Belgium: Honey, VMware increased my bill
stijn40
 
PDF
Redefining Work in the Age of AI - What to expect? How to prepare? Why it mat...
Malinda Kapuruge
 
PDF
Why aren't you using FME Flow's CPU Time?
Safe Software
 
PDF
Python Conference Singapore - 19 Jun 2025
ninefyi
 
PDF
Database Benchmarking for Performance Masterclass: Session 1 - Benchmarking F...
ScyllaDB
 
PDF
My Journey from CAD to BIM: A True Underdog Story
Safe Software
 
DOCX
Daily Lesson Log MATATAG ICT TEchnology 8
LOIDAALMAZAN3
 
PDF
Unlocking FME Flow’s Potential: Architecture Design for Modern Enterprises
Safe Software
 
PPSX
Usergroup - OutSystems Architecture.ppsx
Kurt Vandevelde
 
PPTX
Practical Applications of AI in Local Government
OnBoard
 
PDF
Hyderabad MuleSoft In-Person Meetup (June 21, 2025) Slides
Ravi Tamada
 
PPTX
Paycifi - Programmable Trust_Breakfast_PPTXT
FinTech Belgium
 
PDF
The Future of Product Management in AI ERA.pdf
Alyona Owens
 
5 Things to Consider When Deploying AI in Your Enterprise
Safe Software
 
𝙳𝚘𝚠𝚗𝚕𝚘𝚊𝚍—Wondershare Filmora Crack 14.0.7 + Key Download 2025
sebastian aliya
 
2025_06_18 - OpenMetadata Community Meeting.pdf
OpenMetadata
 
“Scaling i.MX Applications Processors’ Native Edge AI with Discrete AI Accele...
Edge AI and Vision Alliance
 
The Growing Value and Application of FME & GenAI
Safe Software
 
Salesforce Summer '25 Release Frenchgathering.pptx.pdf
yosra Saidani
 
Darley - FIRST Copenhagen Lightning Talk (2025-06-26) Epochalypse 2038 - Time...
treyka
 
UserCon Belgium: Honey, VMware increased my bill
stijn40
 
Redefining Work in the Age of AI - What to expect? How to prepare? Why it mat...
Malinda Kapuruge
 
Why aren't you using FME Flow's CPU Time?
Safe Software
 
Python Conference Singapore - 19 Jun 2025
ninefyi
 
Database Benchmarking for Performance Masterclass: Session 1 - Benchmarking F...
ScyllaDB
 
My Journey from CAD to BIM: A True Underdog Story
Safe Software
 
Daily Lesson Log MATATAG ICT TEchnology 8
LOIDAALMAZAN3
 
Unlocking FME Flow’s Potential: Architecture Design for Modern Enterprises
Safe Software
 
Usergroup - OutSystems Architecture.ppsx
Kurt Vandevelde
 
Practical Applications of AI in Local Government
OnBoard
 
Hyderabad MuleSoft In-Person Meetup (June 21, 2025) Slides
Ravi Tamada
 
Paycifi - Programmable Trust_Breakfast_PPTXT
FinTech Belgium
 
The Future of Product Management in AI ERA.pdf
Alyona Owens
 

Html / CSS Presentation