Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
HTML and CSS
Search
João Justo
February 20, 2015
Programming
1
47
HTML and CSS
João Justo
February 20, 2015
Tweet
Share
More Decks by João Justo
See All by João Justo
Real Time gaming with Web RTC
joaojusto
0
36
Other Decks in Programming
See All in Programming
MUSUBIXとは
nahisaho
0
130
Rust 製のコードエディタ “Zed” を使ってみた
nearme_tech
PRO
0
160
コマンドとリード間の連携に対する脅威分析フレームワーク
pandayumi
1
450
AI時代のキャリアプラン「技術の引力」からの脱出と「問い」へのいざない / tech-gravity
minodriven
21
7.1k
15年続くIoTサービスのSREエンジニアが挑む分散トレーシング導入
melonps
2
190
なぜSQLはAIぽく見えるのか/why does SQL look AI like
florets1
0
450
Unicodeどうしてる? PHPから見たUnicode対応と他言語での対応についてのお伺い
youkidearitai
PRO
1
2.5k
SourceGeneratorのススメ
htkym
0
190
ぼくの開発環境2026
yuzneri
0
190
AI & Enginnering
codelynx
0
110
React 19でつくる「気持ちいいUI」- 楽観的UIのすすめ
himorishige
11
7.3k
CSC307 Lecture 07
javiergs
PRO
0
550
Featured
See All Featured
Optimizing for Happiness
mojombo
379
71k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.6k
Skip the Path - Find Your Career Trail
mkilby
0
54
Navigating Weather and Climate Data
rabernat
0
100
Crafting Experiences
bethany
1
48
How To Stay Up To Date on Web Technology
chriscoyier
791
250k
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
270
Un-Boring Meetings
codingconduct
0
200
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
2
410
A Soul's Torment
seathinner
5
2.2k
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
180
VelocityConf: Rendering Performance Case Studies
addyosmani
333
24k
Transcript
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