SlideShare una empresa de Scribd logo
1 de 49
HTML & CSS Best Practices Veronica Rebagliatte rebagliatte.com  2011, August
Contents   HTML  A. Semantics and accessibility Declare your DocType Use relevant title and description tags Separate contents from presentation Use the most semantic markup possible Validate for html4 and check the outline for html5 Consider using microformatting B. Performance Why front-end performance matters Stylesheets at the top, scripts at the bottom Minimize HTTP requests Reduce loading time C. Maintainability and Readability  
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
HTML Best Practices
A.Semantics and Accessibility
Declare your doctype ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Use a relevant title and description title -> description ->
Separate contents and presentation ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Use semantic markup - HTML4 tags ,[object Object],[object Object],[object Object]
[object Object],[object Object],[object Object]
[object Object]
Tables
Forms
HTML5 ,[object Object],[object Object],[object Object],[object Object]
[object Object],[object Object]
New Structural tags ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
New Content tags ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
But keep in mind deprecated tags ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Validate ,[object Object]
Check the doc outline  (just for   ) ,[object Object],[object Object],[object Object],[object Object]
Consider using microformats ,[object Object]
B. Performance
Why front-end performance matters ,[object Object],[object Object],[object Object],[object Object]
Put stylesheets at the top ,[object Object],[object Object],[object Object],[object Object],Put scripts at the bottom ,[object Object],[object Object]
Minimize HTTP requests ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Reduce loading time ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
B. Maintainability and Readability
Format your code properly ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
CSS Best Practices
A. Pick the best layout  [11]
 
 
 
 
B. Slice with optimization  in mind
Sprite or repeatable background? Sprites 1px wide slices for gradients patterns for repeating backgrounds Repeatable backgrounds alpha black for overlays
C. Master the basics
Difference between class and ID ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Precedence of selectors ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Box Model
Units ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Colors ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
D. Get organized
Get organized ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Tools ,[object Object],[object Object],[object Object],[object Object],[object Object]
References ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Thanks!

Más contenido relacionado

La actualidad más candente

La actualidad más candente (20)

Introduction to HTML and CSS
Introduction to HTML and CSSIntroduction to HTML and CSS
Introduction to HTML and CSS
 
Html
HtmlHtml
Html
 
Html n CSS
Html n CSSHtml n CSS
Html n CSS
 
Amazon Redshift Tutorial | AWS Tutorial for Beginners | AWS Certification Tra...
Amazon Redshift Tutorial | AWS Tutorial for Beginners | AWS Certification Tra...Amazon Redshift Tutorial | AWS Tutorial for Beginners | AWS Certification Tra...
Amazon Redshift Tutorial | AWS Tutorial for Beginners | AWS Certification Tra...
 
asp.net Webconfiguration
asp.net Webconfigurationasp.net Webconfiguration
asp.net Webconfiguration
 
Css backgrounds
Css   backgroundsCss   backgrounds
Css backgrounds
 
HTML CSS & Javascript
HTML CSS & JavascriptHTML CSS & Javascript
HTML CSS & Javascript
 
Introduction to CSS3
Introduction to CSS3Introduction to CSS3
Introduction to CSS3
 
HTML5 - Insert images and Apply page backgrounds
HTML5 - Insert images and Apply page backgroundsHTML5 - Insert images and Apply page backgrounds
HTML5 - Insert images and Apply page backgrounds
 
html5.ppt
html5.ppthtml5.ppt
html5.ppt
 
Html and css
Html and cssHtml and css
Html and css
 
Amazon S3 & Amazon Glacier - Object Storage Overview
Amazon S3 & Amazon Glacier - Object Storage OverviewAmazon S3 & Amazon Glacier - Object Storage Overview
Amazon S3 & Amazon Glacier - Object Storage Overview
 
quick intro to elastic search
quick intro to elastic search quick intro to elastic search
quick intro to elastic search
 
Automating document analysis and text extraction with Amazon Textract - AIM20...
Automating document analysis and text extraction with Amazon Textract - AIM20...Automating document analysis and text extraction with Amazon Textract - AIM20...
Automating document analysis and text extraction with Amazon Textract - AIM20...
 
HTML (Web) basics for a beginner
HTML (Web) basics for a beginnerHTML (Web) basics for a beginner
HTML (Web) basics for a beginner
 
