Skip to main content

Home/ HTML5 development/ Group items tagged element

Rss Feed Group items tagged

Vernon Fowler

HTML Standard - 0 views

  • The value of input elements whose type attributes are in the Text, Search, URL, or E-mail states and that are mutable (i.e. that do not have the readonly attribute specified and that are not disabled).The value of textarea elements that do not have a readonly attribute and that are not disabled.
    • Vernon Fowler
       
      Note the input types that we can set spellcheck="false" include: email url search text
  • Otherwise, if there is an ancestor element with a spellcheck content attribute that is not in the default state, then: if the nearest such ancestor's spellcheck content attribute is in the true state, then checking is enabled; otherwise, checking is disabled.
  • User agents should take into account the other semantics given in the document when suggesting spelling and grammar corrections. User agents may use the language of the element to determine what spelling and grammar rules to use, or may use the user's preferred language settings. UAs should use input element attributes such as pattern to ensure that the resulting value is valid, where possible.
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

The section element | HTML5 Doctor - 1 views

  • A general rule is that the section element is appropriate only if the element’s contents would be listed explicitly in the document’s outline.
  • The theme of each section should be identified, typically by including a heading (h1-h6 element) as a child of the section element.
  • Don’t use it just as hook for styling or scripting; that’s a div
  • ...2 more annotations...
  • Don’t use it unless there is naturally a heading at the start of the section
  • As blogposts and comments are often syndicated (by being pulled into other blogs or being linked via twitter, reddit etc) they should be articles.
    • Vernon Fowler
       
      Use rather than for blog post and for comment content types.
Vernon Fowler

The abbr element | HTML5 Doctor - 0 views

  • To get <abbr> working in IE6 and IE7, you need to create the element with JavaScript:
    • Vernon Fowler
       
      Check you HTML5shim or Modernizr script - either probably already caters for this element.
  • If you’re ever tempted to use an <acronym>, just use <abbr> instead!
Vernon Fowler

Document Outlines | HTML5 Doctor - 0 views

  • The sectioning elements act quite literally as their name suggests: they define sections of the parent element. These sections can be thought of as child nodes whose headings fall under their parent heading, regardless of their rank.
  • Sections may contain headings of any rank, but authors are strongly encouraged to either use only h1 elements, or to use elements of the appropriate rank for the section’s nesting level.
  • For accessibility reasons, we recommend each sectioning element have a heading, even <aside> and <nav>, as shown below. If you don’t want these headings to be visible, you can always hide them with CSS.
  • ...2 more annotations...
  • It’s best if you use logical heading levels — <h1>–<h6> — at least until the new outlines are more widely supported.
  • Unfortunately, there is little support for the new outlining algorithms right now. Search engines may be experimenting with it in their crawling algorithms as you read this, but as far as we know, headings are treated just as they were before. You won’t be penalised for using them, even if you use multiple <h1>s (which have always been okay as far as the spec is concerned). Check out our HTML5 and Search Engine Optimisation article for more on search engines and HTML5.
Vernon Fowler

The hgroup element | HTML5 Doctor - 0 views

  • An article with a title and metadata
  • An article with a title and subtitle
  • An article with a title, subtitle and metadata
  • ...4 more annotations...
  • If you have a title with subtitle(s) and other metadata associated with the section or article, place both the <hgroup> and the metadata within a single <header> element.
  • If you have a title with subtitle(s) or tag lines (i.e., more than one consecutive <h1>–<h6>), group them in an <hgroup>.
  • When grouping headings in an <hgroup> element, the outline algorithm will mask the lowest level all but the highest level heading in the group from the resulting document outline.
  • It can only contain a group of <h1>–<h6> element(s), and it should be used for subtitles, alternative titles, and tag lines.
Vernon Fowler

Semantic navigation with the nav element | HTML5 Doctor - 1 views

  • Previous/next buttons (or pagination) I would say yes to this because it is important to the overall structure and hierarchy of the blog/site
  • Search form For me, a definite yes, but it is not mentioned in the spec. A search form is hugely important to the navigation of a site, particularly large sites which rely almost solely on their search engine.
  • Breadcrumbs Again, I would say yes to this as well. Although breadcrumbs are not always necessary and can be used when not applicable, on large sites a breadcrumb trail can be an important navigation aid.
  • ...3 more annotations...
  • <menu> is to be used for a list of commands and is an interactive element and more likely to be used exclusively in Web Applications.
  • The nav element represents a section of a page that links to other pages or to parts within the page: a section with navigation links.
  • Table of Contents I would say definitely yes to that – it is primary navigation for that particularly content
  •  
    Breadcrumbs Again, I would say yes to this as well. Although breadcrumbs are not always necessary and can be used when not applicable, on large sites a breadcrumb trail can be an important navigation aid.
