Expand description
Common attributes
Note that you may create your own attribute by using Attribute::new
or Attribute::new_flag
Or by leveraging on of the From
implementation on Attribute
Enums§
- Anchor
Target - Represent an anchor target
Functions§
- action
action
attribute- alt
alt
attribute- async_
async
attribute- autocomplete
autocomplete
attribute- autocomplete_
off autocomplete="on"
attribute- autocomplete_
on autocomplete="on"
attribute- autofocus
autofocus
attribute- charset
charset
attribute- charset_
utf8 - Alias for
charset("UTF-8")
- charset_
utf_ 8 Deprecated - Alias for
charset("UTF-8")
- class
class
attribute- cols
cols
attribute- content
content
attribute- crossorigin_
anonymous crossorigin="anonymous"
- crossorigin_
use_ credentials crossorigin="use-credentials"
- defer
defer
attribute- disabled
disabled
attribute- download
download
flag attribute- download_
with_ name download
attribute with a file name argument- for_
for
attribute- height
height
attribute- height_
int height
attribute with ani32
value- href
href
attribute- id
id
attribute- integrity
integrity
attribute- lang
lang
attribute (usually onhtml
element)- max
max
attribute- maxlength
maxlength
attribute- maxlength_
u16 maxlength
attribute using au16
value- method_
get method_get
attribute- method_
post method_get
attribute- min
min
attribute- minlength
minlength
attribute- minlength_
u16 minlength
attribute using au16
value- multiple
multiple
attribute- name
name
attribute- none
- Do not render any attribute. Useful for conditional rendering.
- pattern
pattern
attribute- placeholder
placeholder
attribute- rel
rel
attribute- required
required
attribute- role_
str role
attribute with an aribtrary string value- rows
rows
attribute- src
src
attribute- style
style
attribute- target
target
attribute for<a>
- target_
blank - Alias for
target(Target::Blank)
- type_
type
attribute- type_
checkbox type="checkbox"
(checkbox input)- type_
date type="date"
(date input)- type_
email type="email"
(email input)- type_
file type="file"
(file input)- type_
hidden type="hidden"
(hidden input)- type_
month type="month"
(month input)- type_
number type="number"
(number input)- type_
password type="password"
(password input)- type_
radio type="radio"
(radio input)- type_
range type="range"
(range input)- type_
reset type="reset"
(reset button)- type_
submit type="submit"
(reset button)- type_
tel type="tel"
(phone number input)- type_
text type="text"
(text input)- value
value
attribute- width
width
attribute- width_
int width
attribute with ani32
value