All HTML 4 elements and some that are in common use.
Block elements.
Elements that don't have a closing tag.
Inline elements
# File lib/ronn/utils.rb, line 31 def block_element?(name) HTML_BLOCK.include?(name) end
# File lib/ronn/utils.rb, line 47 def child_of?(node, tag) while node return true if node.name && node.name.downcase == tag node = node.parent end false end
# File lib/ronn/utils.rb, line 39 def empty_element?(name) HTML_EMPTY.include?(name) end
# File lib/ronn/utils.rb, line 43 def html_element?(name) HTML.include?(name) end
# File lib/ronn/utils.rb, line 35 def inline_element?(name) HTML_INLINE.include?(name) end