Im in ur browser, embeddin my contents
Many people have been passing around the fact that HTML5 is "awesome" or "has a ton of features", etc. It's going to revolutionize the web! ... Right. It indeed has a ton of improvements, but I doubt ye olde regular intarwubs coder is going to even be aware of them. I mean, seriously: <time> tags for denoting time/date? What the heck?
HTML 5 improves interoperability and reduces development costs by making precise rules on how to handle all HTML elements, and how to recover from errors.
Right, because being able to clarify to the browser if a certain thing is an article is useful in the end. To some style development or niche features (a Firefox plugin to generate citations, anyone?) this might be useful, but for a general coder: who cares?
However, there are a few things that I do think people need to be aware of. To be specific, these 4 tags: <audio>, <video>, <embed>, and <canvas>. Canvas will be a separate entry, just because it is insane.
Now...
<embed>
Let's start simply. This tag gives you a much simpler interface than <object> or other old ways of embedding plugins into a page. Those usually required Javascript, and were really just workarounds. Lately, the <embed> tag has emerged as the central element in these tag messes, so W3C is going to standard-ify it. Now, web developers can embed anything into a webpage, and given that their viewers have the proper plugin to view the embedded item, they will be able to see it. For example:
<embed class="centered" src="http://blog.opensourcenerd.com/upload/ohai-i-upgraded-your-ram" />
Apologies to those of you who are not using a competent browser, you don't get to see the kitty. (That means you, IE users.) Now, that embed was just a JPEG file, but if it were SWF, MP3, etc. it would still appear just fine, in whatever plugin your browser chose: for Windows people, it's usually QuickTime; for Linux, it varies (totem, mplayer, etc). But, it works.
Now, what people mostly embed into webpages is audio and (especially) video. So, let's look at those:
<video>
I started with this one first just because it's pretty friggin awesome. With the code:
<video class="centered" src="http://blog.opensourcenerd.com/upload/dramatic-look" controls="true"> Your browser doesn't support the video tag. </video>
... I can get this:
And guess what? No. Flash. Involved. Adobe can go flash-play with itself, because I'm not using its product to view a video! Hah!
Seriously though, this is a big development. It might only support Theora and Ogg Vorbis in Firefox (both open formats) for now, but it's a step in the right direction: open and free ways to share information. No depending on a proprietary 3rd party middleman to interpret and present your information. No vendor lock-in. Woot.
Also, it includes useful options such as "autoplay", resizing via "height" and "width", looping, "poster" to show an image while it's loading, etc. And it makes me happy.
<audio>
Audio functions much like video does, with its own set of neat options (a little more limited than the video's, for obvious reasons), but is pretty much the same thing. For example, to play the Ubuntu login sound:
<audio class="centered" src="http://blog.opensourcenerd.com/upload/ubuntu-login-sound" controls="true"> Your browser doesn't support the audio tag. </audio>
Much fun.
Anyway, again, apologies to those of you who could not see this. The samples above were tested in Windows Vista Ultimate with Firefox 3.5.3 and in Ubuntu 9.04 "Shiretoko" 3.5.3 (actually Firefox 3.5.3, but Jaunty sucks.) If it doesn't work for you, you're probably using another browser. Or you're clearly not awesome enough.
The point that I'm trying to get across, though, is that Firefox is leading a movement toward a new intorwab that does not lock you down to some dominating companies' products to view it. Especially when those products are closed-source and could be doing anything without your knowledge. Paranoia aside, even if you're using closed-source Chrome, Safari or (shudder) Internet Explorer, you don't have to install Adobe's jewel of a product just to get Rickroll'd.
Irrelevant note: I'm writing this on using Emacs on Vista because my laptop with Ubuntu is currently busy screwing itself over because of trying to compile Chromium.
"Paranoia aside, even if you're using closed-source Chrome, Safari or (shudder) Internet Explorer, and you don't have to install Adobe's jewel of a product just to get Rickroll'd."
i find your lack of competent grammar disturbing
i like the post though
"It's going to revolutionize the web!"
You could say the same about CSS3... You could also say that they are both going to completely screw IE...
- Grammar fixed.
- Emacs on Vista is actually pretty smooth. It's still technically a "port" since Emacs thinks it's running in a Unix-ish environment and there's an abstraction layer that converts paths and whatnot from Vista's weird stuff to Unix.
- Only Firefox supports <audio> and <video> for now. I know that. Use Firefox!
- Thanks for the Diggs, whoever that was...
I don't know - what advantages does using the <embed> tag with images have over <img src>?
Why on earth would you use emacs on a Windows machine? Just use Notepad++!
On a similar note, why do you have Vista installed? Get 7.
...I can't believe you used the E and V words...in the same sentence.