0% found this document useful (0 votes)
5 views2 pages

Firefox Element Blocker Guide

A monkey was suited up to go where no primate had gone before. Some browsers before Firefox 4 had issues displaying certain HTML5 elements within block-level links, where the link would close and inline links would be created for each block-level element instead. Other minor changes in HTML5 include new attributes for ordered lists like reversed, as well as the return of attributes like type and start, which now have semantic meaning rather than just being presentational.

Uploaded by

nanoscribdlogin
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views2 pages

Firefox Element Blocker Guide

A monkey was suited up to go where no primate had gone before. Some browsers before Firefox 4 had issues displaying certain HTML5 elements within block-level links, where the link would close and inline links would be created for each block-level element instead. Other minor changes in HTML5 include new attributes for ordered lists like reversed, as well as the return of attributes like type and start, which now have semantic meaning rather than just being presentational.

Uploaded by

nanoscribdlogin
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

<h2>Going were no primate has dared to go</h2> </hgroup> <img src="monkey-helmet.

jpg" alt="A brave money all suited up"> </header> </a> By default, links are treated as , so you may need to set or for some styles to apply. Block-level elements like inside a block-level link will not inherit some link styles, so you may need to explicitly declare them using , such as You can do this using a name like .

Browser caveats with Firefox <4 (for posterity)


This all sounds great, but as per usual theres one or two little wrinkles to catch us out. In Firefox versions before Firefox 4 (which is sporting a sexy new HTML5-based DOM model), if the block-level links first child is one of the new HTML5 elements we met in Chapter 3, the block-level link will be closed, and individual inline links will be added for each block-level element. While the contained content is still linked and usable, this also generally means that the block level links etc styles wont look quite right. One solution is to add a wrapper (or another HTML 4 element) just inside the block-level link. <div> <a href="/"> <div><!-- wrapper div for Firefox 3.x and below --> <hgroup> <h1>Title</h1> <h2>Subtitle</h2> </hgroup> </div> </a> </div> Firefox 3.x handles tag mismatch errors in block-level links ... poorly. When in doubt, validate.

Unfortunately, using a wrapper isnt a magic bullet. There is still the small potential for this problem due to Firefoxs mysterious packet boundary bug, again fixed in Firefox 4. This only shows up occasionally, and not on every block-level link (making it mighty difficult to test for), but again the links will still work. Luckily, given Firefoxs fast upgrade cycle, the packet boundary issue is probably too minor (both in affected users and bug severity) to bother worrying aboutunless your site has a large number of pre- Firefox 4 users.

Other elements with minor changes from HTML 4


A few other elements have seen their usage slightly changed in HTML5 or have new attributes. Lets look at these elements and attributes, including and the associated attributes type, start, value and reverse, , and .

The <ol> element and related new (and old) attributes


While is the same ordered list containing list items wrapped in elements from HTML 4, in HTML5 it now has the new reversed attribute 15. There are also some ex-presentational attributes dropped from HTML 4 that have returnedtype and start for , and value for . As with the ex-presentational elements, covered earlier, these attributes actually have semantic meaning, and semantics belongs in HTML. Lets look at how we can use each of these attributes in turn.

The type attribute


Generally an ordered lists counter style is presentational and should be handled in CSS. But in some documents it can be part of the documents meaning, such as legal or technical documents that refer to non-decimal list items in prose. In these cases, we can specify the lists style in HTML using the type attribute, as seen in Table 4-1.
Table 4-1. Type Attribute Values and the Corresponding List Counter Types

You might also like