1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
|
---
title: Lista de atributos HTML
slug: Web/HTML/Atributos
tags:
- HTML
- Referencia
- Web
- atributo
translation_of: Web/HTML/Attributes
---
<p>Elementos em HTML têm <strong>atributos</strong>; estes são valores adicionais que configuram os elementos ou ajustam o seu comportamento em vários modos para corresponderem aos critérios que os utilizadores pretendem.</p>
<h2 id="Lista_de_Atributos">Lista de Atributos</h2>
<table class="standard-table">
<thead>
<tr>
<th>Nome do Atributo</th>
<th>Elementos</th>
<th>Descrição</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>accept</code></td>
<td>{{ HTMLElement("form") }}, {{ HTMLElement("input") }}</td>
<td>Lista de tipos que o servidor aceita, é usualmente um tipo de ficheiro.</td>
</tr>
<tr>
<td><code>accept-charset</code></td>
<td>{{ HTMLElement("form") }}</td>
<td>Lista de codificações de caracteres (charsets) que são suportadas.</td>
</tr>
<tr>
<td><code>accesskey</code></td>
<td><a href="/en-US/docs/HTML/Global_attributes">Atributo global</a></td>
<td>Define um atalho do teclado para activar ou adicionar foco ao elemento.</td>
</tr>
<tr>
<td><code>action</code></td>
<td>{{ HTMLElement("form") }}</td>
<td>O URI dum programa que processa a informação submetida através deste formulário.</td>
</tr>
<tr>
<td><code>align</code></td>
<td>{{ HTMLElement("applet") }}, {{ HTMLElement("caption") }}, {{ HTMLElement("col") }}, {{ HTMLElement("colgroup") }}, {{ HTMLElement("hr") }}, {{ HTMLElement("iframe") }}, {{ HTMLElement("img") }}, {{ HTMLElement("table") }}, {{ HTMLElement("tbody") }}, {{ HTMLElement("td") }}, {{ HTMLElement("tfoot") }} , {{ HTMLElement("th") }}, {{ HTMLElement("thead") }}, {{ HTMLElement("tr") }}</td>
<td>Especifica o alinhamento horizontal do elemento.</td>
</tr>
<tr>
<td><code>alt</code></td>
<td>{{ HTMLElement("applet") }}, {{ HTMLElement("area") }}, {{ HTMLElement("img") }}, {{ HTMLElement("input") }}</td>
<td>Texto alternativo no caso de uma imagem não poder ser mostrada.</td>
</tr>
<tr>
<td><code>async</code></td>
<td>{{ HTMLElement("script") }}</td>
<td>Indicates that the script should be executed asynchronously.</td>
</tr>
<tr>
<td><code>autocomplete</code></td>
<td>{{ HTMLElement("form") }}, {{ HTMLElement("input") }}</td>
<td>Indicates whether controls in this form can by default have their values automatically completed by the browser.</td>
</tr>
<tr>
<td><code>autofocus</code></td>
<td>{{ HTMLElement("button") }}, {{ HTMLElement("input") }}, {{ HTMLElement("keygen") }}, {{ HTMLElement("select") }}, {{ HTMLElement("textarea") }}</td>
<td>The element should be automatically focused after the page loaded.</td>
</tr>
<tr>
<td><code>autoplay</code></td>
<td>{{ HTMLElement("audio") }}, {{ HTMLElement("video") }}</td>
<td>The audio or video should play as soon as possible.</td>
</tr>
<tr>
<td><code>autosave</code></td>
<td>{{ HTMLElement("input") }}</td>
<td>Previous values should persist dropdowns of selectable values across page loads.</td>
</tr>
<tr>
<td><code>bgcolor</code></td>
<td>{{ HTMLElement("body") }}, {{ HTMLElement("col") }}, {{ HTMLElement("colgroup") }}, {{ HTMLElement("marquee") }}, {{ HTMLElement("table") }}, {{ HTMLElement("tbody") }}, {{ HTMLElement("tfoot") }}, {{ HTMLElement("td") }}, {{ HTMLElement("th") }}, {{ HTMLElement("tr") }}</td>
<td>
<p>Background color of the element.</p>
<div class="note">
<p><strong>Nota:</strong> This is a legacy attribute. Please use the CSS {{ Cssxref("background-color") }} property instead.</p>
</div>
</td>
</tr>
<tr>
<td><code>border</code></td>
<td>{{ HTMLElement("img") }}, {{ HTMLElement("object") }}, {{ HTMLElement("table") }}</td>
<td>
<p>The border width.</p>
<div class="note">
<p><strong>Nota:</strong> This is a legacy attribute. Please use the CSS {{ Cssxref("border") }} property instead.</p>
</div>
</td>
</tr>
<tr>
<td><code>buffered</code></td>
<td>{{ HTMLElement("audio") }}, {{ HTMLElement("video") }}</td>
<td>Contains the time range of already buffered media.</td>
</tr>
<tr>
<td><code>challenge</code></td>
<td>{{ HTMLElement("keygen") }}</td>
<td>A challenge string that is submitted along with the public key.</td>
</tr>
<tr>
<td><code>charset</code></td>
<td>{{ HTMLElement("meta") }}, {{ HTMLElement("script") }}</td>
<td>Declares the character encoding of the page or script.</td>
</tr>
<tr>
<td><code>checked</code></td>
<td>{{ HTMLElement("command") }}, {{ HTMLElement("input") }}</td>
<td>Indicates whether the element should be checked on page load.</td>
</tr>
<tr>
<td><code>cite</code></td>
<td>{{ HTMLElement("blockquote") }}, {{ HTMLElement("del") }}, {{ HTMLElement("ins") }}, {{ HTMLElement("q") }}</td>
<td>Contains a URI which points to the source of the quote or change.</td>
</tr>
<tr>
<td><code>class</code></td>
<td><a href="/en-US/docs/HTML/Global_attributes">Global attribute</a></td>
<td>Often used with CSS to style elements with common properties.</td>
</tr>
<tr>
<td><code>code</code></td>
<td>{{ HTMLElement("applet") }}</td>
<td>Specifies the URL of the applet's class file to be loaded and executed.</td>
</tr>
<tr>
<td><code>codebase</code></td>
<td>{{ HTMLElement("applet") }}</td>
<td>This attribute gives the absolute or relative URL of the directory where applets' .class files referenced by the code attribute are stored.</td>
</tr>
<tr>
<td><code>color</code></td>
<td>{{ HTMLElement("basefont") }}, {{ HTMLElement("font") }}, {{ HTMLElement("hr") }}</td>
<td>
<p>This attribute sets the text color using either a named color or a color specified in the hexadecimal #RRGGBB format.</p>
<div class="note">
<p><strong>Nota:</strong> This is a legacy attribute. Please use the CSS {{ Cssxref("color") }} property instead.</p>
</div>
</td>
</tr>
<tr>
<td><code>cols</code></td>
<td>{{ HTMLElement("textarea") }}</td>
<td>Defines the number of columns in a textarea.</td>
</tr>
<tr>
<td><code>colspan</code></td>
<td>{{ HTMLElement("td") }}, {{ HTMLElement("th") }}</td>
<td>The colspan attribute defines the number of columns a cell should span.</td>
</tr>
<tr>
<td><code>content</code></td>
<td>{{ HTMLElement("meta") }}</td>
<td>A value associated with <code>http-equiv</code> or <code>name</code> depending on the context.</td>
</tr>
<tr>
<td><code>contenteditable</code></td>
<td><a href="/en-US/docs/HTML/Global_attributes">Global attribute</a></td>
<td>Indicates whether the element's content is editable.</td>
</tr>
<tr>
<td><code>contextmenu</code></td>
<td><a href="/en-US/docs/HTML/Global_attributes">Global attribute</a></td>
<td>Defines the ID of a {{ HTMLElement("menu") }} element which will serve as the element's context menu.</td>
</tr>
<tr>
<td><code>controls</code></td>
<td>{{ HTMLElement("audio") }}, {{ HTMLElement("video") }}</td>
<td>Indicates whether the browser should show playback controls to the user.</td>
</tr>
<tr>
<td><code>coords</code></td>
<td>{{ HTMLElement("area") }}</td>
<td>A set of values specifying the coordinates of the hot-spot region.</td>
</tr>
<tr>
<td><code><a href="/en-US/docs/Web/HTML/CORS_settings_attributes">crossorigin</a></code></td>
<td>{{ HTMLElement("audio") }}, {{ HTMLElement("img") }}, {{ HTMLElement("link") }}, {{ HTMLElement("script") }}, {{ HTMLElement("video") }}</td>
<td>How the element handles cross-origin requests</td>
</tr>
<tr>
<td><code>data</code></td>
<td>{{ HTMLElement("object") }}</td>
<td>Specifies the URL of the resource.</td>
</tr>
<tr>
<td><code>data-*</code></td>
<td><a href="/en-US/docs/HTML/Global_attributes">Global attribute</a></td>
<td>Lets you attach custom attributes to an HTML element.</td>
</tr>
<tr>
<td><code>datetime</code></td>
<td>{{ HTMLElement("del") }}, {{ HTMLElement("ins") }}, {{ HTMLElement("time") }}</td>
<td>Indicates the date and time associated with the element.</td>
</tr>
<tr>
<td><code>default</code></td>
<td>{{ HTMLElement("track") }}</td>
<td>Indicates that the track should be enabled unless the user's preferences indicate something different.</td>
</tr>
<tr>
<td><code>defer</code></td>
<td>{{ HTMLElement("script") }}</td>
<td>Indicates that the script should be executed after the page has been parsed.</td>
</tr>
<tr>
<td><code>dir</code></td>
<td><a href="/en-US/docs/HTML/Global_attributes">Global attribute</a></td>
<td>Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)</td>
</tr>
<tr>
<td><code>dirname</code></td>
<td>{{ HTMLElement("input") }}, {{ HTMLElement("textarea") }}</td>
<td> </td>
</tr>
<tr>
<td><code>disabled</code></td>
<td>{{ HTMLElement("button") }}, {{ HTMLElement("command") }}, {{ HTMLElement("fieldset") }}, {{ HTMLElement("input") }}, {{ HTMLElement("keygen") }}, {{ HTMLElement("optgroup") }}, {{ HTMLElement("option") }}, {{ HTMLElement("select") }}, {{ HTMLElement("textarea") }}</td>
<td>Indicates whether the user can interact with the element.</td>
</tr>
<tr>
<td><code>download</code></td>
<td>{{ HTMLElement("a") }}, {{ HTMLElement("area") }}</td>
<td>Indicates that the hyperlink is to be used for downloading a resource.</td>
</tr>
<tr>
<td><code>draggable</code></td>
<td><a href="/en-US/docs/HTML/Global_attributes">Global attribute</a></td>
<td>Defines whether the element can be dragged.</td>
</tr>
<tr>
<td><code>dropzone</code></td>
<td><a href="/en-US/docs/HTML/Global_attributes">Global attribute</a></td>
<td>Indicates that the element accept the dropping of content on it.</td>
</tr>
<tr>
<td><code>enctype</code></td>
<td>{{ HTMLElement("form") }}</td>
<td>Defines the content type of the form date when the <code>method</code> is POST.</td>
</tr>
<tr>
<td><code>for</code></td>
<td>{{ HTMLElement("label") }}, {{ HTMLElement("output") }}</td>
<td>Describes elements which belongs to this one.</td>
</tr>
<tr>
<td><code>form</code></td>
<td>{{ HTMLElement("button") }}, {{ HTMLElement("fieldset") }}, {{ HTMLElement("input") }}, {{ HTMLElement("keygen") }}, {{ HTMLElement("label") }}, {{ HTMLElement("meter") }}, {{ HTMLElement("object") }}, {{ HTMLElement("output") }}, {{ HTMLElement("progress") }}, {{ HTMLElement("select") }}, {{ HTMLElement("textarea") }}</td>
<td>Indicates the form that is the owner of the element.</td>
</tr>
<tr>
<td><code>formaction</code></td>
<td>{{ HTMLElement("input") }}, {{ HTMLElement("button") }}</td>
<td>Indicates the action of the element, overriding the action defined in the {{ HTMLElement("form") }}.</td>
</tr>
<tr>
<td><code>headers</code></td>
<td>{{ HTMLElement("td") }}, {{ HTMLElement("th") }}</td>
<td>IDs of the <code><th></code> elements which applies to this element.</td>
</tr>
<tr>
<td><code>height</code></td>
<td>{{ HTMLElement("canvas") }}, {{ HTMLElement("embed") }}, {{ HTMLElement("iframe") }}, {{ HTMLElement("img") }}, {{ HTMLElement("input") }}, {{ HTMLElement("object") }}, {{ HTMLElement("video") }}</td>
<td>
<p>Specifies the height of elements listed here. For all other elements, use the CSS {{cssxref("height")}} property.</p>
<div class="note">
<p><strong>Nota:</strong> In some instances, such as {{ HTMLElement("div") }}, this is a legacy attribute, in which case the CSS {{ Cssxref("height") }} property should be used instead.</p>
</div>
</td>
</tr>
<tr>
<td><code>hidden</code></td>
<td><a href="/en-US/docs/HTML/Global_attributes">Global attribute</a></td>
<td>Prevents rendering of given element, while keeping child elements, e.g. script elements, active.</td>
</tr>
<tr>
<td><code>high</code></td>
<td>{{ HTMLElement("meter") }}</td>
<td>Indicates the lower bound of the upper range.</td>
</tr>
<tr>
<td><code>href</code></td>
<td>{{ HTMLElement("a") }}, {{ HTMLElement("area") }}, {{ HTMLElement("base") }}, {{ HTMLElement("link") }}</td>
<td> The URL of a linked resource.</td>
</tr>
<tr>
<td><code>hreflang</code></td>
<td>{{ HTMLElement("a") }}, {{ HTMLElement("area") }}, {{ HTMLElement("link") }}</td>
<td>Specifies the language of the linked resource.</td>
</tr>
<tr>
<td><code>http-equiv</code></td>
<td>{{ HTMLElement("meta") }}</td>
<td> </td>
</tr>
<tr>
<td><code>icon</code></td>
<td>{{ HTMLElement("command") }}</td>
<td>Specifies a picture which represents the command.</td>
</tr>
<tr>
<td><code>id</code></td>
<td><a href="/en-US/docs/HTML/Global_attributes">Global attribute</a></td>
<td>Often used with CSS to style a specific element. The value of this attribute must be unique.</td>
</tr>
<tr>
<td><code>integrity</code></td>
<td>{{ HTMLElement("link") }}, {{ HTMLElement("script") }} </td>
<td>
<p>Security Feature that allows browsers to verify what they fetch. </p>
<p><a href="/en-US/docs/">MDN Link</a></p>
</td>
</tr>
<tr>
<td><code>ismap</code></td>
<td>{{ HTMLElement("img") }}</td>
<td>Indicates that the image is part of a server-side image map.</td>
</tr>
<tr>
<td><code>itemprop</code></td>
<td><a href="/en-US/docs/HTML/Global_attributes">Global attribute</a></td>
<td> </td>
</tr>
<tr>
<td><code>keytype</code></td>
<td>{{ HTMLElement("keygen") }}</td>
<td>Specifies the type of key generated.</td>
</tr>
<tr>
<td><code>kind</code></td>
<td>{{ HTMLElement("track") }}</td>
<td>Specifies the kind of text track.</td>
</tr>
<tr>
<td><code>label</code></td>
<td>{{ HTMLElement("track") }}</td>
<td>Specifies a user-readable title of the text track.</td>
</tr>
<tr>
<td><code>lang</code></td>
<td><a href="/en-US/docs/HTML/Global_attributes">Global attribute</a></td>
<td>Defines the language used in the element.</td>
</tr>
<tr>
<td><code>language</code></td>
<td>{{ HTMLElement("script") }}</td>
<td>Defines the script language used in the element.</td>
</tr>
<tr>
<td><code>list</code></td>
<td>{{ HTMLElement("input") }}</td>
<td>Identifies a list of pre-defined options to suggest to the user.</td>
</tr>
<tr>
<td><code>loop</code></td>
<td>{{ HTMLElement("audio") }}, {{ HTMLElement("bgsound") }}, {{ HTMLElement("marquee") }}, {{ HTMLElement("video") }}</td>
<td>Indicates whether the media should start playing from the start when it's finished.</td>
</tr>
<tr>
<td><code>low</code></td>
<td>{{ HTMLElement("meter") }}</td>
<td>Indicates the upper bound of the lower range.</td>
</tr>
<tr>
<td><code>manifest</code></td>
<td>{{ HTMLElement("html") }}</td>
<td>Specifies the URL of the document's cache manifest.</td>
</tr>
<tr>
<td><code>max</code></td>
<td>{{ HTMLElement("input") }}, {{ HTMLElement("meter") }}, {{ HTMLElement("progress") }}</td>
<td>Indicates the maximum value allowed.</td>
</tr>
<tr>
<td><code>maxlength</code></td>
<td>{{ HTMLElement("input") }}, {{ HTMLElement("textarea") }}</td>
<td>Defines the maximum number of characters allowed in the element.</td>
</tr>
<tr>
<td><code>media</code></td>
<td>{{ HTMLElement("a") }}, {{ HTMLElement("area") }}, {{ HTMLElement("link") }}, {{ HTMLElement("source") }}, {{ HTMLElement("style") }}</td>
<td>Specifies a hint of the media for which the linked resource was designed.</td>
</tr>
<tr>
<td><code>method</code></td>
<td>{{ HTMLElement("form") }}</td>
<td>Defines which <a href="/en-US/docs/Web/HTTP">HTTP</a> method to use when submitting the form. Can be <code>GET</code> (default) or <code>POST</code>.</td>
</tr>
<tr>
<td><code>min</code></td>
<td>{{ HTMLElement("input") }}, {{ HTMLElement("meter") }}</td>
<td>Indicates the minimum value allowed.</td>
</tr>
<tr>
<td><code>multiple</code></td>
<td>{{ HTMLElement("input") }}, {{ HTMLElement("select") }}</td>
<td>Indicates whether multiple values can be entered in an input of the type <code>email</code> or <code>file</code>.</td>
</tr>
<tr>
<td><code>muted</code></td>
<td>{{ HTMLElement("video") }}</td>
<td>Indicates whether the audio will be initially silenced on page load.</td>
</tr>
<tr>
<td><code>name</code></td>
<td>{{ HTMLElement("button") }}, {{ HTMLElement("form") }}, {{ HTMLElement("fieldset") }}, {{ HTMLElement("iframe") }}, {{ HTMLElement("input") }}, {{ HTMLElement("keygen") }}, {{ HTMLElement("object") }}, {{ HTMLElement("output") }}, {{ HTMLElement("select") }}, {{ HTMLElement("textarea") }}, {{ HTMLElement("map") }}, {{ HTMLElement("meta") }}, {{ HTMLElement("param") }}</td>
<td>Name of the element. For example used by the server to identify the fields in form submits.</td>
</tr>
<tr>
<td><code>novalidate</code></td>
<td>{{ HTMLElement("form") }}</td>
<td>This attribute indicates that the form shouldn't be validated when submitted.</td>
</tr>
<tr>
<td><code>open</code></td>
<td>{{ HTMLElement("details") }}</td>
<td>Indicates whether the details will be shown on page load.</td>
</tr>
<tr>
<td><code>optimum</code></td>
<td>{{ HTMLElement("meter") }}</td>
<td>Indicates the optimal numeric value.</td>
</tr>
<tr>
<td><code>pattern</code></td>
<td>{{ HTMLElement("input") }}</td>
<td>Defines a regular expression which the element's value will be validated against.</td>
</tr>
<tr>
<td><code>ping</code></td>
<td>{{ HTMLElement("a") }}, {{ HTMLElement("area") }}</td>
<td> </td>
</tr>
<tr>
<td><code>placeholder</code></td>
<td>{{ HTMLElement("input") }}, {{ HTMLElement("textarea") }}</td>
<td>Provides a hint to the user of what can be entered in the field.</td>
</tr>
<tr>
<td><code>poster</code></td>
<td>{{ HTMLElement("video") }}</td>
<td>A URL indicating a poster frame to show until the user plays or seeks.</td>
</tr>
<tr>
<td><code>preload</code></td>
<td>{{ HTMLElement("audio") }}, {{ HTMLElement("video") }}</td>
<td>Indicates whether the whole resource, parts of it or nothing should be preloaded.</td>
</tr>
<tr>
<td><code>radiogroup</code></td>
<td>{{ HTMLElement("command") }}</td>
<td> </td>
</tr>
<tr>
<td><code>readonly</code></td>
<td>{{ HTMLElement("input") }}, {{ HTMLElement("textarea") }}</td>
<td>Indicates whether the element can be edited.</td>
</tr>
<tr>
<td><code>rel</code></td>
<td>{{ HTMLElement("a") }}, {{ HTMLElement("area") }}, {{ HTMLElement("link") }}</td>
<td>Specifies the relationship of the target object to the link object.</td>
</tr>
<tr>
<td><code>required</code></td>
<td>{{ HTMLElement("input") }}, {{ HTMLElement("select") }}, {{ HTMLElement("textarea") }}</td>
<td>Indicates whether this element is required to fill out or not.</td>
</tr>
<tr>
<td><code>reversed</code></td>
<td>{{ HTMLElement("ol") }}</td>
<td>Indicates whether the list should be displayed in a descending order instead of a ascending.</td>
</tr>
<tr>
<td><code>rows</code></td>
<td>{{ HTMLElement("textarea") }}</td>
<td>Defines the number of rows in a text area.</td>
</tr>
<tr>
<td><code>rowspan</code></td>
<td>{{ HTMLElement("td") }}, {{ HTMLElement("th") }}</td>
<td>Defines the number of rows a table cell should span over.</td>
</tr>
<tr>
<td><code>sandbox</code></td>
<td>{{ HTMLElement("iframe") }}</td>
<td> </td>
</tr>
<tr>
<td><code>scope</code></td>
<td>{{ HTMLElement("th") }}</td>
<td> </td>
</tr>
<tr>
<td><code>scoped</code></td>
<td>{{ HTMLElement("style") }}</td>
<td> </td>
</tr>
<tr>
<td><code>seamless</code></td>
<td>{{ HTMLElement("iframe") }}</td>
<td> </td>
</tr>
<tr>
<td><code>selected</code></td>
<td>{{ HTMLElement("option") }}</td>
<td>Defines a value which will be selected on page load.</td>
</tr>
<tr>
<td><code>shape</code></td>
<td>{{ HTMLElement("a") }}, {{ HTMLElement("area") }}</td>
<td> </td>
</tr>
<tr>
<td><code>size</code></td>
<td>{{ HTMLElement("input") }}, {{ HTMLElement("select") }}</td>
<td>Defines the width of the element (in pixels). If the element's <code>type</code> attribute is <code>text</code> or <code>password</code> then it's the number of characters.</td>
</tr>
<tr>
<td><code>sizes</code></td>
<td>{{ HTMLElement("link") }}, {{ HTMLElement("img") }}, {{ HTMLElement("source") }}</td>
<td> </td>
</tr>
<tr>
<td><code>slot</code></td>
<td><a href="/en-US/docs/HTML/Global_attributes">Global attribute</a></td>
<td>Assigns a slot in a shadow DOM shadow tree to an element.</td>
</tr>
<tr>
<td><code>span</code></td>
<td>{{ HTMLElement("col") }}, {{ HTMLElement("colgroup") }}</td>
<td> </td>
</tr>
<tr>
<td><code>spellcheck</code></td>
<td><a href="/en-US/docs/HTML/Global_attributes">Global attribute</a></td>
<td>Indicates whether spell checking is allowed for the element.</td>
</tr>
<tr>
<td><code>src</code></td>
<td>{{ HTMLElement("audio") }}, {{ HTMLElement("embed") }}, {{ HTMLElement("iframe") }}, {{ HTMLElement("img") }}, {{ HTMLElement("input") }}, {{ HTMLElement("script") }}, {{ HTMLElement("source") }}, {{ HTMLElement("track") }}, {{ HTMLElement("video") }}</td>
<td>The URL of the embeddable content.</td>
</tr>
<tr>
<td><code>srcdoc</code></td>
<td>{{ HTMLElement("iframe") }}</td>
<td> </td>
</tr>
<tr>
<td><code>srclang</code></td>
<td>{{ HTMLElement("track") }}</td>
<td> </td>
</tr>
<tr>
<td><code>srcset</code></td>
<td>{{ HTMLElement("img") }}</td>
<td> </td>
</tr>
<tr>
<td><code>start</code></td>
<td>{{ HTMLElement("ol") }}</td>
<td>Defines the first number if other than 1.</td>
</tr>
<tr>
<td><code>step</code></td>
<td>{{ HTMLElement("input") }}</td>
<td> </td>
</tr>
<tr>
<td><code>style</code></td>
<td><a href="/en-US/docs/HTML/Global_attributes">Global attribute</a></td>
<td>Defines CSS styles which will override styles previously set.</td>
</tr>
<tr>
<td><code>summary</code></td>
<td>{{ HTMLElement("table") }}</td>
<td> </td>
</tr>
<tr>
<td><code>tabindex</code></td>
<td><a href="/en-US/docs/HTML/Global_attributes">Global attribute</a></td>
<td>Overrides the browser's default tab order and follows the one specified instead.</td>
</tr>
<tr>
<td><code>target</code></td>
<td>{{ HTMLElement("a") }}, {{ HTMLElement("area") }}, {{ HTMLElement("base") }}, {{ HTMLElement("form") }}</td>
<td> </td>
</tr>
<tr>
<td><code>title</code></td>
<td><a href="/en-US/docs/HTML/Global_attributes">Global attribute</a></td>
<td>Text to be displayed in a tooltip when hovering over the element.</td>
</tr>
<tr>
<td><code>type</code></td>
<td>{{ HTMLElement("button") }}, {{ HTMLElement("input") }}, {{ HTMLElement("command") }}, {{ HTMLElement("embed") }}, {{ HTMLElement("object") }}, {{ HTMLElement("script") }}, {{ HTMLElement("source") }}, {{ HTMLElement("style") }}, {{ HTMLElement("menu") }}</td>
<td>Defines the type of the element.</td>
</tr>
<tr>
<td><code>usemap</code></td>
<td>{{ HTMLElement("img") }}, {{ HTMLElement("input") }}, {{ HTMLElement("object") }}</td>
<td> </td>
</tr>
<tr>
<td><code>value</code></td>
<td>{{ HTMLElement("button") }}, {{ HTMLElement("option") }}, {{ HTMLElement("input") }}, {{ HTMLElement("li") }}, {{ HTMLElement("meter") }}, {{ HTMLElement("progress") }}, {{ HTMLElement("param") }}</td>
<td>Defines a default value which will be displayed in the element on page load.</td>
</tr>
<tr>
<td><code>width</code></td>
<td>{{ HTMLElement("canvas") }}, {{ HTMLElement("embed") }}, {{ HTMLElement("iframe") }}, {{ HTMLElement("img") }}, {{ HTMLElement("input") }}, {{ HTMLElement("object") }}, {{ HTMLElement("video") }}</td>
<td>
<p>For the elements listed here, this establishes the element's width.</p>
<div class="note">
<p><strong>Nota:</strong> For all other instances, such as {{ HTMLElement("div") }}, this is a legacy attribute, in which case the CSS {{ Cssxref("width") }} property should be used instead.</p>
</div>
</td>
</tr>
<tr>
<td><code>wrap</code></td>
<td>{{ HTMLElement("textarea") }}</td>
<td>Indicates whether the text should be wrapped.</td>
</tr>
</tbody>
</table>
<h2 id="Conteúdo_versus_atributos_IDL">Conteúdo versus atributos IDL</h2>
<p>In HTML, most attributes have two faces: the <strong>content attribute</strong> and the <strong>IDL attribute</strong>.</p>
<p>The content attribute is the attribute as you set it from the content (the HTML code) and you can set it or get it via {{domxref("element.setAttribute()")}} or {{domxref("element.getAttribute()")}}. The content attribute is always a string even when the expected value should be an integer. For example, to set an {{HTMLElement("input")}} element's <code>maxlength</code> to 42 using the content attribute, you have to call <code>setAttribute("maxlength", "42")</code> on that element.</p>
<p>The IDL attribute is also known as a JavaScript property. These are the attributes you can read or set using JavaScript properties like <code class="moz-txt-verticalline">element.foo</code>. The IDL attribute is always going to use (but might transform) the underlying content attribute to return a value when you get it and is going to save something in the content attribute when you set it. In other words, the IDL attributes, in essence, reflect the content attributes.</p>
<p>Most of the time, IDL attributes will return their values as they are really used. For example, the default <code>type</code> for {{HTMLElement("input")}} elements is "text", so if you set <code>input.type="foobar"</code>, the <code><input></code> element will be of type text (in the appearance and the behavior) but the "type" content attribute's value will be "foobar". However, the <code>type</code> IDL attribute will return the string "text".</p>
<p>IDL attributes are not always strings; for example, <code>input.maxlength</code> is a number (a signed long). When using IDL attributes, you read or set values of the desired type, so <code>input.maxlength</code> is always going to return a number and when you set <code>input.maxlength</code> ,it wants a number. If you pass another type, it is automatically converted to a number as specified by the standard JavaScript rules for type conversion.</p>
<p>IDL attributes can <a href="https://www.whatwg.org/specs/web-apps/current-work/multipage/urls.html#reflecting-content-attributes-in-idl-attributes">reflect other types</a> such as unsigned long, URLs, booleans, etc. Unfortunately, there are no clear rules and the way IDL attributes behave in conjunction with their corresponding content attributes depends on the attribute. Most of the time, it will follow <a href="https://www.whatwg.org/specs/web-apps/current-work/multipage/urls.html#reflecting-content-attributes-in-idl-attributes">the rules laid out in the specification</a>, but sometimes it doesn't. HTML specifications try to make this as developer-friendly as possible, but for various reasons (mostly historical), some attributes behave oddly (<code>select.size</code>, for example) and you should read the specifications to understand how exactly they behave.</p>
<h2 id="Consulte_também">Consulte também</h2>
<ul>
<li><a href="/pt-PT/docs/Web/HTML/Elemento">Elementos de HTML</a></li>
</ul>
|