Google to let app developers create "own HTML tags"

Amongst all the announcements at Google I/O, the search giant's annual conference, one of the more eyebrow-raising was its plan to let Android developers create their own HTML tags via Google's Web Components (opens in new tab) technology.

  • Read all our HTML articles here (opens in new tab)
  • Read all our web design articles here (opens in new tab)

At the event, Linus Upson, VP of engineering for Chrome, explained that an as-yet-unnamed framework, which he described as the "first toolkit to natively take advantage of Web Components", will enable you to reuse "bits of JavaScript, CSS and HTML" across different devices and platforms to make app creation faster and more productive.

"The goal here is to be able to allow developers to create their own tags, use them on a phone, and then take those same components onto a tablet," said Upson. He added that this idea is still at the early stages and not ready for use yet.


So what does this all mean in practice? We spoke to Peter Gasston (opens in new tab), author of The Modern Web (opens in new tab) and The Book of CSS3 (opens in new tab), to put the announcement into context.

"Custom elements is one part of the larger Web Components spec, which is being driven by Google but developed as a standard at the W3C," he explains. "Mozilla and WebKit are also working on implementations of various pieces of the spec.

"When you create a custom element you can attach extra markup, style and behaviour inside it, which are hidden from the DOM; this is like the way a video element has its own controls. Using custom elements you can create re-usable components which are encapsulated - that is, they can be applied across many pages without fear or markup pollution or interference from local styles or scripts.

Define and register

"It's not just a case of creating new elements on a whim; you can't just drop a new element into the page, you have to define and register it first," continues Gasston.

"Once registered, you can either include your new component directly into the page, or extend an existing element - to pluck an example out of the air, you could make a custom element to extend a button to include an attached to-do list. If you extend an element in this way, only the original element shows in the DOM, all of the extra custom markup will be hidden."

"So it's not a case of Google pushing random and arbitrary creation of new elements, it's an ongoing cross-browser effort aimed at building the next generation of interactive, modular pages."

For more details, see this article on (opens in new tab) and this explanation of custom elements (opens in new tab).

  • For a round up of the main announcements at Google I/O, check out this special report (opens in new tab) from our sister site Tech Radar (opens in new tab).

Thank you for reading 5 articles this month* Join now for unlimited access

Enjoy your first month for just £1 / $1 / €1

*Read 5 free articles per month without a subscription

Join now for unlimited access

Try first month for just £1 / $1 / €1

The Creative Bloq team is made up of a group of design fans, and has changed and evolved since Creative Bloq began back in 2012. The current website team consists of six full-time members of staff: Editor Kerrie Hughes, Deputy Editor Rosie Hilder, Deals Editor Beren Neale, Senior News Editor Daniel Piper, Digital Arts and Design Editor Ian Dean, and Staff Writer Amelia Bamsey, as well as a roster of freelancers from around the world. The 3D World and ImagineFX magazine teams also pitch in, ensuring that content from 3D World and ImagineFX is represented on Creative Bloq.