Is there a limit to how deep an HTML document or CSS tree can be?

I have been interested in this for a while, because I have fairly deep HTML structures. My points are as follows:

  • Maximum number of nesting levels for HTML?
  • Similarly with CSS - do I need to select material from the leaf nodes of the HTML DOM tree?
  • Is it browser dependent?

Thanks for any help

James

+4
source share
3 answers

Neither the XHTML 1.0 nor the HTML 4.01 specification defines a nesting restriction. HTML5 is not yet standardized, but the working function does not refer to a restriction.

CSS 2 spec also contains no restrictions.

Browser-based restrictions may be a problem in the future, but I could not find any problems with modern browsers.

+2
source

I will rely on no restrictions that I know of. You should check this out: http://www.geeksaresexy.net/2009/09/01/a-hidden-gem-in-html/ . The site is deep enough to recreate the horizon using font tags.

+8
source

I think you will run into memory restrictions before you hit any DOM restrictions (if they exist, I believe that they do not).

+2
source

All Articles