Getting all elements

returns all tagged elements regardless of their nest level and no white-space. This should locate all elements within the wrapper div.

returns only first-generation children and includes non-tagged text elements. Mozilla returns text elements consisting only of white-space, while IE excludes first-generation elements that contain white-space only.

Reset Colors

DIV#wrapper
1st-generation DIV

2nd-generation H1

1st-generation OL:
  1. 2nd-generation LI 3rd-generation A
  2. 2nd-generation LI 3rd-generation A

1st-generation P 2nd-generation A 2nd-generation SPAN

Please let me know if this demo doesn't behave in your browser.