Skip to main content

Home/ HTML5 development/ Group items tagged section

Rss Feed Group items tagged

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

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

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

Working with HTML5 video in web projects | Adobe Inspire Magazine - 0 views

  • The solution for now is to produce your videos in multiple formats. Table 1. Browser support by video format Browser MP4 WebM Ogg Internet Explorer 9 Yes No No Firefox 4.0 No Yes Yes Google Chrome 6 Yes Yes Yes Apple Safari 5 Yes No No Opera 10.6 No Yes Yes Note: For the latest compatibility information, always check the CanIUse website.
  • A more robust way to create the fallback is to use a JavaScript utility like Modernizr to evaluate the browser's capabilities and then dynamically write the video and source tags or embed the Flash video player using SWFObject.
  • Tip 3: The source tag should always include the "type" attribute with the correct MIME type value. You may need to add an .htaccess file to your server to define the MIME types as well. Check out the Video for everybody article for more tips on MIME types.
  • ...2 more annotations...
  • Tip 2: The video tag includes a range of parameters that you can use to configure the video. See the Mozilla article Using HTML5 audio and video for more information.
  • Tip 1: The Adobe Media Encoder does not currently export video to Ogg or WebM format. You can use the Firefogg add-on for Firefox to encode video to Ogg Theora format, or you can use Miro Video Converter to encode video to WebM or Ogg Theora format.
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

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

15 HTML5 tutorials which will make you a wow designer - 0 views

  •  
    #HTML5 Tutorials That Every #WebDesigner Should See http://t.co/k1Xh4VEO @ahrefmag
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

Avoiding common HTML5 mistakes | HTML5 Doctor - 0 views

  • If it’s a purely presentational image and not referenced elsewhere in the document, then it’s definitely not a <figure>.
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>
1 - 11 of 11
Showing 20 items per page