-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathspec_html.go
2376 lines (2218 loc) · 116 KB
/
spec_html.go
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
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
package cfg
import (
pb "github.com/delaneyj/gostar/cfg/gen/specs/v1"
)
var HTML = &pb.Namespace{
Name: "html",
Description: `HTML (HyperText Markup Language) is the most basic building block of the Web. It defines the meaning and structure of web content. Other technologies besides HTML are generally used to describe a web page's appearance/presentation (CSS) or functionality/behavior (JavaScript). "Hypertext" refers to links that connect web pages to one another, either within a single website or between websites. Links are a fundamental aspect of the Web. By uploading content to the Internet and linking it to pages created by other people, you become an active participant in the World Wide Web.`,
Attributes: []*pb.Attribute{
{
Key: "accesskey",
Description: `The accesskey global attribute provides a hint for generating a keyboard shortcut for the current element. The attribute value must consist of a single printable character (which includes accented and other characters that can be generated by the keyboard).`,
Type: AttributeTypeRune(),
},
{
Key: "autocapitalize",
Description: `The autocapitalize global attribute is an enumerated attribute that controls whether and how text input is automatically capitalized as it is entered/edited by the user. autocapitalize can be set on <input> and <textarea> elements, and on their containing <form> elements. When autocapitalize is set on a <form> element, it sets the autocapitalize behavior for all contained <input>s and <textarea>s, overriding any autocapitalize values set on contained elements. autocapitalize has no effect on the url, email, or password <input> types, where autocapitalization is never enabled. Where autocapitalize is not specified, the adopted default behavior varies between browsers. For example: Chrome and Safari default to on/sentences Firefox defaults to off/none.`,
Type: AttributeTypeChoices(
AttributeTypeChoice("off", "Do not automatically capitalize any text."),
AttributeTypeChoice("none", "Do not automatically capitalize any text."),
AttributeTypeChoice("sentences", "Automatically capitalize the first character of each sentence."),
AttributeTypeChoice("on", "Automatically capitalize the first character of each sentence."),
AttributeTypeChoice("words", "Automatically capitalize the first character of each word."),
AttributeTypeChoice("characters", "Automatically capitalize all characters."),
),
},
{
Key: "autofocus",
Description: `The autofocus global attribute is a Boolean attribute indicating that an element should be focused on page load, or when the <dialog> that it is part of is displayed.
Accessibility concerns Automatically focusing a form control can confuse visually-impaired people using screen-reading technology and people with cognitive impairments. When autofocus is assigned, screen-readers "teleport" their user to the form control without warning them beforehand.
Use careful consideration for accessibility when applying the autofocus attribute. Automatically focusing on a control can cause the page to scroll on load. The focus can also cause dynamic keyboards to display on some touch devices. While a screen reader will announce the label of the form control receiving focus, the screen reader will not announce anything before the label, and the sighted user on a small device will equally miss the context created by the preceding content.`,
Type: AttributeTypeBool(),
},
{
Key: "class",
Description: `The class global attribute is a space-separated list of the case-sensitive classes of the element. Classes allow CSS and JavaScript to select and access specific elements via the class selectors or functions like the DOM method document.getElementsByClassName.`,
Type: AttributeTypeSpaceDelimited(),
},
{
Key: "contenteditable",
Description: `The contenteditable global attribute is an enumerated attribute indicating if the element should be editable by the user. If so, the browser modifies its widget to allow editing.`,
Type: AttributeTypeChoices(
AttributeTypeChoice("", "The element is editable."),
AttributeTypeChoice("true", "The element is editable."),
AttributeTypeChoice("false", "The element is not editable."),
AttributeTypeChoice("plaintext-only", "which indicates that the element's raw text is editable, but rich text formatting is disabled."),
),
},
{
Key: "dir",
Description: `The dir global attribute is an enumerated attribute that indicates the directionality of the element's text. Note: This attribute is mandatory for the <bdo> element where it has a different semantic meaning. This attribute is not inherited by the <bdi> element. If not set, its value is auto. This attribute can be overridden by the CSS properties direction and unicode-bidi, if a CSS page is active and the element supports these properties. As the directionality of the text is semantically related to its content and not to its presentation, it is recommended that web developers use this attribute instead of the related CSS properties when possible. That way, the text will display correctly even on a browser that doesn't support CSS or has the CSS deactivated. The auto value should be used for data with an unknown directionality, like data coming from user input, eventually stored in a database.`,
Type: AttributeTypeChoices(
AttributeTypeChoice("ltr", "which means left to right and is to be used for languages that are written from the left to the right (like English);"),
AttributeTypeChoice("rtl", "which means right to left and is to be used for languages that are written from the right to the left (like Arabic);"),
AttributeTypeChoice("auto", "which lets the user agent decide. It uses a basic algorithm as it parses the characters inside the element until it finds a character with a strong directionality, then it applies that directionality to the whole element."),
),
},
{
Key: "draggable",
Description: `The draggable global attribute is an enumerated attribute that indicates whether the element can be dragged, either with native browser behavior or the HTML Drag and Drop API.`,
Type: AttributeTypeChoices(
AttributeTypeChoice("true", "The element is draggable."),
AttributeTypeChoice("false", "The element is not draggable."),
AttributeTypeChoice("", "drag behavior is the default browser behavior: only text selections, images, and links can be dragged. For other elements, the event ondragstart must be set for drag and drop to work"),
AttributeTypeChoice("auto", "drag behavior is the default browser behavior: only text selections, images, and links can be dragged. For other elements, the event ondragstart must be set for drag and drop to work"),
),
},
{
Key: "enterkeyhint",
Description: `The enterkeyhint global attribute is an enumerated attribute defining what action label (or icon) to present for the enter key on virtual keyboards.`,
Type: AttributeTypeChoices(
AttributeTypeChoice("enter", "Typically inserting a new line."),
AttributeTypeChoice("done", "Typically meaning there is nothing more to input and the input method editor (IME) will be closed."),
AttributeTypeChoice("go", "Typically meaning to take the user to the target of the text they typed."),
AttributeTypeChoice("next", "Typically meaning to take the user to the next field that will accept text."),
AttributeTypeChoice("previous", "Typically meaning to take the user to the previous field that will accept text."),
AttributeTypeChoice("search", "Typically taking the user to the results of searching for the text they have typed."),
AttributeTypeChoice("send", "Typically delivering the text to its target."),
),
},
{
Key: "exportparts",
Description: `The exportparts global attribute allows you to select and style elements existing in nested shadow trees, by exporting their part names. The shadow tree is an isolated structure where identifiers, classes, and styles cannot be reached by selectors or queries belonging to a regular DOM. To apply a style to an element living in a shadow tree, by CSS rule created outside of it, part global attribute has to be used. It has to be assigned to an element present in Shadow Tree, and its value should be some identifier. Rules present outside of the shadow tree, must use the ::part pseudo-element, containing the same identifier as the argument. The global attribute part makes the element visible on just a single level of depth. When the shadow tree is nested, parts will be visible only to the parent of the shadow tree but not to its ancestor. Exporting parts further down is exactly what exportparts attribute is for. Attribute exportparts must be placed on a shadow Host, which is the element to which the shadow tree is attached. The value of the attribute should be a comma-separated list of part names present in the shadow tree and which should be made available via a DOM outside of the current structure.`,
Type: AttributeTypeCommaDelimited(),
},
{
Key: "hidden",
Description: `The hidden global attribute is a Boolean attribute indicating that the element is not yet, or is no longer, relevant. For example, it can be used to hide elements of the page that can't be used until the login process has been completed. Note that browsers typically implement hidden until found using content-visibility: hidden. This means that unlike elements in the hidden state, elements in the hidden until found state will have generated boxes, meaning that: the element will participate in page layout margin, borders, padding, and background for the element will be rendered. Also, the element needs to be affected by layout containment in order to be revealed. This means that if the element in the hidden until found state has a display value of none, contents, or inline, then the element will not be revealed by find in page or fragment navigation.`,
Type: AttributeTypeChoices(
AttributeTypeChoice("", "set the element to the hidden state. Additionally, invalid values set the element to the hidden state."),
AttributeTypeChoice("hidden", "set the element to the hidden state. Additionally, invalid values set the element to the hidden state."),
AttributeTypeChoice("until-found", `the element is hidden but its content will be accessible to the browser's "find in page" feature or to fragment navigation. When these features cause a scroll to an element in a hidden until found subtree, the browser will fire a beforematch event on the hidden element remove the hidden attribute from the element scroll to the element
`),
),
},
{
Key: "id",
Description: `The id global attribute defines a unique identifier (ID) which must be unique in the whole document. Its purpose is to identify the element when linking (using a fragment identifier), scripting, or styling (with CSS).`,
Type: AttributeTypeString(),
},
{
Key: "inert",
Description: `The inert global attribute is a Boolean attribute indicating that the browser will ignore the element. With the inert attribute, all of the element's flat tree descendants (such as modal <dialog>s) that don't otherwise escape inertness are ignored. The inert attribute also makes the browser ignore input events sent by the user, including focus-related events and events from assistive technologies. Specifically, inert does the following: Prevents the click event from being fired when the user clicks on the element. Prevents the focus event from being raised by preventing the element from gaining focus. Hides the element and its content from assistive technologies by excluding them from the accessibility tree.`,
Type: AttributeTypeBool(),
},
{
Key: "inputmode",
Description: `The inputmode global attribute is an enumerated attribute that hints at the type of data that might be entered by the user while editing the element or its contents. This allows a browser to display an appropriate virtual keyboard. It is used primarily on <input> elements, but is usable on any element in contenteditable mode. It's important to understand that the inputmode attribute doesn't cause any validity requirements to be enforced on input. To require that input conforms to a particular data type, choose an appropriate <input> element type. For specific guidance on choosing <input> types, see the Values section.`,
Type: AttributeTypeChoices(
AttributeTypeChoice("none", "No virtual keyboard. For when the page implements its own keyboard input control."),
AttributeTypeChoice("", `Standard input keyboard for the user's current locale.`),
AttributeTypeChoice("text", `Standard input keyboard for the user's current locale.`),
AttributeTypeChoice("decimal", `Fractional numeric input keyboard containing the digits and decimal separator for the user's locale (typically . or ,). Devices may or may not show a minus key (-).`),
AttributeTypeChoice("numeric", `Numeric input keyboard, but only requires the digits 0–9. Devices may or may not show a minus key.`),
AttributeTypeChoice("tel", `A telephone keypad input, including the digits 0–9, the asterisk (*), and the pound (#) key. Inputs that *require* a telephone number should typically use <input type="tel"> instead.`),
AttributeTypeChoice("search", `A virtual keyboard optimized for search input. For instance, the return/submit key may be labeled "Search", along with possible other optimizations. Inputs that require a search query should typically use <input type="search"> instead.`),
AttributeTypeChoice("email", `A virtual keyboard optimized for entering email addresses. Typically includes the @character as well as other optimizations. Inputs that require email addresses should typically use <input type="email"> instead.`),
AttributeTypeChoice("url", `A keypad optimized for entering URLs. This may have the / key more prominent, for example. Enhanced features could include history access and so on. Inputs that require a URL should typically use <input type="url"> instead.`),
),
},
{
Key: "is",
Description: `The is global attribute allows you to specify that a standard HTML element should behave like a defined custom built-in element (see Using custom elements for more details). This attribute can only be used if the specified custom element name has been successfully defined in the current document, and extends the element type it is being applied to.`,
Type: AttributeTypeString(),
},
{
Key: "itemid",
Description: `The itemid global attribute provides microdata in the form of a unique, global identifier of an item.
An itemid attribute can only be specified for an element that has both itemscope and itemtype attributes. Also, itemid can only be specified on elements that possess an itemscope attribute whose corresponding itemtype refers to or defines a vocabulary that supports global identifiers. The exact meaning of an itemtype's global identifier is provided by the definition of that identifier within the specified vocabulary. The vocabulary defines whether several items with the same global identifier can coexist and, if so, how items with the same identifier are handled.`,
Type: AttributeTypeString(),
},
{
Key: "itemprop",
Description: `The itemprop global attribute is used to add properties to an item. Every HTML element can have an itemprop attribute specified, and an itemprop consists of a name-value pair. Each name-value pair is called a property, and a group of one or more properties forms an item. Property values are either a string or a URL and can be associated with a very wide range of elements including <audio>, <embed>, <iframe>, <img>, <link>, <object>, <source>, <track>, and <video>.`,
Type: AttributeTypeString(),
},
{
Key: "itemref",
Description: `Properties that are not descendants of an element with the itemscope attribute can be associated with an item using the global attribute itemref. itemref provides a list of element IDs (not itemids) elsewhere in the document, with additional properties The itemref attribute can only be specified on elements that have an itemscope attribute specified.`,
Type: AttributeTypeString(),
},
{
Key: "itemscope",
Description: `The itemscope global attribute is used to add an item to a microdata DOM tree. Every HTML element can have an itemscope attribute specified, and an itemscope consists of a name-value pair. Each name-value pair is called a property, and a group of one or more properties forms an item. Property values are either a string or a URL and can be associated with a very wide range of elements including <audio>, <embed>, <iframe>, <img>, <link>, <object>, <source>, <track>, and <video>.`,
Type: AttributeTypeBool(),
},
{
Key: "itemtype",
Description: `The itemtype global attribute is used to add types to an item. Every HTML element can have an itemtype attribute specified, and an itemtype consists of a name-value pair. Each name-value pair is called a property, and a group of one or more properties forms an item. Property values are either a string or a URL and can be associated with a very wide range of elements including <audio>, <embed>, <iframe>, <img>, <link>, <object>, <source>, <track>, and <video>.`,
Type: AttributeTypeString(),
},
{
Key: "lang",
Description: `The lang global attribute helps define the language of an element: the language that non-editable elements are written in or the language that editable elements should be written in by the user. The tag contains one single entry value in the format defines in the Tags for Identifying Languages (BCP47) IETF document. xml:lang has priority over it.`,
Type: AttributeTypeString(),
},
{
Key: "nonce",
Description: `The nonce global attribute is a unique identifier used to declare inline scripts and style elements to be used in a specific document. It is a cryptographic nonce (number used once) that is used by Content Security Policy to determine whether or not a given inline script is allowed to execute.`,
Type: AttributeTypeString(),
},
{
Key: "part",
Description: `The part global attribute contains a space-separated list of the part names of the element. Part names allows CSS to select and style specific elements in a shadow tree via the ::part pseudo-element.`,
Type: AttributeTypeSpaceDelimited(),
},
{
Key: "popver",
Description: `The popover global attribute is used to designate an element as a popover element. Popover elements are hidden via display: none until opened via an invoking/control element (i.e. a <button> or <input type="button"> with a popovertarget attribute) or a HTMLElement.showPopover() call. When open, popover elements will appear above all other elements in the top layer, and won't be influenced by parent elements' position or overflow styling.`,
Type: AttributeTypeChoices(
AttributeTypeChoice("auto", `Popovers that have the auto state can be "light dismissed" by selecting outside the popover area, and generally only allow one popover to be displayed on-screen at a time.`),
AttributeTypeChoice("", `Popovers that have the auto state can be "light dismissed" by selecting outside the popover area, and generally only allow one popover to be displayed on-screen at a time.`),
AttributeTypeChoice("manual", `manual popovers must always be explicitly hidden, but allow for use cases such as nested popovers in menus.`),
),
},
{
Key: "role",
Description: `The role global attribute is used to define the purpose or state of an element to the browser, in order to facilitate assistive technology such as screen readers. It is a simple string value that can be used to describe the role of an element.`,
Type: AttributeTypeString(),
},
{
Key: "slot",
Description: `The slot global attribute assigns a slot in a shadow DOM shadow tree to an element: An element with a slot attribute is assigned to the slot created by the <slot> element whose name attribute's value matches that slot attribute's value.`,
Type: AttributeTypeString(),
},
{
Key: "spellcheck",
Description: `The spellcheck global attribute is an enumerated attribute that defines whether the element may be checked for spelling errors. If this attribute is not set, its default value is element-type and browser-defined. This default value may also be inherited, which means that the element content will be checked for spelling errors only if its nearest ancestor has a spellcheck state of true. Security and privacy concerns Using spellchecking can have consequences for users' security and privacy. The specification does not regulate how spellchecking is done and the content of the element may be sent to a third party for spellchecking results (see enhanced spellchecking and "spell-jacking"). You should consider setting spellcheck to false for elements that can contain sensitive information.`,
Type: AttributeTypeChoices(
AttributeTypeChoice("", `The element will be checked for spelling errors.`),
AttributeTypeChoice("true", `The element will be checked for spelling errors.`),
AttributeTypeChoice("false", `The element will not be checked for spelling errors.`),
),
},
{
Key: "style",
Description: `The style global attribute is used to add styles to an element, such as color, font, size, and more. Styles are written in CSS.`,
Type: AttributeTypeKVColonSemicolon(),
},
{
Key: "tabindex",
Description: `The tabindex global attribute indicates if its element can be focused, and if/where it participates in sequential keyboard navigation (usually with the Tab key, hence the name). It accepts an integer as a value, with different results depending on the integer's value: a negative value (usually tabindex="-1") means that the element should be focusable, but should not be reachable via sequential keyboard navigation; a value of 0 (tabindex="0") means that the element should be focusable and reachable via sequential keyboard navigation, but its relative order is defined by the platform convention; a positive value means should be focusable and reachable via sequential keyboard navigation; its relative order is defined by the value of the attribute: the sequential follow the increasing number of the tabindex. If several elements share the same tabindex, their relative order follows their relative position in the document.`,
Type: AttributeTypeInt(),
},
{
Key: "title",
Description: `The title global attribute contains text representing advisory information related to the element it belongs to. Such information can typically, but not necessarily, be presented to the user as a tooltip. The main use of the title attribute is to label <iframe> elements for assistive technology. The title attribute may also be used to label controls in data tables. The title attribute, when added to <link rel="stylesheet">, creates an alternate stylesheet. When defining an alternative style sheet with <link rel="alternate"> the attribute is required and must be set to a non-empty string. If included on the <abbr> opening tag, the title must be a full expansion of the abbreviation or acronym. Instead of using title, when possible, provide an expansion of the abbreviation or acronym in plain text on first use, using the <abbr> to mark up the abbreviation. This enables all users know what name or term the abbreviation or acronym shortens while providing a hint to user agents on how to announce the content. While title can be used to provide a programmatically associated label for an <input> element, this is not good practice. Use a <label> instead.`,
Type: AttributeTypeString(),
},
{
Key: "translate",
Description: `The translate global attribute is an enumerated attribute that is used to specify whether an element's attribute values and the values of its Text node children are to be translated when the page is localized, or whether to leave them unchanged.`,
Type: AttributeTypeChoices(
AttributeTypeChoice("", `indicates that the element should be translated when the page is localized.`),
AttributeTypeChoice("yes", `indicates that the element should be translated when the page is localized.`),
AttributeTypeChoice("no", `indicates that the element must not be translated when the page is localized.`),
),
},
},
Elements: []*pb.Element{
{
Tag: "a",
Description: "The HTML <a> element (or anchor element), with its href attribute, creates a hyperlink to web pages, files, email addresses, locations in the same page, or anything else a URL can address. Content within each <a> should indicate the link's destination.",
Attributes: []*pb.Attribute{
{
Key: "download",
Description: "Causes the browser to treat the linked URL as a download. Can be used with or without a filename",
Type: AttributeTypeString(),
},
{
Key: "href",
Description: "The URL that the hyperlink points to. Links are not restricted to HTTP-based URLs — they can use any URL scheme supported by browsers",
Type: AttributeTypeString(),
},
{
Key: "hreflang",
Description: "Specifies the language of the linked resource. It is purely advisory. Allowed values are determined by BCP47 for HTML5 and by RFC1766 for HTML 4. Use this attribute only if the href attribute is present",
Type: AttributeTypeString(),
},
{
Key: "ping",
Description: "A space-separated list of URLs. When the link is followed, the browser will send POST requests with the body PING to the URLs. Typically for tracking.",
Type: AttributeTypeCommaDelimited(),
},
{
Key: "referrerpolicy",
Description: "Specifies which referrer to send when fetching the resource. See Referrer-Policy for possible values and their effects.",
Type: AttributeTypeChoices(
AttributeTypeChoice("no-referrer", "The Referer header will not be sent."),
AttributeTypeChoice("no-referrer-when-downgrade", "The Referer header will not be sent to origins without TLS (HTTPS)."),
AttributeTypeChoice("origin", "The Referer header will be the origin of the page."),
AttributeTypeChoice("origin-when-cross-origin", "The Referer header will be the origin of the page for same-origin requests, and the full URL for cross-origin requests."),
AttributeTypeChoice("same-origin", "The Referer header will be sent for same-origin requests, but cross-origin requests will contain no Referer header."),
AttributeTypeChoice("strict-origin", "The Referer header will be sent with same-origin requests, but cross-origin requests will contain no Referer header."),
AttributeTypeChoice("strict-origin-when-cross-origin", "Send a full URL when performing a same-origin request, only send the origin of the document to a-priori as-much-secure destination (HTTPS->HTTPS), and send no header to a less secure destination (HTTPS->HTTP)."),
AttributeTypeChoice("unsafe-url", "The Referer header will be sent with same-origin and cross-origin requests."),
),
},
{
Key: "rel",
Description: "Specifies the relationship of the target object to the link object. The value is a space-separated list of link types values. The values and their semantics will be registered by some authority that might have meaning to the document author. The default relationship, if no other is given, is void. Use this attribute only if the href attribute is present.",
Type: AttributeTypeSpaceDelimited(),
},
{
Key: "target",
Description: "Specifies where to display the linked URL. It is a name of, or keyword for, a browsing context: a tab, window, or <iframe>. The following keywords have special meanings:",
Type: AttributeTypeChoices(
AttributeTypeChoice("", `the current browsing context. (Default)`),
AttributeTypeChoice("_self", `the current browsing context. (Default)`),
AttributeTypeChoice("_blank", `usually a new tab, but users can configure browsers to open a new window instead.`),
AttributeTypeChoice("_parent", `the parent browsing context of the current one. If no parent, behaves as _self.`),
AttributeTypeChoice("_top", `the topmost browsing context (the "highest" context that's an ancestor of the current one). If no ancestors, behaves as _self.`),
),
},
{
Key: "type",
Description: `Hints at the linked URL's format with a MIME type. No built-in functionality.`,
Type: AttributeTypeString(),
},
},
},
{
Tag: "abbr",
Description: "The HTML Abbreviation element (<abbr>) represents an abbreviation or acronym; the optional title attribute can provide an expansion or description for the abbreviation.",
Attributes: []*pb.Attribute{
{
Key: "title",
Description: "Contains a string that represents the full term or expansion of the abbreviation or acronym, as defined by the abbr element.",
Type: AttributeTypeString(),
},
},
},
{
Tag: "address",
Description: "The HTML <address> element indicates that the enclosed HTML provides contact information for a person or people, or for an organization.",
},
{
Tag: "area",
NoChildren: true,
Description: "The HTML <area> element defines an area inside an image map that has predefined clickable areas. An image map allows geometric areas on an image to be associated with hyperlinks.",
Attributes: []*pb.Attribute{
{
Key: "alt",
Description: "Alternative text in case an image can't be displayed",
Type: AttributeTypeString(),
},
{
Key: "coords",
Description: "Coordinates for the shape to be created in an image map",
Type: AttributeTypeCommaDelimited(),
},
{
Key: "download",
Description: "Causes the browser to download the resource instead of navigating to it. Can be used with or without a value",
Type: AttributeTypeString(),
},
{
Key: "href",
Description: "The URL of a linked resource",
Type: AttributeTypeString(),
},
{
Key: "ping",
Description: "A list of URLs to which, when the hyperlink is followed, post requests with the body PING will be sent by the browser (in the background). Typically used for tracking.",
Type: AttributeTypeCommaDelimited(),
},
{
Key: "referrerpolicy",
Description: "Specifies which referrer to send when fetching the resource. See Referrer-Policy for possible values and their effects.",
Type: AttributeTypeChoices(
AttributeTypeChoice("no-referrer", "The Referer header will not be sent."),
AttributeTypeChoice("no-referrer-when-downgrade", "The Referer header will not be sent to origins without TLS (HTTPS)."),
AttributeTypeChoice("origin", "The Referer header will be the origin of the page."),
AttributeTypeChoice("origin-when-cross-origin", "The Referer header will be the origin of the page for same-origin requests, and the full URL for cross-origin requests."),
AttributeTypeChoice("same-origin", "The Referer header will be sent for same-origin requests, but cross-origin requests will contain no Referer header."),
AttributeTypeChoice("strict-origin", "The Referer header will be sent with same-origin requests, but cross-origin requests will contain no Referer header."),
AttributeTypeChoice("strict-origin-when-cross-origin", "Send a full URL when performing a same-origin request, only send the origin of the document to a-priori as-much-secure destination (HTTPS->HTTPS), and send no header to a less secure destination (HTTPS->HTTP)."),
AttributeTypeChoice("unsafe-url", "The Referer header will be sent with same-origin and cross-origin requests."),
),
},
{
Key: "rel",
Description: "Specifies the relationship of the target object to the link object. The value is a space-separated list of link types values. The values and their semantics will be registered by some authority that might have meaning to the document author. The default relationship, if no other is given, is void. Use this attribute only if the href attribute is present.",
Type: AttributeTypeSpaceDelimited(),
},
{
Key: "shape",
Description: "The kind of shape to be created in an image map",
Type: AttributeTypeChoices(
AttributeTypeChoice("circle", "Defines a circle"),
AttributeTypeChoice("default", "Defines the entire region"),
AttributeTypeChoice("poly", "Defines a polygon"),
AttributeTypeChoice("rect", "Defines a rectangle"),
),
},
{
Key: "target",
Description: "Specifies where to display the linked URL. It is a name of, or keyword for, a browsing context: a tab, window, or <iframe>. The following keywords have special meanings:",
Type: AttributeTypeChoices(
AttributeTypeChoice("", `the current browsing context. (Default)`),
AttributeTypeChoice("_self", `the current browsing context. (Default)`),
AttributeTypeChoice("_blank", `usually a new tab, but users can configure browsers to open a new window instead.`),
AttributeTypeChoice("_parent", `the parent browsing context of the current one. If no parent, behaves as _self.`),
AttributeTypeChoice("_top", `the topmost browsing context (the "highest" context that's an ancestor of the current one). If no ancestors, behaves as _self.`),
),
},
},
},
{
Tag: "article",
Description: "The HTML <article> element represents a self-contained composition in a document, page, application, or site, which is intended to be independently distributable or reusable (e.g., in syndication).",
},
{
Tag: "aside",
Description: "The HTML <aside> element represents a portion of a document whose content is only indirectly related to the document's main content.",
},
{
Tag: "audio",
Description: "The HTML <audio> element is used to embed sound content in documents. It may contain one or more audio sources, represented using the src attribute or the <source> element: the browser will choose the most suitable one. It can also be the destination for streamed media, using a MediaStream.",
Attributes: []*pb.Attribute{
{
Key: "autoplay",
Description: "A Boolean attribute; if specified (even if the value is \"false\"!), the audio will automatically begin playback as soon as it can do so, without waiting for the entire audio file to finish downloading.",
Type: AttributeTypeBool(),
},
{
Key: "controls",
Description: "If this attribute is present, the browser will offer controls to allow the user to control audio playback, including volume, seeking, and pause/resume playback.",
Type: AttributeTypeBool(),
},
{
Key: "loop",
Description: "A Boolean attribute; if specified, the audio player will automatically seek back to the start upon reaching the end of the audio.",
Type: AttributeTypeBool(),
},
{
Key: "muted",
Description: "A Boolean attribute which indicates whether the audio will be initially silenced. Its default value is false, meaning that the audio will be played when the <audio> element is loaded.",
Type: AttributeTypeBool(),
},
{
Key: "preload",
Description: "This enumerated attribute is intended to provide a hint to the browser about what the author thinks will lead to the best user experience. It may have one of the following values:",
Type: AttributeTypeChoices(
AttributeTypeChoice("none", "Hints to the browser that either the author does not expect the user to need the media resource, or that the server wants to minimize unnecessary traffic."),
AttributeTypeChoice("metadata", "Hints to the browser that the author does not expect the user to need the media resource, but that fetching the resource metadata (dimensions, first frame, track list, duration, etc), is reasonable."),
AttributeTypeChoice("auto", "Hints to the browser that the user is likely to need the media resource, and that fetching the entire media resource is reasonable."),
),
},
{
Key: "src",
Description: "The URL of the embeddable content.",
Type: AttributeTypeString(),
},
},
},
{
Tag: "b",
Description: "The HTML Bring Attention To element (<b>) is used to draw the reader's attention to the element's contents, which are not otherwise granted special importance. This was formerly known as the Boldface element, and most browsers still draw the text in boldface. However, you should not use <b> for styling text; instead, you should use the CSS font-weight property to create boldface text, or the <strong> element to indicate that text is of special importance.",
},
{
Tag: "base",
NoChildren: true,
Description: "The HTML <base> element specifies the base URL to use for all relative URLs in a document. There can be only one <base> element in a document.",
Attributes: []*pb.Attribute{
{
Key: "href",
Description: "Specifies the base URL to use for all relative URLs in the page.",
Type: AttributeTypeString(),
},
{
Key: "target",
Description: "Specifies the default target attribute to use for the page.",
Type: AttributeTypeString(),
},
},
},
{
Tag: "bdi",
Description: "The HTML Bidirectional Isolate element (<bdi>) tells the browser's bidirectional algorithm to treat the text it contains in isolation from its surrounding text.",
},
{
Tag: "bdo",
Description: "The HTML Bidirectional Override element (<bdo>) overrides the current directionality of text, so that the text within is rendered in a different direction.",
},
{
Tag: "blockquote",
Description: "The HTML <blockquote> Element (or HTML Block Quotation Element) indicates that the enclosed text is an extended quotation. Usually, this is rendered visually by indentation (see Notes for how to change it). A URL for the source of the quotation may be given using the cite attribute, while a text representation of the source can be given using the <cite> element.",
Attributes: []*pb.Attribute{
{
Key: "cite",
Description: "Contains a URI which points to the source of the quote or change.",
Type: AttributeTypeString(),
},
},
},
{
Tag: "body",
Description: "The HTML <body> Element represents the content of an HTML document. There can be only one <body> element in a document.",
},
{
Tag: "br",
NoChildren: true,
Description: "The HTML <br> element produces a line break in text (carriage-return). It is useful for writing a poem or an address, where the division of lines is significant.",
},
{
Tag: "button",
Description: "The HTML <button> element represents a clickable button, used to submit forms or anywhere in a document for accessible, standard button functionality.",
Attributes: []*pb.Attribute{
{
Key: "autofocus",
Description: "A Boolean attribute which, if present, indicates that the button should be focused as soon as the page is loaded.",
Type: AttributeTypeBool(),
},
{
Key: "disabled",
Description: "A Boolean attribute which is present if the button is disabled.",
Type: AttributeTypeBool(),
},
{
Key: "form",
Description: "The id of the form with which to associate the element.",
Type: AttributeTypeString(),
},
{
Key: "formaction",
Description: "The URI of a program that processes the information submitted by the button. If specified, it overrides the action attribute of the button's form owner.",
Type: AttributeTypeString(),
},
{
Key: "formenctype",
Description: "If the button is a submit button, this attribute specifies the type of content that is used to submit the form to the server.",
Type: AttributeTypeChoices(
AttributeTypeChoice("application/x-www-form-urlencoded", "The default value if the attribute is not specified."),
AttributeTypeChoice("multipart/form-data", "Use this value if you are using an enctype that requires a file upload."),
AttributeTypeChoice("text/plain", `Use this value if you are using a "text/plain" enctype and the form will not contain any file uploads.`),
),
},
{
Key: "formmethod",
Description: "If the button is a submit button, this attribute specifies the HTTP method that the browser uses to submit the form. Possible values are:",
Type: AttributeTypeChoices(
AttributeTypeChoice("post", "The data from the form is included in the body of the HTTP request when sent to the server."),
AttributeTypeChoice("get", "The data from the form are appended to the form attribute URI, with a '?' as a separator, and the resulting URI is sent to the server. Use this method when the form has no side-effects and contains only ASCII characters."),
AttributeTypeChoice("dialog", "When the form is inside a <dialog>, closes the dialog on submission."),
),
},
{
Key: "formnovalidate",
Description: "If the button is a submit button, this Boolean attribute specifies that the form is not to be validated when it is submitted. If this attribute is specified, it overrides the novalidate attribute of the button's form owner.",
Type: AttributeTypeBool(),
},
{
Key: "formtarget",
Description: "If the button is a submit button, this attribute is a name or keyword indicating where to display the response that is received after submitting the form. This is a name of, or keyword for, a browsing context (for example, tab, window, or inline frame). If this attribute is specified, it overrides the target attribute of the button's form owner. The following keywords have special meanings:",
Type: AttributeTypeChoices(
AttributeTypeChoice("_self", "Load the response into the same browsing context as the current one. This value is the default if the attribute is not specified."),
AttributeTypeChoice("_blank", "Load the response into a new unnamed browsing context."),
AttributeTypeChoice("_parent", "Load the response into the parent browsing context of the current one. If there is no parent, this option behaves the same way as _self."),
AttributeTypeChoice("_top", "Load the response into the top-level browsing context (that is, the browsing context that is an ancestor of the current one, and has no parent). If there is no parent, this option behaves the same way as _self."),
),
},
{
Key: "name",
Description: "The name of the button, which is submitted with the form data.",
Type: AttributeTypeString(),
},
{
Key: "popovertarget",
Description: `Turns a <button> element into a popover control button; takes the ID of the popover element to control as its value. See the Popover API landing page for more details.`,
Type: AttributeTypeString(),
},
{
Key: "popovertargetaction",
Description: "Specifies the action to take when the popover control button is clicked. Possible values are:",
Type: AttributeTypeChoices(
AttributeTypeChoice("toggle", "Toggle the visibility of the popover."),
AttributeTypeChoice("show", "Show the popover."),
AttributeTypeChoice("hide", "Hide the popover."),
),
},
{
Key: "type",
Description: "The type of the button. Possible values are:",
Type: AttributeTypeChoices(
AttributeTypeChoice("button", "The button has no default behavior. It can have client-side scripts associated with the element's events, which are triggered when the events occur."),
AttributeTypeChoice("reset", "The button resets all the controls to their initial values."),
AttributeTypeChoice("submit", "The button submits the form data to the server. This is the default if the attribute is not specified for buttons associated with a <form>, or if the attribute is an empty or invalid value."),
),
},
{
Key: "value",
Description: "The initial value of the button. This attribute is optional except when the value of the type attribute is radio or checkbox.",
Type: AttributeTypeString(),
},
},
},
{
Tag: "canvas",
Description: "The HTML <canvas> element is used to draw graphics, on the fly, via scripting (usually JavaScript). However, <canvas> has several features that make it more accessible to developers.",
Attributes: []*pb.Attribute{
{
Key: "height",
Description: "The height of the coordinate space in CSS pixels.",
Type: AttributeTypeInt(),
},
{
Key: "width",
Description: "The width of the coordinate space in CSS pixels.",
Type: AttributeTypeInt(),
},
},
},
{
Tag: "caption",
Description: "The HTML <caption> element specifies the caption (or title) of a table, and if used is always the first child of a <table>.",
},
{
Tag: "cite",
Description: "The HTML Citation element (<cite>) is used to describe a reference to a cited creative work, and must include the title of that work. The reference may be in an abbreviated form according to context-appropriate conventions related to citation metadata.",
},
{
Tag: "code",
Description: "The HTML <code> element displays its contents styled in a fashion intended to indicate that the text is a short fragment of computer code. By default, the content text is displayed using the user agent's default monospace font.",
},
{
Tag: "col",
NoChildren: true,
Description: "The HTML <col> element defines a column within a table and is used for defining common semantics on all common cells. It is generally found within a <colgroup> element.",
Attributes: []*pb.Attribute{
{
Key: "span",
Description: "How many columns this column element spans.",
Type: AttributeTypeInt(),
},
},
},
{
Tag: "colgroup",
Description: "The HTML <colgroup> element defines a group of columns within a table.",
Attributes: []*pb.Attribute{
{
Key: "span",
Description: "How many columns this column group element spans.",
Type: AttributeTypeInt(),
},
},
},
{
Tag: "data",
Description: "The HTML <data> element links a given content with a machine-readable translation. If the content is time- or date-related, the <time> must be used.",
Attributes: []*pb.Attribute{
{
Key: "value",
Description: "The machine-readable translation of the content of the element.",
Type: AttributeTypeString(),
},
},
},
{
Tag: "datalist",
Description: "The HTML <datalist> element contains a set of <option> elements that represent the permissible or recommended options available to choose from within other controls.",
},
{
Tag: "dd",
Description: "The HTML <dd> element provides the description, definition, or value for the preceding term (<dt>) in a description list (<dl>).",
},
{
Tag: "del",
Description: "The HTML <del> element represents a range of text that has been deleted from a document. This can be used when rendering \"track changes\" or source code diff information, for example. The ins element can be used for the opposite purpose: to indicate text that has been added to the document.",
Attributes: []*pb.Attribute{
{
Key: "cite",
Description: "Contains a URI which points to the source of the quote or change.",
Type: AttributeTypeString(),
},
{
Key: "datetime",
Description: "Indicates the date and time associated with the element.",
Type: AttributeTypeString(),
},
},
},
{
Tag: "details",
Description: "The HTML <details> element is used as a disclosure widget from which the user can retrieve additional information.",
Attributes: []*pb.Attribute{
{
Key: "open",
Description: "Indicates whether the details will be shown on page load.",
Type: AttributeTypeBool(),
},
},
},
{
Tag: "dfn",
Description: "The HTML Definition element (<dfn>) is used to indicate the term being defined within the context of a definition phrase or sentence. The <dfn> element is not itself intended to be included in the definition of the term.",
},
{
Tag: "dialog",
Description: "The HTML <dialog> element represents a dialog box or other interactive component, such as an inspector or window. <form> elements can be integrated within a dialog by specifying them with the attribute method=\"dialog\".",
Attributes: []*pb.Attribute{
{
Key: "open",
Description: "Indicates whether the dialog is showing.",
Type: AttributeTypeBool(),
},
},
},
{
Tag: "div",
Description: "The HTML <div> element is the generic container for flow content and does not inherently represent anything. Use it to group elements for purposes such as styling (using the class or id attributes), marking a section of a document in a different language (using the lang attribute), and so on.",
},
{
Tag: "dl",
Description: "The HTML <dl> element represents a description list. The element encloses a list of groups of terms (specified using the <dt> element) and descriptions (provided by <dd> elements). Common uses for this element are to implement a glossary or to display metadata (a list of key-value pairs).",
},
{
Tag: "dt",
Description: "The HTML <dt> element specifies a term in a description or definition list, and as such must be used inside a <dl> element.",
},
{
Tag: "em",
Description: "The HTML <em> element marks text that has stress emphasis. The <em> element can be nested, with each level of nesting indicating a greater degree of emphasis.",
},
{
Tag: "embed",
NoChildren: true,
Description: "The HTML <embed> element embeds external content at the specified point in the document. This content is provided by an external application or other source of interactive content such as a browser plug-in.",
Attributes: []*pb.Attribute{
{
Key: "height",
Description: "The height of the embedded content.",
Type: AttributeTypeInt(),
},
{
Key: "src",
Description: "The URL of the resource being embedded.",
Type: AttributeTypeString(),
},
{
Key: "type",
Description: "The type of content being embedded.",
Type: AttributeTypeString(),
},
{
Key: "width",
Description: "The width of the embedded content.",
Type: AttributeTypeInt(),
},
},
},
{
Tag: "fieldset",
Description: "The HTML <fieldset> element is used to group several controls as well as labels (<label>) within a web form.",
},
{
Tag: "figure",
Description: "The HTML <figure> element represents self-contained content, potentially with an optional caption, which is specified using the (<figcaption>) element. The figure, its caption, and its contents are referenced as a single unit.",
},
{
Tag: "figcaption",
Description: "The HTML <figcaption> or Figure Caption element represents a caption or legend describing the rest of the contents of its parent <figure> element.",
},
{
Tag: "footer",
Description: "The HTML <footer> element represents a footer for its nearest sectioning content or sectioning root element. A footer typically contains information about the author of the section, copyright data.",
},
{
Tag: "form",
Description: "The HTML <form> element represents a document section containing interactive controls for submitting information.",
Attributes: []*pb.Attribute{
{
Key: "accept-charset",
Description: "Specifies the character encodings that are to be used for the form submission.",
Type: AttributeTypeString(),
},
{
Key: "action",
Description: "Specifies where to send the form-data when a form is submitted. Only for type=\"submit\" and type=\"image\".",
Type: AttributeTypeString(),
},
{
Key: "autocomplete",
Description: "Indicates whether controls in this form can by default have their values automatically completed by the browser.",
Type: AttributeTypeChoices(
AttributeTypeChoice("on", "The browser is allowed to automatically complete the input. (Default)"),
AttributeTypeChoice("off", "The browser must not automatically complete the input."),
),
},
{
Key: "enctype",
Description: "Defines the content type of the form data when the method is POST.",
Type: AttributeTypeChoices(
AttributeTypeChoice("application/x-www-form-urlencoded", "The default value if the attribute is not specified."),
AttributeTypeChoice("multipart/form-data", "Use this value if you are using enctype that requires a file upload."),
AttributeTypeChoice("text/plain", `Use this value if you are using a "text/plain" enctype and the form will not contain any file uploads.`),
),
},
{
Key: "method",
Description: "Defines which HTTP method to use when submitting the form. Can be GET (default) or POST.",
Type: AttributeTypeChoices(
AttributeTypeChoice("get", "The browser method to use when submitting the form. (Default)"),
AttributeTypeChoice("post", "The browser method to use when submitting the form."),
),
},
{
Key: "name",
Description: "Name of the element. For example used by the server to identify the fields in form submits.",
Type: AttributeTypeString(),
},
{
Key: "novalidate",
Description: "This Boolean attribute indicates that the form is not to be validated when submitted. If this attribute is not specified (and therefore the form is validated), this default setting can be overridden by a formnovalidate attribute on a <button>, <input type=\"submit\">, or <input type=\"image\"> element belonging to the form.",
Type: AttributeTypeBool(),
},
{
Key: "target",
Description: "Indicates where to display the response after submitting the form.",
Type: AttributeTypeChoices(
AttributeTypeChoice("_self", "Load the response into the same browsing context as the current one. This value is the default if the attribute is not specified."),
AttributeTypeChoice("_blank", "Load the response into a new unnamed browsing context."),
AttributeTypeChoice("_parent", "Load the response into the parent browsing context of the current one. If there is no parent, this option behaves the same way as _self."),
AttributeTypeChoice("_top", "Load the response into the top-level browsing context (that is, the browsing context that is an ancestor of the current one, and has no parent). If there is no parent, this option behaves the same way as _self."),
),
},
},
},
{
Tag: "h1",
Description: "The HTML <h1>–<h6> elements represent six levels of section headings. <h1> is the highest section level and <h6> is the lowest.",
},
{
Tag: "h2",
Description: "The HTML <h1>–<h6> elements represent six levels of section headings. <h1> is the highest section level and <h6> is the lowest.",
},
{
Tag: "h3",
Description: "The HTML <h1>–<h6> elements represent six levels of section headings. <h1> is the highest section level and <h6> is the lowest.",
},
{
Tag: "h4",
Description: "The HTML <h1>–<h6> elements represent six levels of section headings. <h1> is the highest section level and <h6> is the lowest.",
},
{
Tag: "h5",
Description: "The HTML <h1>–<h6> elements represent six levels of section headings. <h1> is the highest section level and <h6> is the lowest.",
},
{
Tag: "h6",
Description: "The HTML <h1>–<h6> elements represent six levels of section headings. <h1> is the highest section level and <h6> is the lowest.",
},
{
Tag: "head",
Description: "The HTML <head> element contains machine-readable information (metadata) about the document, like its title, scripts, and style sheets.",
},
{
Tag: "header",
Description: "The HTML <header> element represents introductory content, typically a group of introductory or navigational aids. It may contain some heading elements but also a logo, a search form, an author name, and other elements.",
},
{
Tag: "hgroup",
Description: "The HTML <hgroup> element represents a multi-level heading for a section of a document. It groups a set of <h1>–<h6> elements.",
},
{
Tag: "hr",
NoChildren: true,
Description: "The HTML <hr> element represents a thematic break between paragraph-level elements: for example, a change of scene in a story, or a shift of topic within a section.",
},
{
Tag: "html",
Description: "The HTML <html> element represents the root (top-level element) of an HTML document, so it is also referred to as the root element. All other elements must be descendants of this element.",
},
{
Tag: "i",
Description: "The HTML Bring Attention To element (<b>) is used to draw the reader's attention to the element's contents, which are not otherwise granted special importance. This was formerly known as the Boldface element, and most browsers still draw the text in boldface. However, you should not use <b> for styling text; instead, you should use the CSS font-weight property to create boldface text, or the <strong> element to indicate that text is of special importance.",
},
{
Tag: "iframe",
Description: "The HTML Inline Frame element (<iframe>) represents a nested browsing context, embedding another HTML page into the current one.",
Attributes: []*pb.Attribute{
{
Key: "allow",
Description: "Allows the iframe's contents to be treated as being from a different origin.",
Type: AttributeTypeCommaDelimited(),
},
{
Key: "allowfullscreen",
Description: "Allows the iframe to be placed into full screen mode, and iframes are also allowed to use the Fullscreen API.",
Type: AttributeTypeBool(),
},
{
Key: "allowpaymentrequest",
Description: "Allows the iframe to use the PaymentRequest interface to make payment requests via the browser.",
Type: AttributeTypeBool(),
},
{
Key: "height",
Description: "The height of the frame in CSS pixels.",
Type: AttributeTypeInt(),
},
{
Key: "name",
Description: "The name of the frame.",
Type: AttributeTypeString(),
},
{
Key: "referrerpolicy",
Description: "Specifies which referrer to send when fetching the resource. See Referrer-Policy for possible values and their effects.",
Type: AttributeTypeChoices(
AttributeTypeChoice("no-referrer", "The Referer header will not be sent."),
AttributeTypeChoice("no-referrer-when-downgrade", "The Referer header will not be sent to origins without TLS (HTTPS)."),
AttributeTypeChoice("origin", "The Referer header will be the origin of the page."),
AttributeTypeChoice("origin-when-cross-origin", "The Referer header will be the origin of the page for same-origin requests, and the full URL for cross-origin requests."),
AttributeTypeChoice("same-origin", "The Referer header will be sent for same-origin requests, but cross-origin requests will contain no Referer header."),
AttributeTypeChoice("strict-origin", "The Referer header will be sent with same-origin requests, but cross-origin requests will contain no Referer header."),
AttributeTypeChoice("strict-origin-when-cross-origin", "Send a full URL when performing a same-origin request, only send the origin of the document to a-priori as-much-secure destination (HTTPS->HTTPS), and send no header to a less secure destination (HTTPS->HTTP)."),
AttributeTypeChoice("unsafe-url", "The Referer header will be sent with same-origin and cross-origin requests."),
),
},
{
Key: "sandbox",
Description: "Enables a set of extra restrictions on any content hosted by the iframe.",
Type: AttributeTypeChoices(
AttributeTypeChoice("", "Treats the content as being from a unique origin."),
AttributeTypeChoice("allow-forms", "Allows form submission."),
AttributeTypeChoice("allow-modals", "Lets the resource open modal windows."),
AttributeTypeChoice("allow-orientation-lock", "Lets the resource lock the screen orientation."),
AttributeTypeChoice("allow-pointer-lock", "Lets the resource use the Pointer Lock API."),
AttributeTypeChoice("allow-popups", "Lets the resource open new windows."),
AttributeTypeChoice("allow-popups-to-escape-sandbox", "Lets the resource open new windows without inheriting the sandboxing."),
AttributeTypeChoice("allow-presentation", "Lets the resource start a presentation session."),
AttributeTypeChoice("allow-same-origin", "Lets the resource be treated as being from the same origin as the current document."),
AttributeTypeChoice("allow-scripts", "Lets the resource run scripts (but not create pop-up windows)."),
AttributeTypeChoice("allow-top-navigation", "Lets the iframe navigate the top-level browsing context."),
),
},
{
Key: "src",
Description: "The URL of the page to embed.",
Type: AttributeTypeString(),
},
{
Key: "srcdoc",
Description: "A document to render in the iframe.",
Type: AttributeTypeString(),
},
{
Key: "width",
Description: "The width of the frame in CSS pixels.",
Type: AttributeTypeInt(),
},