Also by Mark Myers
A Smarter Way
To Learn HTML & CSS
Learn it faster. Remember it longer.
Mark Myers
Copyright 2015 Mark Myers
All rights reserved, including the right to reproduce this book, or any portions of it, in any form.
1.0
http://www.ASmarterWayToLearn.com
Chapters
Learn it faster.
Remember it longer.
If you embrace this method of learning, youll get the hang of HTML and CSS in less time than you might expect. And the knowledge will stick.
Youll catch onto concepts quickly.
Youll be less bored, and might even be excited. Youll certainly be motivated.
Youll feel confident instead of frustrated.
Youll remember the lessons long after you close the book.
Is all this too much for a book to promise? Yes, it is. Yet I can make these promises and keep them, because this isnt just a book. Its a book plus 1,800 interactive online exercises. Ive done my best to write each chapter so its easy for anyone to understand, but its the exercises that are going to turn you into a real HTML coder.
Cognitive research shows that reading alone doesnt buy you much long-term retention. Even if you read a book a second or even a third time, things wont improve much, according to research.
And forget highlighting or underlining. Marking up a book gives us the illusion that were engaging with the material, but studies show that its an exercise in self-deception. It doesnt matter how much yellow you paint on the pages, or how many times you review the highlighted material. By the time you get to Chapter 50, youll have forgotten most of what you highlighted in Chapter 1.
This all changes if you read less and do moreif you read a short passage and then immediately put it into practice. Washington University researchers say that being asked to retrieve information increases long-term retention by four hundred percent. That may seem implausible, but by the time you finish this book, I think youll believe it.
Practice also makes learning more interesting.
Trying to absorb long passages of technical material puts you to sleep and kills your motivation. Ten minutes of reading followed by twenty minutes of challenging practice keeps you awake and spurs you on.
And it keeps you honest.
If you only read, its easy to kid yourself that youre learning more than you are. But when youre challenged to produce the goods, theres a moment of truth. You know that you knowor that you dont. When you find out that youre a little shaky on this point or that, you can review the material, then re-do the exercise. Thats all it takes to master this book from beginning to end.
Ive talked with many readers who say they thought they had a problem understanding technical concepts. But what looked like a comprehension problem was really a retention problem. If you get to Chapter 50 and everything you studied in Chapter 1 has faded from memory, how can you understand Chapter 50, which depends on your knowing Chapter 1 cold? The read-then-practice approach embeds the concepts of each chapter in your long-term memory, so youre prepared to tackle material in later chapters that builds on top of those concepts. When youre able to remember what you read, youll find that you learn HTML and CSS quite readily.
I hope you enjoy this learning approach. And then I hope you go on to set the Internet on fire with some terrific webpages.
How to use this book
Since you may not have learned this way before, a brief user manual might be helpful.
- Study, practice, then rest. If you're intent on mastering the fundamentals of HTML and CSS, as opposed to just getting a feel for it, work with this book and the online exercises in a 15-to-30-minute session, then take a break. Study a chapter for 5 to 10 minutes. Immediately go to the online links given at the end of each chapter and code for 10 to 20 minutes, practicing the lesson until you've coded everything correctly. Then take a walk.
- Dont wear yourself out. You learn best when youre fresh. If you try to cover too much in one day, your learning will go downhill. Most people find they can comfortably cover one to three chapters a day. Your experience may vary.
- If you find some of the repetition tiresome, skip exercises. I wrote the exercises for people like me, who need a lot of repetition. If youre a fast learner or a learner with some HTML experience, theres no reason to burden yourself. Click the Skip Exercise and Get Credit button to jump ahead. Skip whole sets of exercises if you dont need them. Practice as much as you need to, but no more.
- If you struggle with some exercises, you know youre really learning. An interesting feature of your brain is that the harder it is for you to retrieve a piece of information, the better you remember it next time. So its actually good news if you have to struggle to recall something from the book. Dont be afraid to repeat a set of exercises. And consider repeating some exercises after letting a few weeks go by. If you do this, youll be using spaced repetition, a power-learning technique that provides even more long-term retention.
- Do the coding exercises on a physical keyboard. A mobile device can be ideal for reading, but it's no way to code. Very, very few Web developers would attempt to do their work on a phone. The same thing goes for learning to code. Theoretically, most of the interactive exercises could be done on a mobile device. But the idea seems so perverse that I've disabled online practice on tablets, readers, and phones. (It also simplified my own coding work.)
- If you have an authority problem, try to get over it. When you start doing the exercises, you'll find that I can be a pain about insisting that you get every little detail right. For example, if you omit a semicolon, the program monitoring your work will tell you the code isn't correct, even though it might run. Learning to write code with fastidious precision helps you learn to pay close attention to details, a fundamental requirement for coding in any language.
- Subscribe, temporarily, to my formatting biases. Current code formatting is like seventeenth-century spelling. Everyone does it his own way. There are no universally accepted standards. But the algorithms that check your work when you do the interactive exercises need standards. They can't grant you the latitude that a human teacher could, because, let's face it, algorithms aren't that bright. So I've had to settle on certain conventions. All of the conventions I teach are embraced by a large segment of the coding community, so you'll be in good company. But that doesn't mean you'll be married to my formatting biases forever. When you begin coding projects, you'll soon develop your own opinions or join an organization that has a stylebook. Until then, I'll ask you to make your code look like my code.
1
HTML & CSS
An HTML (Hypertext Markup Language) document is a text file that tells the browser (Chrome, Firefox, Internet Explorer, Safari, and others) how to assemble a webpage. It says to the browser, Put this heading here. Put that paragraph there. Insert this picture here. Put that table there.
Though it can create webpages with formatting that is sometimes elaborate and even beautiful, an HTML document itself is pure text, without any formatting whatsoever. This means you cant use a word processing program like Microsoft Word to write HTML, because Word and other word processors add formatting. Instead, youll choose from any number of editing programs that produce pure text. The simplest of these is Notepad on a PC and TextEdit, in Plain Text mode, on a Mac. You can also use fancier editing programs. And there are web development tools like Dreamweaver. They all create the pure text required for HTML. My favorite code editor is the open source Brackets, free at http://brackets.io/.