Category: html

Best Practice for Creating Custom Elements

It looks like cus¬≠tom ele¬≠ments, and web com¬≠po¬≠nents in gen¬≠er¬≠al, are begin¬≠ning to break through into gen¬≠er¬≠al devel¬≠op¬≠er con¬≠scious¬≠ness, as I see more and more arti¬≠cles and talks dis¬≠cussing what they are, what they are good for, and how to make them.

As they‚Äôre not yet being used heav¬≠i¬≠ly in devel¬≠op¬≠ment, how¬≠ev¬≠er, I think there‚Äôs a good oppor¬≠tu¬≠ni¬≠ty to define best prac¬≠tices in the way we use them. In this post I want to pro¬≠pose a best prac¬≠tice method for writ¬≠ing cus¬≠tom ele¬≠ments: I‚Äôll do that by com¬≠par¬≠ing two meth¬≠ods for cre¬≠at¬≠ing cus¬≠tom ele¬≠ments, along with the advan¬≠tages and draw¬≠backs of each.

Aside: it strikes me that I haven’t writ­ten about cus­tom ele­ments here on my own blog, despite hav­ing giv­en a few talks and writ­ten a few pub­lished arti­cles on the sub­ject. In case you’re not sure what they are, I rec­om­mend you read my Detailed Intro­duc­tion To Cus­tom Ele­ments first.

Read the full article

Introducing HTML’s new template element

You may have heard of Web Com­po­nents, a suite of emerg­ing stan­dards that make it pos­si­ble to build secure reusable wid­gets using web plat­form tech­nolo­gies. One of the first specs to make its way into imple­men­ta­tion is HTML Tem­plates, embod­ied by the template ele­ment, which as I write this is imple­ment­ed in Chrome Canary and Fire­fox Nightly.

Read the full article

Guest Article for HTML5 Doctor

As well as my CSS tips on the Safari Books Online blog, yes­ter­day also saw pub­li­ca­tion of my arti­cle CSS3 Pseu­do-Class­es and HTML5 Forms on HTML5 Doc­tor. Those guys real­ly know their stuff, so I was delight­ed to be asked to contribute.

The Media Fragments Module

One W3C spec­i­fi­ca­tion which seems to have slipped below most peo­ple’s radar is Media Frag­ments 1.0, which moved to Can­di­date Rec­om­men­da­tion sta­tus in Decem­ber last year. Media Frag­ments is a syn­tax which extends the URLs of media files so that only select­ed por­tions are made avail­able to the user; let me explain that fur­ther with a cou­ple of examples.

Read the full article

Styling HTML5 Form Validation Errors

Back in March I wrote about HTML5 Form val­i­da­tion and the prob­lem with the appear­ance of error mes­sages. I pro­posed a syn­tax for styling the error mes­sages, and short­ly after I pub­lished the post, I sub­mit­ted the pro­pos­al to the W3C via the www-style mail­ing list.

I‚Äôll dis¬≠cuss quick¬≠ly the result of that sub¬≠mis¬≠sion, but first I should men¬≠tion that I‚Äôve since found out that the Google Chrome devel¬≠op¬≠ers have already imple¬≠ment¬≠ed their own syn¬≠tax, and it‚Äôs not too far removed from what I pro¬≠posed. Before I get to that, how¬≠ev¬≠er, allow me to gripe.

Read the full article

HTML5 Form Validation

A lot of the atten­tion paid to HTML5 Forms has been cen­tred around the new input types. email, url, date, and the rest are all very con­ve­nient, but for me the real­ly use­ful fea­ture is the built-in val­i­da­tion. In case you’re not aware of it, the brows­er will now han­dle all of the val­i­da­tion that we used to use JavaScript for.

This is great for the future, but although you can start using these func¬≠tions now (in many browsers), they aren‚Äôt with¬≠out their draw¬≠backs ‚ÄĒ well, one big draw¬≠back real¬≠ly. I‚Äôm going to explain briefly the prob¬≠lem, and then pro¬≠pose a solution.

Read the full article



I‚Äôve updat¬≠ed my Speak¬≠ing page to include more con¬≠fer¬≠ences, more videos, and a lit¬≠tle on my speak¬≠ing require¬≠ments and pref¬≠er¬≠ences. I‚Äôm plan¬≠ning to cut down on the num¬≠ber of talks I give in 2014 (twelve is too many), but am always open to inter¬≠est¬≠ing offers and oppor¬≠tu¬≠ni¬≠ties, so please get in touch if you‚Äôre organ¬≠is¬≠ing an event.

[#] 1 Comment