Some text

A Heading

Geek asks and answers

Can <a> contain <footer> in HTML5?

I have a structure that looks like this:

<a href="#">
  <footer>
    <p>Some text</p>
    <h2>A Heading</h2>
  </footer>
</a>

This works and displays as expected in all browsers (even IE6 with HTML5shiv.js) except Firefox 3.6. In Firefox 3.6, the display is completely screwed up, and if you use Firebug to check the DOM, the element is <footer>empty, and the elements that should be inside it are outside.

All tags are closed correctly. <a>set to display:blockin CSS.

The W3C validator validates the document and does not place this structure as incorrect.

The specification states that an element <a>can be classified as the contents of a stream when it contains other contents of the stream. <footer>- stream content.

Is it just that Firefox 3.6 does not fully display HTML?

Any ideas for a fix?

That!

+3
html5 firefox layout
danwellman Jun 2 '11 at 12:39
source share
2 answers

According to W3C HTML5 Reference Footer Elements model:

The content of the stream, but without a header, is the descendants of the content, without sectioning the descendants of the content, and the footer is the descendants of the elements.

Which element is a interactive content (which may also be content stream )

Thus, the use of the element awill check if you check it for compliance with HTML5 standards. Using something like a W3C validator .

, , FireFox 3.6 HTML5. FireFox 4.0 , 3,6. HTML5 ( CSS3), .

, , Firefox div , , firefox. , jQuery CSS jQuery Hacks - .

+3
atrljoe 02 . '11 13:03

Firefox 3.6 HTML5; HTML4 "", .

, :

  • HTML- " " .
  • a <span> <a>, <footer>.
  • a <div> <a>, <footer>.
+1
Boris Zbarsky 02 . '11 13:19

More articles:

  • What is the correct way to populate a model for UserControl? - c #
  • https://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1817676/facebook-api-access-token&usg=ALkJrhiwz5me3uCkBTMyAcWsVYwefytL2g
  • mvc 3 nested object binding - c #
  • Problem with proper lighting Opengl - c ++
  • How to implement button tag for form_for helper? - ruby-on-rails
  • Should I expect POSIX to include getopt.h? - posix
  • Spring Веб-MVC и создание новых beans - java
  • Удалить столбец массива ячеек - matlab
  • https://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1817684/web-applications-converted-to-desktop-applications&usg=ALkJrhgIZE9DB964sR5qTVtCXB6AK_2LQw
  • https://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1817685/array-of-texture-identifiers-to-opengl-drawelementsdrawarrays&usg=ALkJrhjZcISBC3SBhhKQ2eN-93l1qNf9uA

All Articles

Geek-Ask | 2020