3. Java Script
3. Java Script3. Java Script
3. Java Script
 
What is front-end development ?
What is front-end development ?What is front-end development ?
What is front-end development ?
 
CSS for Beginners
CSS for BeginnersCSS for Beginners
CSS for Beginners
 
Css3
Css3Css3
Css3
 
jQuery
jQueryjQuery
jQuery
 

Destacado

HTML CSS Best Practices
HTML CSS Best PracticesHTML CSS Best Practices
HTML CSS Best Practices
hoctudau
 
Base HTML & CSS
Base HTML & CSSBase HTML & CSS
Base HTML & CSS
Nick Chan
 
BS8878 Web Accessibility Code of Practice
BS8878 Web Accessibility Code of PracticeBS8878 Web Accessibility Code of Practice
BS8878 Web Accessibility Code of Practice
Nomensa
 
Developing for Diversity
Developing for DiversityDeveloping for Diversity
Developing for Diversity
InclusiveUX
 
Introduction to Accessibility Best Practices
Introduction to Accessibility Best PracticesIntroduction to Accessibility Best Practices
Introduction to Accessibility Best Practices
shawtrusta11y
 
503 web accessibility - best practices
503   web accessibility - best practices503   web accessibility - best practices
503 web accessibility - best practices
Joanna Wiebe
 
SharePoint 2010 Web Standards & Accessibility
SharePoint 2010 Web Standards & AccessibilitySharePoint 2010 Web Standards & Accessibility
SharePoint 2010 Web Standards & Accessibility
Mavention
 

Destacado (20)

Performance Best Practices - Part 1 - Client Side [JS, CSS, HTML, jQuery]
Performance Best Practices - Part 1 - Client Side [JS, CSS, HTML, jQuery]Performance Best Practices - Part 1 - Client Side [JS, CSS, HTML, jQuery]
Performance Best Practices - Part 1 - Client Side [JS, CSS, HTML, jQuery]
 
HTML CSS Best Practices
HTML CSS Best PracticesHTML CSS Best Practices
HTML CSS Best Practices
 
Base HTML & CSS
Base HTML & CSSBase HTML & CSS
Base HTML & CSS
 
Hitting the accessibility high notes with ARIA
Hitting the accessibility high notes with ARIAHitting the accessibility high notes with ARIA
Hitting the accessibility high notes with ARIA
 
BS8878 Web Accessibility Code of Practice
BS8878 Web Accessibility Code of PracticeBS8878 Web Accessibility Code of Practice
BS8878 Web Accessibility Code of Practice
 
Best Practices for Web Accessibility
Best Practices for Web AccessibilityBest Practices for Web Accessibility
Best Practices for Web Accessibility
 
Developing for Diversity
Developing for DiversityDeveloping for Diversity
Developing for Diversity
 
Accessibility Standards For Customer Service
Accessibility Standards For Customer ServiceAccessibility Standards For Customer Service
Accessibility Standards For Customer Service
 
AAUP 2016: Accessibility Standards from the Inside Out (M. Rothberg)
AAUP 2016: Accessibility Standards from the Inside Out (M. Rothberg)AAUP 2016: Accessibility Standards from the Inside Out (M. Rothberg)
AAUP 2016: Accessibility Standards from the Inside Out (M. Rothberg)
 
Introduction to Accessibility Best Practices
Introduction to Accessibility Best PracticesIntroduction to Accessibility Best Practices
Introduction to Accessibility Best Practices
 
503 web accessibility - best practices
503   web accessibility - best practices503   web accessibility - best practices
503 web accessibility - best practices
 
第10回勉強会 CSS設計について
第10回勉強会 CSS設計について第10回勉強会 CSS設計について
第10回勉強会 CSS設計について
 
Web Standards and Accessibility
Web Standards and AccessibilityWeb Standards and Accessibility
Web Standards and Accessibility
 
Accessibility for Hybrid Mobile
Accessibility for Hybrid MobileAccessibility for Hybrid Mobile
Accessibility for Hybrid Mobile
 
Web Standards, HTML 5 & Accessibility - What makes a site accessible today?
Web Standards, HTML 5 & Accessibility - What makes a site accessible today?Web Standards, HTML 5 & Accessibility - What makes a site accessible today?
Web Standards, HTML 5 & Accessibility - What makes a site accessible today?
 
