-
Notifications
You must be signed in to change notification settings - Fork 11
01 The Pure and Clean Web: HTML and CSS
Folks will tell you often, to use pure markup, pure HTML, or pure CSS, so in other words - avoid JavaScript. Since the language is TIMTOWTDI (read: Tim Towdy), broken, dangerous etc.
- TIMTOWTDI
-
Perl’s motto, There Is More Than One Way To Do It, illustrates that you can do even most simple thing in many ways. In fact, some say, too many (that’s why Python goes with something quite opposite).
JS is a powerful language, but you hardly can find common guidelines and Perl’s approach is prevalent here as well. So, for simplicity, we’ll start without it. Leaving the scares aside, there is indeed a lot you can do with just HTML and CSS (or mainly CSS, as Dave Shea’s ZEN Garden presents). And it leaves out a lot of complexity. So, let’s have it. The clean 🍀 and pure 💧 way of true World Wide Web 🌐 - ™. ;-P
- CSS Zen Garden
-
website by Dave Shea and many glorious others, where CSS power is shown. Each version of the website has same markup, but looks WILDLY different: http://www.csszengarden.com/
ℹ️
|
all exercises are on their own dedicated page |
- HTML
-
HyperText Markup Language. Created by sir Tim Berners-Lee with several inspirations, including lesser known book Garden of Forking Paths. Initially for scientist, to easily follow citations and sources of papers.
- HyperText
-
more than text, text enriched with multimedia content and able to encompass other texts within. Nesting is done through relations.
- Relation
-
link between two things, people, documents, files… Concept that was built into web, though never took off as intended. You can find it in CSS (
link rel
).
We will cover HTML4 and 5, along with several good practices and layouts.
Topics to know / understand:
-
What is HTML
-
How is HTML4 different from others
-
How to migrate from HTML4
-
Doc types in HTML4
-
HTML4 "new" tags
-
Tag categories or on element types
-
Working with text
-
Working with forms
-
Working with frames and problems there
-
HTML template for new page
-
MIME types
-
Good header
-
Meta information about page
-
What will happen if you do it wrong
Good header, good minimal document, order of items there, how to load scripts… These questions have been asked before and got a number of answers. Peruse them and learn at your own leisure:
❗
|
How the browser knows WHAT it is to display? Aka, MIME types.
Browser is given content, and *somehow* it knows what that content is. How it knows if it’s an image, a text or a binary? Read, and find out, but be aware that most of links here deal with FF. Different browser will be - well - different. |
ℹ️
|
Questions
Please, find in the materials above answers to following questions:
|
Introducing new tags and capabilities, adding audio, video, graphics, slew of semantic tags and LOTS of form goodies, HTML5 revamps HTML greatly and makes most layouting work much easier and fun.
💡
|
Excellent (and obligatory) reading material: http://diveintohtml5.info |
ℹ️
|
Questions
Common HTML5 questions are similar (or identical) to previous ones:
|
ℹ️
|
Advanced features of HTML5 (everything else than semantic tags and form goodies) are best covered after some JS is known, so we’ll cover them later. |
Once we learned to doodle, it’s time to make it ugly, shiny, unbearable, pretty. Ratio is up to you.
- CSS
-
Cascading Style Sheets, ancillary technology for HTML, to style the markup and change it’s appearance, based on rules.
While initially you would use markup for both semantic and presentation, this was messy and hard to reason (why is this tag here, for it’s semantic or due to presentation reasons?) about, so folks decided to split: HTML for structure, CSS for look&feel.
🔥
|
Questions:
|
-
Container
-
Inheritance
-
Default rules
-
Browser wars strike again
-
Browser vendors and their prefixes
-
Resets
🔥
|
Questions:
|
-
Dimensions
-
Block or inline (or flow and phrasing)
-
Float (and clear)
-
Hiding elements
-
Measurement units
-
Box model
-
Positioning
-
Depth, or stacking elements
💡
|
Most important book on CSS you may read. It explains why there are 5 different box models, that display may be overwritten by formatting context, set by siblings, etc.
|
🔥
|
Questions:
|
HTML -> CSS -> JS; only then we move on to apps and frameworks. Always remember to pace yourself.