Vernon Fowler

- HTML: Hypertext Markup Language | MDN - 0 views

  • A string value of any means that no stepping is implied, and any value is allowed (barring other constraints, such as min and max).
  • <input type="number"> elements do not support use of the pattern attribute for making entered values conform to a specific regex pattern.
  • inputs of type number support these attributes
  •  
    " elements of type number are used to let the user enter a number. They include built-in validation to reject non-numerical entries. The browser may opt to provide stepper arrows to let the user increase and decrease the value using their mouse or by simply tapping with a fingertip."
Vernon Fowler

The article element | HTML5 Doctor - 0 views

  • A weblog-style <article> A published date leads us to add a <header>, and there’s also content that would be suitable in a <footer> elements. <article>  <header>    <h1>Apple</h1>    <p>Published: <time pubdate="pubdate">2009-10-09</time></p>  </header>  <p>The <b>apple</b> is the pomaceous fruit of the apple tree...</p>  ...  <footer>    <p><small>Creative Commons Attribution-ShareAlike License</small></p>  </footer></article>
Vernon Fowler

HTML5 sectioning elements, headings, and document outlines | 456 Berea Street - 0 views

  • To prevent the footer’s heading from becoming the page heading we can wrap the footer element’s contents in a section element:
  • This really feels like a hack, but it does move the footer heading to its expected position in the document outline.
  • Since there is no heading in the nav element, it becomes “Untitled NAV”.
Vernon Fowler

Extending HTML5 - Microdata | HTML5 Doctor - 0 views

  • One element can also have multiple properties (multiple itemprop="" names separated by spaces) with the same value: <p itemscope><span itemprop="guitar vocals">Chris Askew</span>  is so dreamy.</p>
  • One element can also have multiple properties (multiple itemprop="" names separated by spaces) with the same value: <p itemscope><span itemprop="guitar vocals">Chris Askew</span>  is so dreamy.</p>
  • One element can also have multiple properties (multiple itemprop="" names separated by spaces) with the same value: <p itemscope><span itemprop="guitar vocals">Chris Askew</span>  is so dreamy.</p>
Vernon Fowler

The main element | HTML5 Doctor - 0 views

  • One important facet of <main> is that it can only be used once per page.
  • Another stipulation of <main> is that it can’t be used as a descendant of an <article>, <aside>, <footer>, <header>, or <nav> element.
  • Of course, if you use the html5shiv, <main> is now baked in directly.
Vernon Fowler

Happy 1st Birthday us | HTML5 Doctor - 0 views

  •  
    "a handy flowchart to help you choose the most semantically appropriate HTML5 element"
Vernon Fowler

How to mark up subheadings, subtitles, alternative titles and taglines | HTML5 Doctor - 0 views

  •  
    If you don't already know, the hgroup element is obsolete in HTML5. Advice is now provided in the HTML spec on how to mark up subheadings, subtitles, alternative titles and taglines using existing and implemented HTML features.
Vernon Fowler

The Footer Element Update | HTML5 Doctor - 0 views

  • To see an example of the <footer> within an article/section look no further than this very page.
  • <article>   Article content appears here.   <footer>   Footer information for article.   </footer></article>
Vernon Fowler

The time element (and microformats) | HTML5 Doctor - 0 views

  • There is a boolean attribute pubdate specifically for this
  • <time datetime="2010-01-20" pubdate>
Vernon Fowler

Modernizr - 0 views

  •  
    Modernizr adds classes to the element which allow you to target specific browser functionality in your stylesheet. You don't actually need to write any Javascript to use it.
Vernon Fowler

HTML5 iframe Tag - 0 views

  •  
    Be wary of any plugins that create iframe elements. If they use invalid attributes, the iframe won't render in Internet Explorer (IE).
Vernon Fowler

Relevant Dropdowns: Polyfill for Datalist | CSS-Tricks - 0 views

  •  
    "The list attribute / datalist element of HTML5 forms is pretty cool. As you type in a text input, it shows you a dropdown menu of choices you can pick from. Or you can type in whatever you want. The list attribute alone doesn't lock you into any specific value. In that way, it's a bit like a group of radio buttons with an "other" type-in option."
1 - 20 of 34 Next ›
Showing 20 items per page