SlideShare une entreprise Scribd logo
1  sur  57
Télécharger pour lire hors ligne
HTML5 & CSS3Building a mobile website
ByMarioHernandez
Course Agenda
1. HTML5
2. CSS3
3. Feature Supportand Polyfills
4. Resources
About Me
I am Web Designer and Themer forDrupal Mediacurrent
Experience
Worked for the FederalGovernmentas lead Front-end
Developer
Noticeble Projects
1.
2.
3.
4.
5.
6.
7.
Teens ExploringTechnology
FederalCourtin Los Angeles
Dallas Cowboys
New England Patriots
San Diego Chargers
Harvard University
Habitatfor Humanity
Public Speaker
I conductcommunity-driven and private workshops
DrupalCamp Los Angeles
CodeCamp Los Angeles &San Diego
San Diego .NetUser Group
Meetups througoutLos Angeles
HTML5
HyperText Markup Language
Progressive Enhancements and GracefulDegradation
It’s official!
Block LevelElements vs. Inline LevelElements
Forms and Form Elements
Audio &Video
Picture
ExtendingSemantics &Accessibility
Performance and Optimization
CSS3Syntax
AddingCSS to apage
Floats
Positioning
Box Model
Web fonts
MediaQueries
Preprocessors -Introduction to Sass
Tools and
PollyfillsModernizr
HTML5Shiv
Respond.js
Resources1.
2.
3.
4.
CodePen
Can I Use
CSS3Please.com
HTML5Doctor.com
Graceful Degradation
Progressive Enhancement
Example of Graceful
Degradation
.selector{
background-color:rgba(0,0,0,.5);
}
.lt-ie9.selector{
background-color:#999;
}
Example of Progressive
Enhacement
.selector{
background:url(images/image.png)00no-repeat;
}
.lt-ie9.selector{
background:url(images/image.gif)00no-repeat;
}
It's Official!!!HTML5 declared complete on October 28,
2014
Block Level Elements
Vs.
Inline Level Elements
Demo
Forms & Form Elements
Demo
Audio & Video
Demo
Picture
How <picture> works
<picture>
<sourcesrcset="mobile.png">
<sourcemedia="(min-width:480px)"srcset="tablet.png">
<sourcemedia="(min-width:960px)"srcset="desktop.png">
<imgsrc="default.png"alt="Alternatetextisaddedinimgtag">
</picture>
View article for description
Another greatarticle
Browser Support
Can I Use
Extending Semantics &
Accessibility
Getinfo from article
Performance and Optimization
Getinfo from article
CSS3Cascading Style Sheets
Agenda
Syntax and code format
AddingCSS to apage
Floats
Positions
z-index
Box Model
Web fonts
MediaQueries
Flexbox
Transitions
Preprocessors -Introduction to Sass
Syntax
selector{property:value;property:value;}
Syntax
body{background:white;color:blue;}
Syntax
body{
background:white;
color:blue;
}
Adding CSS to a page
Inline
<h1style="color:red;font-size:24px;">HelloWorld!</h1>
Adding CSS to a page
Internal Stylesheet
<head>
<style>
</style>
</head>
h1{
color:red;
font-size:24px;
}
Adding CSS to a page
External Stylesheet
<linkrel="stylesheet"href="css/styles.css">
Floats
Demo
Positioning
Static Positioning
Fixed Positioning
An elementwith fixed position is positioned relative to the
browser window. Itwillnotmove even if the window is scrolled:
h1{
position:fixed;
top:30px;
right:5px;
}
Relative Positioning
Arelative positioned elementis positioned relative to its normal
position.
h2{
position:relative;
left:-20px;
}
h2{
position:relative;
right:20px;
}
Relative Positioning
The contentof relativelypositioned elements can be moved and
overlap other elements, butthe reserved space for the elementis
stillpreserved in the normalflow.
Demo
Absolute Positioning
An absolute position elementis positioned relative to the first
parentelementthathas aposition other than static. If no such
elementis found, the containingblock is <html>:
h2{
position:absolute;
left:100px;
top:150px;
}
Absolute Positioning
Absolutelypositioned elements are removed from the normal
flow. The documentand other elements behave like the
absolutelypositioned elementdoes notexist. Absolutely
positioned elements can overlap other elements.
Overlapping Elements
When elements are positioned outside the normalflow, theycan
overlap other elements.
The z-index propertyspecifies the stack order of an element
(which elementshould be placed in frontof, or behind, the
others).
An elementcan have apositive or negative stack order:
img{
position:absolute;
left:0px;
top:0px;
z-index:-1;
}
An elementwith greater stack order is always in frontof an
elementwith alower stack order.
If two positioned elements overlap withoutaz-index specified,
the elementpositioned lastin the HTML code willbe shown on
top.
Box Model
The CSS box modelis essentiallyabox thatwraps around HTML
elements, and itconsists of: margins, borders, padding, and the
actualcontent.
Demo
&
Code Example
Web Fonts
Media Queries
@mediascreenand(max-width:300px){
body{
background-color:lightblue;
}
}
Sass(Syntactically Awesome Style Sheets)
Introduction to Preprocessors
What is Sass?
Sass is an extension of CSS thatadds power and elegance to the
basic language. Itallows you to use variables, nested rules,
mixins, inline imports, and more, allwith afullyCSS-compatible
syntax.
Features of Sass
FullyCSS3-compatible
Language extensions such as variables, nesting, and mixins
Manyusefulfunctions for manipulating
Well-formatted, customizable output
For more visitsass-lang.com
Let's see Sass in action
Live demo
Getting Started with Sass
Installing Sass
Mac
Sass requires Ruby
geminstallsass
Windows
InstallRubyInstaller first
geminstallsass
Go
Confirm Sass is up and running
sass-v
Compass
The awesome sauce!
What is Compass?
Open Source CSS Authoring Framework
Demo
Installing Compass
geminstallcompass
Download slides:
Download slides source code:
Any questions?about.me/mario.hernandez
@Designsdrive
slideshare.net/marequi
github.com/mariohernandez/html5-css3
Basic Markup
<!doctypehtml>
<htmllang="en">
<head>
<metacharset="utf-8">
<title>HTML5andCSS3</title>
<linkrel="stylesheet"href="css/styles.css?v=1.0">
<head>
<body>
Contentgoeshere...
<scriptsrc="js/scripts.js"></script>
</body>
</html>

