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
AIによるイベントストーミング図からのコード生成 / AI-powered code generation from Event Storming diagrams
nrslib
2
1.8k
AI前提で考えるiOSアプリのモダナイズ設計
yuukiw00w
0
220
CSC307 Lecture 07
javiergs
PRO
0
550
フロントエンド開発の勘所 -複数事業を経験して見えた判断軸の違い-
heimusu
7
2.8k
MDN Web Docs に日本語翻訳でコントリビュート
ohmori_yusuke
0
640
疑似コードによるプロンプト記述、どのくらい正確に実行される?
kokuyouwind
0
380
「ブロックテーマでは再現できない」は本当か?
inc2734
0
520
高速開発のためのコード整理術
sutetotanuki
1
390
AI時代の認知負荷との向き合い方
optfit
0
150
なぜSQLはAIぽく見えるのか/why does SQL look AI like
florets1
0
450
Unicodeどうしてる? PHPから見たUnicode対応と他言語での対応についてのお伺い
youkidearitai
PRO
1
1.1k
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
500
Featured
See All Featured
Amusing Abliteration
ianozsvald
0
96
Heart Work Chapter 1 - Part 1
lfama
PRO
5
35k
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
130
Fireside Chat
paigeccino
41
3.8k
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
280
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
120
Testing 201, or: Great Expectations
jmmastey
46
8k
Evolving SEO for Evolving Search Engines
ryanjones
0
120
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
3.3k
AI Search: Where Are We & What Can We Do About It?
aleyda
0
6.9k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
55k
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