HTML practicals
HTML practicals HTML practicals
HTML practicals
 
SharePoint 2010 Web Standards & Accessibility
SharePoint 2010 Web Standards & AccessibilitySharePoint 2010 Web Standards & Accessibility
SharePoint 2010 Web Standards & Accessibility
 
Mobile Accessibility Best Practices & Trends
Mobile Accessibility Best Practices & TrendsMobile Accessibility Best Practices & Trends
Mobile Accessibility Best Practices & Trends
 
Early prevention of accessibility issues with mockup & wireframe reviews
Early prevention of accessibility issues with mockup & wireframe reviewsEarly prevention of accessibility issues with mockup & wireframe reviews
Early prevention of accessibility issues with mockup & wireframe reviews
 
メンテナブルでありつづけるためのCSS設計
メンテナブルでありつづけるためのCSS設計メンテナブルでありつづけるためのCSS設計
メンテナブルでありつづけるためのCSS設計
 

Similar a Html & CSS - Best practices 2-hour-workshop

Intermediate Web Design.doc
Intermediate Web Design.docIntermediate Web Design.doc
Intermediate Web Design.doc
butest
 
Intermediate Web Design.doc
Intermediate Web Design.docIntermediate Web Design.doc
Intermediate Web Design.doc
butest
 
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
 
Drupalcamp Atlanta 2010 Design-to-Theme
Drupalcamp Atlanta 2010 Design-to-ThemeDrupalcamp Atlanta 2010 Design-to-Theme
Drupalcamp Atlanta 2010 Design-to-Theme
Mediacurrent
 

Similar a Html & CSS - Best practices 2-hour-workshop (20)

SDP_-_Module_4.ppt
SDP_-_Module_4.pptSDP_-_Module_4.ppt
SDP_-_Module_4.ppt
 
Intermediate Web Design.doc
Intermediate Web Design.docIntermediate Web Design.doc
Intermediate Web Design.doc
 
Intermediate Web Design.doc
Intermediate Web Design.docIntermediate Web Design.doc
Intermediate Web Design.doc
 
Html5 tutorial
Html5 tutorialHtml5 tutorial
Html5 tutorial
 
Html5 tutorial
Html5 tutorialHtml5 tutorial
Html5 tutorial
 
Html5 tutorial
Html5 tutorialHtml5 tutorial
Html5 tutorial
 
Html5 tutorial
Html5 tutorialHtml5 tutorial
Html5 tutorial
 
Html5 tutorial
Html5 tutorialHtml5 tutorial
Html5 tutorial
 
Guidelines HTML5 & CSS3 - Atlogys (2018)
Guidelines HTML5 & CSS3 - Atlogys (2018)Guidelines HTML5 & CSS3 - Atlogys (2018)
Guidelines HTML5 & CSS3 - Atlogys (2018)
 
Dita for the web: Make Adaptive Content Simple for Writers and Developer
Dita for the web: Make Adaptive Content Simple for Writers and DeveloperDita for the web: Make Adaptive Content Simple for Writers and Developer
Dita for the web: Make Adaptive Content Simple for Writers and Developer
 
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
 
Drupalcamp Atlanta 2010 Design-to-Theme
Drupalcamp Atlanta 2010 Design-to-ThemeDrupalcamp Atlanta 2010 Design-to-Theme
Drupalcamp Atlanta 2010 Design-to-Theme
 
Website development-osgl
Website development-osglWebsite development-osgl
Website development-osgl
 
Aem best practices
Aem best practicesAem best practices
Aem best practices
 
Html5 deciphered - designing concepts part 1
Html5 deciphered - designing concepts part 1Html5 deciphered - designing concepts part 1
Html5 deciphered - designing concepts part 1
 
Adobe Experience Manager Core Components
Adobe Experience Manager Core ComponentsAdobe Experience Manager Core Components
Adobe Experience Manager Core Components
 
Le Wagon - Landing page
Le Wagon - Landing pageLe Wagon - Landing page
Le Wagon - Landing page
 
Introduction to whats new in css3
Introduction to whats new in css3Introduction to whats new in css3
Introduction to whats new in css3
 

Último

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
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
 

Último (20)

TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
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...
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
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
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
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
 
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
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 

Html & CSS - Best practices 2-hour-workshop