Contenu connexe

Similaire à HTML5 and CSS3

GDI Seattle Intermediate HTML and CSS Class 1
GDI Seattle Intermediate HTML and CSS Class 1GDI Seattle Intermediate HTML and CSS Class 1
GDI Seattle Intermediate HTML and CSS Class 1
Heather Rock
 

Similaire à HTML5 and CSS3 (20)

Intro to HTML and CSS basics
Intro to HTML and CSS basicsIntro to HTML and CSS basics
Intro to HTML and CSS basics
 
CSS
CSSCSS
CSS
 
Web Development 4 (HTML & CSS)
Web Development 4 (HTML & CSS)Web Development 4 (HTML & CSS)
Web Development 4 (HTML & CSS)
 
Web Development 4
Web Development 4Web Development 4
Web Development 4
 
Diazo: Bridging Designers and Programmers
Diazo: Bridging Designers and ProgrammersDiazo: Bridging Designers and Programmers
Diazo: Bridging Designers and Programmers
 
A practical guide to building websites with HTML5 & CSS3
A practical guide to building websites with HTML5 & CSS3A practical guide to building websites with HTML5 & CSS3
A practical guide to building websites with HTML5 & CSS3
 
Html5 and web technology update
Html5 and web technology updateHtml5 and web technology update
Html5 and web technology update
 
Front end full stack development module 1pptx
Front end full stack development module 1pptxFront end full stack development module 1pptx
Front end full stack development module 1pptx
 
Html5 ux london
Html5 ux londonHtml5 ux london
Html5 ux london
 
How Cascading Style Sheets (CSS) Works
How Cascading Style Sheets (CSS) WorksHow Cascading Style Sheets (CSS) Works
How Cascading Style Sheets (CSS) Works
 
