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
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
João Justo
February 20, 2015
Programming
48
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
39
Other Decks in Programming
See All in Programming
AWS CDKを理解するために公式の定義を深掘って解説してみる / Understanding AWS CDK by Digging into Its Official Definition
akihisaikeda
3
310
自作Discord音声botをLambda MicroVMsに移行した話 / Migrating My Discord Voice Bot to Lambda MicroVMs
akihisaikeda
1
380
オーケストレーション記述言語 Katari
yukikurage
0
270
AI時代のシニアエンジニアとは
yosuke_furukawa
PRO
15
12k
手の動かし方がわからなかった私が個人開発者になるまで
usagi0920_pochi
0
270
エラーチャンネルのボールを拾い続けて鍛えるエンジニアの地力 / phpcon-niigata2026
meihei3
1
450
React Native에 현대적인 빌드 도구 더하기: Rollipop 구현기
leegeunhyeok
0
180
ローカルLLMの基本と近況 2611 / Local LLM basics and recent situation 2611
kishida
3
590
疎結合とは何か?ソフトウェア設計における結合バランスについて考える #phpcon_niigata
kajitack
2
330
Getting Started with Vibe Coding
miccheng
0
240
どうしても Eloquent でリポジトリパターンをやりたいんだ #phpcon_niigata / phpcon-niigata-2026
shogogg
0
620
SFCで実現する病院・医療システムの動的組み立て式UI
koukimiura
1
180
Featured
See All Featured
Reflections from 52 weeks, 52 projects
jeffersonlam
356
22k
The untapped power of vector embeddings
frankvandijk
2
2k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
1.1k
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
340
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
56
3.5k
Designing for Performance
lara
612
70k
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
350
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
3
3.9k
The agentic SEO stack - context over prompts
schlessera
0
1k
Fantastic passwords and where to find them - at NoRuKo
philnash
53
4k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
23k
Building Flexible Design Systems
yeseniaperezcruz
330
41k