Module: FunHtml::AttributeDefinitions
- Included in:
- Attribute
- Defined in:
- lib/fun_html/attribute_definitions.rb
Overview
HTML attributes autogenerated, do not edit
Instance Method Summary collapse
-
#accept(value) ⇒ Object
Specifies file types browser will accept.
-
#accept_charset(value) ⇒ Object
Character encodings used for form submission.
-
#accesskey(value) ⇒ Object
Keyboard shortcut to access element.
-
#action(value) ⇒ Object
URL where form data is submitted.
-
#align(value) ⇒ Object
Alignment of content.
-
#alt(value) ⇒ Object
Alternative text for images.
-
#async(value) ⇒ Object
Script should execute asynchronously.
-
#autocomplete(value) ⇒ Object
Form/input autocompletion.
-
#autofocus(value) ⇒ Object
Element should be focused on page load.
-
#autoplay(value) ⇒ Object
Media will start playing automatically.
-
#bgcolor(value) ⇒ Object
Background color of element.
-
#border(value) ⇒ Object
Border width in pixels.
-
#charset(value) ⇒ Object
Character encoding of document.
-
#checked(value) ⇒ Object
Whether checkbox/radio button is selected.
-
#cols(value) ⇒ Object
Number of columns in textarea.
-
#colspan(value) ⇒ Object
Number of columns a cell spans.
-
#content(value) ⇒ Object
Content for meta tags.
-
#contenteditable(value) ⇒ Object
Whether content is editable.
-
#controls(value) ⇒ Object
Show media playback controls.
-
#coords(value) ⇒ Object
Coordinates for image maps.
-
#data(suffix, value) ⇒ Object
Custom data attributes.
-
#datetime(value) ⇒ Object
Date/time of element content.
-
#default(value) ⇒ Object
Default track for media.
-
#defer(value) ⇒ Object
Script should execute after parsing.
-
#dir(value) ⇒ Object
Text direction.
-
#disabled(value) ⇒ Object
Element is disabled.
-
#download(value) ⇒ Object
Resource should be downloaded.
-
#draggable(value) ⇒ Object
Element can be dragged.
-
#enctype(value) ⇒ Object
Form data encoding for submission.
-
#for(value) ⇒ Object
Associates label with form control.
-
#form(value) ⇒ Object
Form the element belongs to.
-
#formaction(value) ⇒ Object
URL for form submission.
-
#headers(value) ⇒ Object
Related header cells for data cell.
-
#height(value) ⇒ Object
Height of element.
-
#hidden(value) ⇒ Object
Element is not displayed.
-
#high(value) ⇒ Object
Upper range of meter.
-
#href(value) ⇒ Object
URL of linked resource.
-
#hreflang(value) ⇒ Object
Language of linked resource.
-
#id(value) ⇒ Object
Unique identifier for element.
-
#integrity(value) ⇒ Object
Subresource integrity hash.
-
#ismap(value) ⇒ Object
Image is server-side image map.
-
#kind(value) ⇒ Object
Type of text track.
-
#klass(value) ⇒ Object
CSS class name(s) for styling.
-
#label(value) ⇒ Object
Label for form control/option.
-
#lang(value) ⇒ Object
Language of element content.
-
#list(value) ⇒ Object
Links input to datalist options.
-
#loop(value) ⇒ Object
Media will replay when finished.
-
#low(value) ⇒ Object
Lower range of meter.
-
#max(value) ⇒ Object
Maximum allowed value.
-
#maxlength(value) ⇒ Object
Maximum length of input.
-
#media(value) ⇒ Object
Media type for resource.
-
#method(value) ⇒ Object
HTTP method for form submission.
-
#min(value) ⇒ Object
Minimum allowed value.
-
#multiple(value) ⇒ Object
Multiple values can be selected.
-
#muted(value) ⇒ Object
Media is muted by default.
-
#name(value) ⇒ Object
Name of form control.
-
#novalidate(value) ⇒ Object
Form validation is skipped.
-
#open(value) ⇒ Object
Details element is expanded.
-
#optimum(value) ⇒ Object
Optimal value for meter.
-
#pattern(value) ⇒ Object
Regular expression pattern.
-
#placeholder(value) ⇒ Object
Hint text for input field.
-
#poster(value) ⇒ Object
Preview image for video.
-
#preload(value) ⇒ Object
How media should be loaded.
-
#readonly(value) ⇒ Object
Input field cannot be modified.
-
#rel(value) ⇒ Object
Relationship of linked resource.
-
#required(value) ⇒ Object
Input must be filled out.
-
#reversed(value) ⇒ Object
List is numbered in reverse.
-
#rows(value) ⇒ Object
Number of rows in textarea.
-
#rowspan(value) ⇒ Object
Number of rows a cell spans.
-
#sandbox(value) ⇒ Object
Security rules for iframe.
-
#scope(value) ⇒ Object
Cells header element relates to.
-
#selected(value) ⇒ Object
Option is pre-selected.
-
#shape(value) ⇒ Object
Shape of image map area.
-
#size(value) ⇒ Object
Size of input/select control.
-
#sizes(value) ⇒ Object
Image sizes for different layouts.
-
#spellcheck(value) ⇒ Object
Element should be spellchecked.
-
#src(value) ⇒ Object
URL of resource.
-
#srcdoc(value) ⇒ Object
Content for inline frame.
-
#srclang(value) ⇒ Object
Language of text track.
-
#srcset(value) ⇒ Object
Images to use in different situations.
-
#start(value) ⇒ Object
Starting number for ordered list.
-
#step(value) ⇒ Object
Increment for numeric input.
-
#style(value) ⇒ Object
Inline CSS styles.
-
#tabindex(value) ⇒ Object
Position in tab order.
-
#target(value) ⇒ Object
Where to open linked document.
-
#title(value) ⇒ Object
Advisory information about element.
-
#translate(value) ⇒ Object
Whether to translate content.
-
#type(value) ⇒ Object
Type of element or input.
-
#usemap(value) ⇒ Object
Image map to use.
-
#value(value) ⇒ Object
Value of form control.
-
#width(value) ⇒ Object
Width of element.
-
#wrap(value) ⇒ Object
How text wraps in textarea.
Instance Method Details
#accept(value) ⇒ Object
Specifies file types browser will accept
7 8 |
# File 'lib/fun_html/attribute_definitions.rb', line 7 def accept(value) = write(' accept="', value) # Character encodings used for form submission |
#accept_charset(value) ⇒ Object
Character encodings used for form submission
9 10 |
# File 'lib/fun_html/attribute_definitions.rb', line 9 def accept_charset(value) = write(' accept-charset="', value) # Keyboard shortcut to access element |
#accesskey(value) ⇒ Object
Keyboard shortcut to access element
11 12 |
# File 'lib/fun_html/attribute_definitions.rb', line 11 def accesskey(value) = write(' accesskey="', value) # URL where form data is submitted |
#action(value) ⇒ Object
URL where form data is submitted
13 14 |
# File 'lib/fun_html/attribute_definitions.rb', line 13 def action(value) = write(' action="', value) # Alignment of content |
#align(value) ⇒ Object
Alignment of content
15 16 |
# File 'lib/fun_html/attribute_definitions.rb', line 15 def align(value) = write(' align="', value) # Alternative text for images |
#alt(value) ⇒ Object
Alternative text for images
17 18 |
# File 'lib/fun_html/attribute_definitions.rb', line 17 def alt(value) = write(' alt="', value) # Script should execute asynchronously |
#async(value) ⇒ Object
Script should execute asynchronously
19 20 |
# File 'lib/fun_html/attribute_definitions.rb', line 19 def async(value) = write_empty(' async', value) # Form/input autocompletion |
#autocomplete(value) ⇒ Object
Form/input autocompletion
21 22 |
# File 'lib/fun_html/attribute_definitions.rb', line 21 def autocomplete(value) = write(' autocomplete="', value) # Element should be focused on page load |
#autofocus(value) ⇒ Object
Element should be focused on page load
23 24 |
# File 'lib/fun_html/attribute_definitions.rb', line 23 def autofocus(value) = write_empty(' autofocus', value) # Media will start playing automatically |
#autoplay(value) ⇒ Object
Media will start playing automatically
25 26 |
# File 'lib/fun_html/attribute_definitions.rb', line 25 def autoplay(value) = write_empty(' autoplay', value) # Background color of element |
#bgcolor(value) ⇒ Object
Background color of element
27 28 |
# File 'lib/fun_html/attribute_definitions.rb', line 27 def bgcolor(value) = write(' bgcolor="', value) # Border width in pixels |
#border(value) ⇒ Object
Border width in pixels
29 30 |
# File 'lib/fun_html/attribute_definitions.rb', line 29 def border(value) = write(' border="', value) # Character encoding of document |
#charset(value) ⇒ Object
Character encoding of document
31 32 |
# File 'lib/fun_html/attribute_definitions.rb', line 31 def charset(value) = write(' charset="', value) # Whether checkbox/radio button is selected |
#checked(value) ⇒ Object
Whether checkbox/radio button is selected
33 34 |
# File 'lib/fun_html/attribute_definitions.rb', line 33 def checked(value) = write_empty(' checked', value) # CSS class name(s) for styling |
#cols(value) ⇒ Object
Number of columns in textarea
37 38 |
# File 'lib/fun_html/attribute_definitions.rb', line 37 def cols(value) = write(' cols="', value) # Number of columns a cell spans |
#colspan(value) ⇒ Object
Number of columns a cell spans
39 40 |
# File 'lib/fun_html/attribute_definitions.rb', line 39 def colspan(value) = write(' colspan="', value) # Content for meta tags |
#content(value) ⇒ Object
Content for meta tags
41 42 |
# File 'lib/fun_html/attribute_definitions.rb', line 41 def content(value) = write(' content="', value) # Whether content is editable |
#contenteditable(value) ⇒ Object
Whether content is editable
43 44 |
# File 'lib/fun_html/attribute_definitions.rb', line 43 def contenteditable(value) = write(' contenteditable="', value) # Show media playback controls |
#controls(value) ⇒ Object
Show media playback controls
45 46 |
# File 'lib/fun_html/attribute_definitions.rb', line 45 def controls(value) = write_empty(' controls', value) # Coordinates for image maps |
#coords(value) ⇒ Object
Coordinates for image maps
47 |
# File 'lib/fun_html/attribute_definitions.rb', line 47 def coords(value) = write(' coords="', value) |
#data(suffix, value) ⇒ Object
Custom data attributes
50 51 52 53 54 55 56 57 |
# File 'lib/fun_html/attribute_definitions.rb', line 50 def data(suffix, value) unless suffix.match?(/\A[a-z-]+\z/) raise ArgumentError, "suffix (#{suffix}) must be lowercase and only contain 'a' to 'z' or hyphens." end write(" data-#{suffix}=\"", value) end |
#datetime(value) ⇒ Object
Date/time of element content
60 61 |
# File 'lib/fun_html/attribute_definitions.rb', line 60 def datetime(value) = write(' datetime="', value) # Default track for media |
#default(value) ⇒ Object
Default track for media
62 63 |
# File 'lib/fun_html/attribute_definitions.rb', line 62 def default(value) = write_empty(' default', value) # Script should execute after parsing |
#defer(value) ⇒ Object
Script should execute after parsing
64 65 |
# File 'lib/fun_html/attribute_definitions.rb', line 64 def defer(value) = write_empty(' defer', value) # Text direction |
#dir(value) ⇒ Object
Text direction
66 67 |
# File 'lib/fun_html/attribute_definitions.rb', line 66 def dir(value) = write(' dir="', value) # Element is disabled |
#disabled(value) ⇒ Object
Element is disabled
68 69 |
# File 'lib/fun_html/attribute_definitions.rb', line 68 def disabled(value) = write_empty(' disabled', value) # Resource should be downloaded |
#download(value) ⇒ Object
Resource should be downloaded
70 71 |
# File 'lib/fun_html/attribute_definitions.rb', line 70 def download(value) = write(' download="', value) # Element can be dragged |
#draggable(value) ⇒ Object
Element can be dragged
72 73 |
# File 'lib/fun_html/attribute_definitions.rb', line 72 def draggable(value) = write(' draggable="', value) # Form data encoding for submission |
#enctype(value) ⇒ Object
Form data encoding for submission
74 75 |
# File 'lib/fun_html/attribute_definitions.rb', line 74 def enctype(value) = write(' enctype="', value) # Associates label with form control |
#for(value) ⇒ Object
Associates label with form control
76 77 |
# File 'lib/fun_html/attribute_definitions.rb', line 76 def for(value) = write(' for="', value) # Form the element belongs to |
#form(value) ⇒ Object
Form the element belongs to
78 79 |
# File 'lib/fun_html/attribute_definitions.rb', line 78 def form(value) = write(' form="', value) # URL for form submission |
#formaction(value) ⇒ Object
URL for form submission
80 81 |
# File 'lib/fun_html/attribute_definitions.rb', line 80 def formaction(value) = write(' formaction="', value) # Related header cells for data cell |
#headers(value) ⇒ Object
Related header cells for data cell
82 83 |
# File 'lib/fun_html/attribute_definitions.rb', line 82 def headers(value) = write(' headers="', value) # Height of element |
#height(value) ⇒ Object
Height of element
84 85 |
# File 'lib/fun_html/attribute_definitions.rb', line 84 def height(value) = write(' height="', value) # Element is not displayed |
#hidden(value) ⇒ Object
Element is not displayed
86 87 |
# File 'lib/fun_html/attribute_definitions.rb', line 86 def hidden(value) = write_empty(' hidden', value) # Upper range of meter |
#high(value) ⇒ Object
Upper range of meter
88 89 |
# File 'lib/fun_html/attribute_definitions.rb', line 88 def high(value) = write(' high="', value) # URL of linked resource |
#href(value) ⇒ Object
URL of linked resource
90 91 |
# File 'lib/fun_html/attribute_definitions.rb', line 90 def href(value) = write(' href="', value) # Language of linked resource |
#hreflang(value) ⇒ Object
Language of linked resource
92 93 |
# File 'lib/fun_html/attribute_definitions.rb', line 92 def hreflang(value) = write(' hreflang="', value) # Unique identifier for element |
#id(value) ⇒ Object
Unique identifier for element
94 95 |
# File 'lib/fun_html/attribute_definitions.rb', line 94 def id(value) = write(' id="', value) # Subresource integrity hash |
#integrity(value) ⇒ Object
Subresource integrity hash
96 97 |
# File 'lib/fun_html/attribute_definitions.rb', line 96 def integrity(value) = write(' integrity="', value) # Image is server-side image map |
#ismap(value) ⇒ Object
Image is server-side image map
98 99 |
# File 'lib/fun_html/attribute_definitions.rb', line 98 def ismap(value) = write_empty(' ismap', value) # Type of text track |
#kind(value) ⇒ Object
Type of text track
100 101 |
# File 'lib/fun_html/attribute_definitions.rb', line 100 def kind(value) = write(' kind="', value) # Label for form control/option |
#klass(value) ⇒ Object
CSS class name(s) for styling
35 36 |
# File 'lib/fun_html/attribute_definitions.rb', line 35 def klass(value) = write(' class="', value) # Number of columns in textarea |
#label(value) ⇒ Object
Label for form control/option
102 103 |
# File 'lib/fun_html/attribute_definitions.rb', line 102 def label(value) = write(' label="', value) # Language of element content |
#lang(value) ⇒ Object
Language of element content
104 105 |
# File 'lib/fun_html/attribute_definitions.rb', line 104 def lang(value) = write(' lang="', value) # Links input to datalist options |
#list(value) ⇒ Object
Links input to datalist options
106 107 |
# File 'lib/fun_html/attribute_definitions.rb', line 106 def list(value) = write(' list="', value) # Media will replay when finished |
#loop(value) ⇒ Object
Media will replay when finished
108 109 |
# File 'lib/fun_html/attribute_definitions.rb', line 108 def loop(value) = write_empty(' loop', value) # Lower range of meter |
#low(value) ⇒ Object
Lower range of meter
110 111 |
# File 'lib/fun_html/attribute_definitions.rb', line 110 def low(value) = write(' low="', value) # Maximum allowed value |
#max(value) ⇒ Object
Maximum allowed value
112 113 |
# File 'lib/fun_html/attribute_definitions.rb', line 112 def max(value) = write(' max="', value) # Maximum length of input |
#maxlength(value) ⇒ Object
Maximum length of input
114 115 |
# File 'lib/fun_html/attribute_definitions.rb', line 114 def maxlength(value) = write(' maxlength="', value) # Media type for resource |
#media(value) ⇒ Object
Media type for resource
116 117 |
# File 'lib/fun_html/attribute_definitions.rb', line 116 def media(value) = write(' media="', value) # HTTP method for form submission |
#method(value) ⇒ Object
HTTP method for form submission
118 119 |
# File 'lib/fun_html/attribute_definitions.rb', line 118 def method(value) = write(' method="', value) # Minimum allowed value |
#min(value) ⇒ Object
Minimum allowed value
120 121 |
# File 'lib/fun_html/attribute_definitions.rb', line 120 def min(value) = write(' min="', value) # Multiple values can be selected |
#multiple(value) ⇒ Object
Multiple values can be selected
122 123 |
# File 'lib/fun_html/attribute_definitions.rb', line 122 def multiple(value) = write_empty(' multiple', value) # Media is muted by default |
#muted(value) ⇒ Object
Media is muted by default
124 125 |
# File 'lib/fun_html/attribute_definitions.rb', line 124 def muted(value) = write_empty(' muted', value) # Name of form control |
#name(value) ⇒ Object
Name of form control
126 127 |
# File 'lib/fun_html/attribute_definitions.rb', line 126 def name(value) = write(' name="', value) # Form validation is skipped |
#novalidate(value) ⇒ Object
Form validation is skipped
128 129 |
# File 'lib/fun_html/attribute_definitions.rb', line 128 def novalidate(value) = write_empty(' novalidate', value) # Details element is expanded |
#open(value) ⇒ Object
Details element is expanded
130 131 |
# File 'lib/fun_html/attribute_definitions.rb', line 130 def open(value) = write_empty(' open', value) # Optimal value for meter |
#optimum(value) ⇒ Object
Optimal value for meter
132 133 |
# File 'lib/fun_html/attribute_definitions.rb', line 132 def optimum(value) = write(' optimum="', value) # Regular expression pattern |
#pattern(value) ⇒ Object
Regular expression pattern
134 135 |
# File 'lib/fun_html/attribute_definitions.rb', line 134 def pattern(value) = write(' pattern="', value) # Hint text for input field |
#placeholder(value) ⇒ Object
Hint text for input field
136 137 |
# File 'lib/fun_html/attribute_definitions.rb', line 136 def placeholder(value) = write(' placeholder="', value) # Preview image for video |
#poster(value) ⇒ Object
Preview image for video
138 139 |
# File 'lib/fun_html/attribute_definitions.rb', line 138 def poster(value) = write(' poster="', value) # How media should be loaded |
#preload(value) ⇒ Object
How media should be loaded
140 141 |
# File 'lib/fun_html/attribute_definitions.rb', line 140 def preload(value) = write(' preload="', value) # Input field cannot be modified |
#readonly(value) ⇒ Object
Input field cannot be modified
142 143 |
# File 'lib/fun_html/attribute_definitions.rb', line 142 def readonly(value) = write_empty(' readonly', value) # Relationship of linked resource |
#rel(value) ⇒ Object
Relationship of linked resource
144 145 |
# File 'lib/fun_html/attribute_definitions.rb', line 144 def rel(value) = write(' rel="', value) # Input must be filled out |
#required(value) ⇒ Object
Input must be filled out
146 147 |
# File 'lib/fun_html/attribute_definitions.rb', line 146 def required(value) = write_empty(' required', value) # List is numbered in reverse |
#reversed(value) ⇒ Object
List is numbered in reverse
148 149 |
# File 'lib/fun_html/attribute_definitions.rb', line 148 def reversed(value) = write_empty(' reversed', value) # Number of rows in textarea |
#rows(value) ⇒ Object
Number of rows in textarea
150 151 |
# File 'lib/fun_html/attribute_definitions.rb', line 150 def rows(value) = write(' rows="', value) # Number of rows a cell spans |
#rowspan(value) ⇒ Object
Number of rows a cell spans
152 153 |
# File 'lib/fun_html/attribute_definitions.rb', line 152 def rowspan(value) = write(' rowspan="', value) # Security rules for iframe |
#sandbox(value) ⇒ Object
Security rules for iframe
154 155 |
# File 'lib/fun_html/attribute_definitions.rb', line 154 def sandbox(value) = write(' sandbox="', value) # Cells header element relates to |
#scope(value) ⇒ Object
Cells header element relates to
156 157 |
# File 'lib/fun_html/attribute_definitions.rb', line 156 def scope(value) = write(' scope="', value) # Option is pre-selected |
#selected(value) ⇒ Object
Option is pre-selected
158 159 |
# File 'lib/fun_html/attribute_definitions.rb', line 158 def selected(value) = write_empty(' selected', value) # Shape of image map area |
#shape(value) ⇒ Object
Shape of image map area
160 161 |
# File 'lib/fun_html/attribute_definitions.rb', line 160 def shape(value) = write(' shape="', value) # Size of input/select control |
#size(value) ⇒ Object
Size of input/select control
162 163 |
# File 'lib/fun_html/attribute_definitions.rb', line 162 def size(value) = write(' size="', value) # Image sizes for different layouts |
#sizes(value) ⇒ Object
Image sizes for different layouts
164 165 |
# File 'lib/fun_html/attribute_definitions.rb', line 164 def sizes(value) = write(' sizes="', value) # Element should be spellchecked |
#spellcheck(value) ⇒ Object
Element should be spellchecked
166 167 |
# File 'lib/fun_html/attribute_definitions.rb', line 166 def spellcheck(value) = write(' spellcheck="', value) # URL of resource |
#src(value) ⇒ Object
URL of resource
168 169 |
# File 'lib/fun_html/attribute_definitions.rb', line 168 def src(value) = write(' src="', value) # Content for inline frame |
#srcdoc(value) ⇒ Object
Content for inline frame
170 171 |
# File 'lib/fun_html/attribute_definitions.rb', line 170 def srcdoc(value) = write(' srcdoc="', value) # Language of text track |
#srclang(value) ⇒ Object
Language of text track
172 173 |
# File 'lib/fun_html/attribute_definitions.rb', line 172 def srclang(value) = write(' srclang="', value) # Images to use in different situations |
#srcset(value) ⇒ Object
Images to use in different situations
174 175 |
# File 'lib/fun_html/attribute_definitions.rb', line 174 def srcset(value) = write(' srcset="', value) # Starting number for ordered list |
#start(value) ⇒ Object
Starting number for ordered list
176 177 |
# File 'lib/fun_html/attribute_definitions.rb', line 176 def start(value) = write(' start="', value) # Increment for numeric input |
#step(value) ⇒ Object
Increment for numeric input
178 179 |
# File 'lib/fun_html/attribute_definitions.rb', line 178 def step(value) = write(' step="', value) # Inline CSS styles |
#style(value) ⇒ Object
Inline CSS styles
180 181 |
# File 'lib/fun_html/attribute_definitions.rb', line 180 def style(value) = write(' style="', value) # Position in tab order |
#tabindex(value) ⇒ Object
Position in tab order
182 183 |
# File 'lib/fun_html/attribute_definitions.rb', line 182 def tabindex(value) = write(' tabindex="', value) # Where to open linked document |
#target(value) ⇒ Object
Where to open linked document
184 185 |
# File 'lib/fun_html/attribute_definitions.rb', line 184 def target(value) = write(' target="', value) # Advisory information about element |
#title(value) ⇒ Object
Advisory information about element
186 187 |
# File 'lib/fun_html/attribute_definitions.rb', line 186 def title(value) = write(' title="', value) # Whether to translate content |
#translate(value) ⇒ Object
Whether to translate content
188 189 |
# File 'lib/fun_html/attribute_definitions.rb', line 188 def translate(value) = write(' translate="', value) # Type of element or input |
#type(value) ⇒ Object
Type of element or input
190 191 |
# File 'lib/fun_html/attribute_definitions.rb', line 190 def type(value) = write(' type="', value) # Image map to use |
#usemap(value) ⇒ Object
Image map to use
192 193 |
# File 'lib/fun_html/attribute_definitions.rb', line 192 def usemap(value) = write(' usemap="', value) # Value of form control |
#value(value) ⇒ Object
Value of form control
194 195 |
# File 'lib/fun_html/attribute_definitions.rb', line 194 def value(value) = write(' value="', value) # Width of element |
#width(value) ⇒ Object
Width of element
196 197 |
# File 'lib/fun_html/attribute_definitions.rb', line 196 def width(value) = write(' width="', value) # How text wraps in textarea |
#wrap(value) ⇒ Object
How text wraps in textarea
198 |
# File 'lib/fun_html/attribute_definitions.rb', line 198 def wrap(value) = write(' wrap="', value) |