Class HTML::Tag
In: lib/html/tags.rb
lib/html/tags.rb
Parent: Object

This block initializes the tag lookup table.

Methods

Public Class methods

Add the given tag to the tag lookup table.

This can be called by user code to add otherwise unknown tags to the table.

name:the tag name, a String.
is_block:true if I am a block element.
is_inline:true if I am an inline element.
is_empty:true if I am an empty element.
can_omit:true if my end tag can be omitted.

Add the given tag to the tag lookup table.

This can be called by user code to add otherwise unknown tags to the table.

name:the tag name, a String.
is_block:true if I am a block element.
is_inline:true if I am an inline element.
is_empty:true if I am an empty element.
can_omit:true if my end tag can be omitted.

Return an Tag with the given name, or raise a NoSuchHTMLTagError.

Return an Tag with the given name, or raise a NoSuchHTMLTagError.

tag_name:a String, the name of the tag
can_omit:a Boolean, true if end tag is optional
tag_name:a String, the name of the tag
can_omit:a Boolean, true if end tag is optional

Public Instance methods

Return true if I can contain tag if my parent is of type parent.

tag:tag name, a String
parent:parent tag name, a String.

Return true if I can contain tag if my parent is of type parent.

tag:tag name, a String
parent:parent tag name, a String.

Return true if whitespace within me can be omitted (ignoring browser bugs)

Return true if whitespace within me can be omitted (ignoring browser bugs)

Return true if my end tag can be omitted.

Return true if my end tag can be omitted.

Return true if I am a block element.

Return true if I am a block element.

Return true if I am an empty element.

Return true if I am an empty element.

Return true if I am an inline element.

Return true if I am an inline element.

Return my tag name.

Return my tag name.

[Validate]