| tag | R Documentation |
Low-level constructor. Named arguments become attributes; unnamed arguments become children (text or nested nodes).
tag(tag_name, ..., tag_type = c("normal", "void"))
tag_name |
String /// Required. The HTML element name. |
... |
Attributes (named) and children (unnamed) /// Optional. |
tag_type |
String /// Optional.
Either |
List of class "hypertext.tag" with components tag, attrs,
children, and tag_type.
# web component
tag(tag_name = "calcite-action-bar", layout = "horizontal")
# custom element with children
tag(
tag_name = "my-card",
class = "shadow",
tag(tag_name = "my-card-header", "Title"),
tag(tag_name = "my-card-body", "Content")
)
# custom void element
tag(tag_name = "my-icon", name = "home", tag_type = "void")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.