Skip to main content

Home/ HTML5 development/ Group items tagged data

Rss Feed Group items tagged

Vernon Fowler

Microdata - Dive Into HTML5 - 0 views

  • a third option developed using lessons learned from microformats and RDFa, and designed to be integrated into HTML5 itself: microdata.
  • “Adding microdata” to your page is a matter of adding a few attributes to the HTML elements you already have.
  • So where is the real information? It’s in the <dd> element, so that’s where we need to put the itemprop attribute. Which property is it? It’s the name property. Where is the property value? It’s the text within the <dd> element. Does that need to be marked up? the HTML5 microdata data model says no, <dd> elements have no special processing, so the property value is just the text within the element.
  • ...7 more annotations...
  • This technique is also useful for microdata. There are two distinct pieces of information here: a title and an affiliation. If you wrap each piece in a dummy <span> element, you can declare that each <span> is a separate microdata property.
  • There are two major classes of applications that consume HTML, and by extension, HTML5 microdata: Web browsers Search engines
  • Google supports microdata as part of their Rich Snippets program.
  • a handy tool to see how Google “sees” your microdata properties
  • Just like associating a URL with a Person, you can associate a URL with an Organization. This could be the company’s home page, a contact page, product page, or anything else. If it’s a URL about, from, or belonging to the Organization, mark it up with an itemprop="url" attribute.
  • To handle edge cases like this, HTML5 provides a way to annotate invisible data. This technique should only be used as a last resort. If there is a way to display or render the data you care about, you should do so. Invisible data that only machines can read tends to “go stale” quickly. That is, someone will come along later and update the visible text but forget to update the invisible data. This happens more often than you think, and it will happen to you too.
  • itemscope says that this element is the enclosing element for a microdata item with its own vocabulary (given in the itemtype attribute). All the properties within this element are properties of http://data-vocabulary.org/Geo, not the surrounding http://data-vocabulary.org/Organization.
Vernon Fowler

How You Can Use HTML5 Custom Data Attributes and Why - SitePoint - 0 views

  • Besides the data- prefix, the name of a valid custom data attribute must contain only letters, numbers, hyphen (-), dot (.), colon (:) or underscore (_). It cannot contain capital letters.
  • I recommend you use this method for quick prototypes rather than a production website, not least because CSS-only tooltips are not fully accessible.
Vernon Fowler

Data-Vocabulary.org - 0 views

  • The schema.org vocabulary can be used with both Microdata or RDFa 1.1 Lite syntax, and it has types for Event, Organization, Person, Product, Review, AggregateRating, Offer and hundreds of others.
  •  
    The schema.org vocabulary can be used with both Microdata or RDFa 1.1 Lite syntax, and it has types for Event, Organization, Person, Product, Review, AggregateRating, Offer and hundreds of others.
Vernon Fowler

HTML5 forms input types | HTML5 Doctor - 0 views

  • Once more, the iPhone recognises type="tel", only this time it goes one step further and completely changes the keyboard to the standard phone keyboard, as shown on the left in Figure 6. In addition to the iPhone, some Android devices (such as HTC Desire, shown on the right in Figure 6) also display a numeric keyboard for type="tel". That’s pretty handy, don’t you think? Nice, big keys for entering a phone number help you to get that big, nasty form completed quickly.
  • In contrast to Opera’s implementation, the iPhone (Figure 8) and some Android devices (such as HTC Desire, shown on the right in Figure 6-13) simply render the field as a standard text box but optimize the keyboard for easy input.
  • Chris’ technique may soon become absolete though with the introduction of the inputmode attribute. The attribute, recently added to the specification will allow users to specify the type of input mechanism that is most useful for users. When implemented, you will be able to choose between numeric, latin, email, or kana input modes.
  • ...3 more annotations...
  • To make the iPhone render with the standard telephone keypad as we saw for type="text" Chris Coyier, of CSS Tricks devised a little hoax you can use. Rather than using type=”number”, use a standard type="text" input and add a pattern attribute that accepts only numbers, as shown below. This solution isn’t ideal but if you think it could be useful, Chris has put a short video together showing it in action. <input type="text" pattern="[0-9]*" name="shoe-size">
  • There are dedicated keys for the @ and . characters to help you complete the field more efficiently. As we discussed with type="search", there is no downside to using type="email" right now. If a browser doesn’t support it, it will degrade to type="text". And in some browsers, users will get a helping hand.
  • The url input type, as you might expect, is for web addresses. You can use the multiple attribute to enter more than one URL. Like type="email", a browser will carry out simple validation on these fields and present an error message on form submission. This is likely to include looking for forward slashes, periods, and spaces, and possibly detecting a valid top-level domain (such as .com or .co.uk). Use the url input type like so: <input type="url" name="url" required>
Vernon Fowler

Why is Ogg better than MP3? - Quora - 0 views

  • a bit less data to produce the same quality, or will sound a bit better at the same bitrate
  • MP3 was also covered by a bunch of patents, so you had to license it for a fair bit of money; those patents have finally expired now. Ogg and Vorbis have always been free (and the reference implementation available under an LGPL and later BSD license).
Vernon Fowler

:required | CSS-Tricks - 0 views

  • The :required attribute works on radio buttons. If you put required on one radio button (or all), that particular group of radio buttons will be required. On checkboxes, makes each individual checkbox required (to be checked).
Vernon Fowler

: The Input (Form Input) element - HTML | MDN - 0 views

  • A single-line text field for entering search strings.
    • Vernon Fowler
       
      On mobile devices with on-screen keyboards, the search input type sets the submit button text to "Search". On desktop devices, this should also enable submitting the form by pressing the Enter key?
  • Possible values are: off: The user must explicitly enter a value into this field for every use, or the document provides its own auto-completion method. The browser does not automatically complete the entry. on: The browser is allowed to automatically complete the value based on values that the user has entered during previous uses, however on does not provide any further information about what kind of data the user might be expected to enter. name: Full name. honorific-prefix: Prefix or title (e.g. "Mr.", "Ms.", "Dr.", "Mlle"). given-name: First name. additional-name: Middle name. family-name: Last name.
  • inputmode
    • Vernon Fowler
       
      Currently not supported in any browser. https://caniuse.com/#feat=input-inputmode
  • ...4 more annotations...
  • This attribute applies when the value of the type attribute is text, search, tel, url, email, or password, otherwise it is ignored.
  • minlength HTML5 If the value of the type attribute is text, email, search, password, tel, or url, this attribute specifies the minimum number of characters (in Unicode code points) that the user can enter.
  • maxlength If the value of the type attribute is text, email, search, password, tel, or url, this attribute specifies the maximum number of characters (in UTF-16 code units) that the user can enter.
  • autocorrect A Safari extension, the autocorrect attribute is a string which indicates whether or not to activate automatic correction while the user is editing this field. Permitted values are: on Enable automatic correction of typos, as well as processing of text substitutions if any are configured.
1 - 9 of 9
Showing 20 items per page