Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
HTML and CSS
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
João Justo
February 20, 2015
Programming
49
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
HTML and CSS
João Justo
February 20, 2015
Transcript
43 slides
None
joaojusto jpjustonunes
None
https://github.com/groupbuddies/theshelf
https://github.com/groupbuddies/tripl.it
None
None
None
None
HTML good practices
Never use inline styles
<p style="color: red;">I'm going to make this text red!</p>
<p this text red! .red { color: red; }
Javascript files at the bottom
<p>All right, the use can see the whole page!</p> <script
type="text/javascript" src="file.js"></script> <script type="text/javascript" src=“another_file.js"></script> </body> </html>
Write semantic HTML
<div> <span class="big">Hello World</span> <a href="/home">Home</a> <a href="/link">Link</a> </div> <div
class="main"> <div class="title">Some article</div> </div>
<nav> <h1>Hello World</h1> <a href="/home">Home</a> <a href="/link">Link</a> </nav> <section> <h2>Some
article</h2> </section>
Minify Resources Optimize Images
Make your site accessible
Headings for structure not for style
None
<body> <h1>Page Title</h1> <section> <h1>First Section</h1> <article> <h1>Article title</h1> </article>
</section> </body>
<body> <h1>Page Title</h1> <section> <h2>First Section</h2> <article> <h3>Article title</h3> </article>
</section> </body>
ARIA Landmark Roles
None
blog.groupbuddies.com/posts/50-accessibility-matters
Tricks
How to add style to a checkbox?
http://codepen.io/joaojusto/ pen/emMLar
CSS architecture
Suit CSS SMACSS Atomic
But why?
The ugly
https://github.com/cesium/SEI15
#speakers { text-align: center; background-attachment: scroll; background-image: url(../img/background_events.png); background-position: center
center; background-repeat: none; -webkit-background-size: cover; -moz-background-size: cover; background-size: cover; -o-background-size: cover; height: 100%; padding-bottom: 30px; }
#organization { padding-bottom: 75px; background-attachment: scroll; background-image: url(../img/stuff-dark.png); background-position: center
center; background-repeat: none; -webkit-background-size: cover; -moz-background-size: cover; background-size: cover; -o-background-size: cover; }
stuff-dark.png background_events.png
The bad
.container { text-align: center; background-attachment: scroll; background-image: url(../img/background_events.png); background-position: center
center; background-repeat: none; -webkit-background-size: cover; -moz-background-size: cover; background-size: cover; -o-background-size: cover; height: 100%; }
.container-speakers { padding-bottom: 30px; } <section class=“container container-speakers“> .container-organization {
padding-bottom: 75px; } <section class=“container container-organization“>
None
joaojusto jpjustonunes Thanks
More Decks by João Justo
See All by João Justo
Real Time gaming with Web RTC
joaojusto
0
40
Other Decks in Programming
See All in Programming
仕様駆動開発入門 (何を作るかを先に決めて渡す) | 目指せ Kiro マスター 05
inariku
PRO
3
220
まずはコードより業務と向き合う:テーブル解体のためにPdMを呼んだ話
sakawe_ee
0
270
なぜ私たちは「現時点では」KMPの導入を見送ったのか
chigichan24
1
630
React Native経験者が Flutterを30⽇間触って驚いたこと
3saito
0
210
自宅サーバはどこまで再現できるのか - Proxmox VE上のVM環境をIaCとバックアップで戻してみた
youto
0
450
クラウドゲーミングのパフォーマンス最適化に挑む / Cloud Gaming Performance Tuning
vivion
0
360
Scalaの型でマルチテナントの認可を守る
nextbeatdev
0
180
止まらない比較を止める — 余帰納法で無限ストリームを比べる
tarao
0
210
AI時代のIaC入門 〜なぜインフラをコードで管理したいのか?〜 / Introduction to IaC in the AI Era
akihisaikeda
6
1.6k
Secure Your Coding Agent Like It’s Malware (v1.5) 🇬🇧 @Code.talks 2026
richargh
0
200
Materialが消えた日 〜真っ白なFlutterキャンバスにRenderObjectで絵を描く〜
umigishiaoi
0
170
社内AIエージェント「Askワンバン」における コストチューニングの取り組み
t0yohei
0
180
Featured
See All Featured
Raft: Consensus for Rubyists
vanstee
143
7.9k
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
990
Code Reviewing Like a Champion
maltzj
529
40k
Are puppies a ranking factor?
jonoalderson
2
4.2k
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
2
450
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
2
400
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
1
390
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
Reality Check: Gamification 10 Years Later
codingconduct
0
2.4k
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.6k
Building Adaptive Systems
keathley
44
3.3k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
230
23k