attr_helper {html5} | R Documentation |
Helper function to generate HTML5 attribute strings
Description
Helper function to generate HTML5 attribute strings
Usage
attr_helper(attr, separate = FALSE)
Arguments
attr |
A named list, names are attribute names and values are attribute values. If the items of the list and the items of the tag content are longer than length 1, the items for the attribute will correspond with the items of the content in the same position. (ex. when generating a series of option tags, you might want to pass a different id attribute for each item of the content, you can pass the vector of ids in the named list of attributes) |
separate |
TRUE/FALSE, if TRUE, returns a vector for creating multiple tags at once. |
Value
A HTML attribute string.
Examples
attr_helper(attr = list(class = 'test'))
[Package html5 version 1.0.2 Index]