HTML5 is the greatest version of HTML ever! (Well, at least until the next awesome version comes out). I just learned how trivially easy it is to force downloads with HTML5.
Forcing Downloads is Easy—HTML5 to the Rescue!
Not only is there a better way, but it’s trivially easy to implement. I just add the keyword download to my anchor and BAM! the browser will pop a dialog box. I haven’t tested it in a lot of browsers (or devices), but it’s still huge! I mean, as a fallback I can attach a download function only to links that have the download keyword in them.
Now my download links look like this:
<ahref="link to file"download="">Download the PDF</a>
While responsive web design uses CSS to adjust web designs to respond to the devices viewing the page, you need to start with good HTML. Chapter 5 of my latest book Sams Teach Yourself Responsive Web Design in 24 Hours helps you learn the basics of HTML so that you’re ready to create a responsive website.
Note that if you’re a complete novice to HTML, this chapter will only be a starting place. It’s intended as an introduction to the minimum HTML you might need to do RWD. If you need to learn HTML, you should check out my first Sams book: Sams Teach Yourself HTML5 in 24 Hours (get a copy).
I’m pleased to announce that the latest version of my book Sams Teach Yourself HTML5 Mobile Application Development in 24 Hours is available in a Learning Lab format from Pearson.
The Learning Lab takes the entire book and adds interactive quizzes, videos, step-by-step lessons, and live code editing right in the book. If you’ve wanted to do more practice while learning HTML5, this is an excellent version of the book to get.
Three Free Chapters
The first three chapters are available online for free for you to try out and see if this version will work for you.
Some people have wondered if I’m still around or maintaining this site (and the book) and I am, I’ve just been fairly busy. I hope to announce some exciting new things in the coming months, but in the meantime I can’t post as often.
If you want to learn HTML, my book is a great place to start, and you can also get help on my site at About.com: Web Design / HTML.
I’ve posted the second issue of my HTML5 Zeen today. There are a few things that are wonky with the issue, most notably that Zeen says it’s “Issue #3” when it’s #2. But whatever.
In this issue I show you some ways to get started with HTML5 if you haven’t already. Including the cover image which shows you the basics for what you need to write to create an HTML5 document.
Writing HTML5 is Really Easy
All it takes is a DOCYTPE:
And you’ve got an HTML5 document. One thing that most people forget is that HTML5 is not a new language. It’s evolved from HTML 4.01 and HTML 3.2 and all the versions before. So if you’re writing HTML 4.01 today, you can start writing HTML5 by just changing one line of your HTML. Don’t worry about changing anything else.
The Zeen issue goes into more detail about dealing with older browsers like IE8 and using editors like Dreamweaver to write your HTML5, but at the end of the day, just putting up the new doctype is all it takes. Poof! You are using the most up-to-date specification. That didn’t hurt a bit!