X-Weather: Weather Widget HTML5 Web Component

X-Weather is a HTML5 Web Component, utilizing the weather API of openweathermap.org.

thumb

HTML Attributes of the Tag

Apart from the standard HTML attributes (style, class, id, etc.), the tag also supports the following component-specific attributes:

  • city – The city, which weather will be displayed, for example: country="London". Required attribute.
  • countrycode – 2-letter country code, for example: countrycode="uk". Required attribute.
  • width – Width of the component in pixels. Optional. Default width: 256.
  • height – Height of the component in pixels. Optional. Default width: 64.
  • bgcolor – Optional background color of the component. Default color: #666.

Have a great day, and don’t forget to check the demo on this page.

If you share the same interest towards HTML5 Web Components as I do these days, make sure you read my relevant blog posts and further endeavors on my HTML5, CSS3 and JavaScriptExperiments and Insight website.