Progressive Prototyping w/HTML5, CSS3 and jQuery
Progressive Prototyping w/HTML5, CSS3 and jQueryProgressive Prototyping w/HTML5, CSS3 and jQuery
Progressive Prototyping w/HTML5, CSS3 and jQuery
 
Semantic markup - Creating Outline
Semantic markup -  Creating OutlineSemantic markup -  Creating Outline
Semantic markup - Creating Outline
 
CSS_Dibbo
CSS_DibboCSS_Dibbo
CSS_Dibbo
 
HTML5 Semantics
HTML5 SemanticsHTML5 Semantics
HTML5 Semantics
 
Html5 tutorial
Html5 tutorialHtml5 tutorial
Html5 tutorial
 
Html5 - Tutorial
Html5 - TutorialHtml5 - Tutorial
Html5 - Tutorial
 
GDI Seattle Intermediate HTML and CSS Class 1
GDI Seattle Intermediate HTML and CSS Class 1GDI Seattle Intermediate HTML and CSS Class 1
GDI Seattle Intermediate HTML and CSS Class 1
 
Slow kinda sucks
Slow kinda sucksSlow kinda sucks
Slow kinda sucks
 
Css, xhtml, javascript
Css, xhtml, javascriptCss, xhtml, javascript
Css, xhtml, javascript
 
WordCamp Greenville 2018 - Beware the Dark Side, or an Intro to Development
WordCamp Greenville 2018 - Beware the Dark Side, or an Intro to DevelopmentWordCamp Greenville 2018 - Beware the Dark Side, or an Intro to Development
WordCamp Greenville 2018 - Beware the Dark Side, or an Intro to Development
 

Plus de Mario Hernandez

Introduction to Drupal Content Management System
Introduction to Drupal Content Management SystemIntroduction to Drupal Content Management System
Introduction to Drupal Content Management System
Mario Hernandez
 

Plus de Mario Hernandez (15)

Responsive images in Drupal 8
Responsive images in Drupal 8Responsive images in Drupal 8
Responsive images in Drupal 8
 
Component-driven Drupal Theming
Component-driven Drupal ThemingComponent-driven Drupal Theming
Component-driven Drupal Theming
 
Responsive design with flexbox
Responsive design with flexboxResponsive design with flexbox
Responsive design with flexbox
 
Building your first d8 theme
Building your first d8 themeBuilding your first d8 theme
Building your first d8 theme
 
Introduction to drupal
Introduction to drupalIntroduction to drupal
Introduction to drupal
 
Rapid wireframing and prototyping
Rapid wireframing and prototypingRapid wireframing and prototyping
Rapid wireframing and prototyping
 
Introduction to HTML and CSS
Introduction to HTML and CSSIntroduction to HTML and CSS
Introduction to HTML and CSS
 
CSS Frameworks
CSS FrameworksCSS Frameworks
CSS Frameworks
 
Responsive Web Design
Responsive Web DesignResponsive Web Design
Responsive Web Design
 
CSS Framework + Progressive Enhacements
CSS Framework + Progressive EnhacementsCSS Framework + Progressive Enhacements
CSS Framework + Progressive Enhacements
 
Introduction to Drupal Content Management System
Introduction to Drupal Content Management SystemIntroduction to Drupal Content Management System
Introduction to Drupal Content Management System
 
CSS3 for web designer - How to design a visually appealing website
CSS3 for web designer - How to design a visually appealing websiteCSS3 for web designer - How to design a visually appealing website
CSS3 for web designer - How to design a visually appealing website
 
960 Grid System - A hands-on introduction
960 Grid System -  A hands-on introduction960 Grid System -  A hands-on introduction
960 Grid System - A hands-on introduction
 
Front end-design and best practices
Front end-design and best practicesFront end-design and best practices
Front end-design and best practices
 
An introduction to the 960 grid system
An introduction to the 960 grid systemAn introduction to the 960 grid system
An introduction to the 960 grid system
 

Dernier

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 

Dernier (20)

Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 

HTML5 and CSS3