1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 // IWYU pragma: private, include "nsHTMLTags.h"
10 This file contains the list of all HTML tags.
11 See nsHTMLTags.h for access to the enum values for tags.
13 It is designed to be used as input to various places that will define the
14 HTML_TAG macro in useful ways through the magic of C preprocessing.
15 Additionally, it is consumed by the self-regeneration code in
16 ElementName.java from which nsHtml5ElementName.cpp/h is translated.
17 See parser/html/java/README.txt.
19 If you edit this list, you need to re-run ElementName.java
20 self-regeneration and the HTML parser Java to C++ translation.
22 All entries must be enclosed in the macro HTML_TAG which will have cruel
23 and unusual things done to it.
25 It is recommended (but not strictly necessary) to keep all entries
26 in alphabetical order.
28 The first argument to HTML_TAG is the tag name. The second argument is the
29 "creator" method of the form NS_New$TAGNAMEElement, that will be used by
30 nsHTMLContentSink.cpp to create a content object for a tag of that
31 type. Use NOTUSED, if the particular tag has a non-standard creator.
32 The third argument is the interface name specified for this element
33 in the HTML specification. It can be empty if the relevant interface name
36 The HTML_OTHER macro is for values in the nsHTMLTag enum that are
39 Entries *must* use only lowercase characters.
41 Don't forget to update /editor/libeditor/HTMLEditUtils.cpp as well.
43 ** Break these invariants and bad things will happen. **
47 #pragma push_macro("small")
50 #define HTML_HTMLELEMENT_TAG(_tag) HTML_TAG(_tag, , )
52 HTML_TAG(a
, Anchor
, Anchor
)
53 HTML_HTMLELEMENT_TAG(abbr
)
54 HTML_HTMLELEMENT_TAG(acronym
)
55 HTML_HTMLELEMENT_TAG(address
)
56 HTML_TAG(applet
, Unknown
, Unknown
)
57 HTML_TAG(area
, Area
, Area
)
58 HTML_HTMLELEMENT_TAG(article
)
59 HTML_HTMLELEMENT_TAG(aside
)
60 HTML_TAG(audio
, Audio
, Audio
)
61 HTML_HTMLELEMENT_TAG(b
)
62 HTML_TAG(base
, Shared
, Base
)
63 HTML_HTMLELEMENT_TAG(basefont
)
64 HTML_HTMLELEMENT_TAG(bdi
)
65 HTML_HTMLELEMENT_TAG(bdo
)
66 HTML_TAG(bgsound
, Unknown
, Unknown
)
67 HTML_HTMLELEMENT_TAG(big
)
68 HTML_TAG(blockquote
, Shared
, Quote
)
69 HTML_TAG(body
, Body
, Body
)
71 HTML_TAG(button
, Button
, Button
)
72 HTML_TAG(canvas
, Canvas
, Canvas
)
73 HTML_TAG(caption
, TableCaption
, TableCaption
)
74 HTML_HTMLELEMENT_TAG(center
)
75 HTML_HTMLELEMENT_TAG(cite
)
76 HTML_HTMLELEMENT_TAG(code
)
77 HTML_TAG(col
, TableCol
, TableCol
)
78 HTML_TAG(colgroup
, TableCol
, TableCol
)
79 HTML_TAG(data
, Data
, Data
)
80 HTML_TAG(datalist
, DataList
, DataList
)
81 HTML_HTMLELEMENT_TAG(dd
)
82 HTML_TAG(del
, Mod
, Mod
)
83 HTML_TAG(details
, Details
, Details
)
84 HTML_HTMLELEMENT_TAG(dfn
)
85 HTML_TAG(dialog
, Dialog
, Dialog
)
86 HTML_TAG(dir
, Shared
, Directory
)
87 HTML_TAG(div
, Div
, Div
)
88 HTML_TAG(dl
, SharedList
, DList
)
89 HTML_HTMLELEMENT_TAG(dt
)
90 HTML_HTMLELEMENT_TAG(em
)
91 HTML_TAG(embed
, Embed
, Embed
)
92 HTML_TAG(fieldset
, FieldSet
, FieldSet
)
93 HTML_HTMLELEMENT_TAG(figcaption
)
94 HTML_HTMLELEMENT_TAG(figure
)
95 HTML_TAG(font
, Font
, Font
)
96 HTML_HTMLELEMENT_TAG(footer
)
97 HTML_TAG(form
, Form
, Form
)
98 HTML_TAG(frame
, Frame
, Frame
)
99 HTML_TAG(frameset
, FrameSet
, FrameSet
)
100 HTML_TAG(h1
, Heading
, Heading
)
101 HTML_TAG(h2
, Heading
, Heading
)
102 HTML_TAG(h3
, Heading
, Heading
)
103 HTML_TAG(h4
, Heading
, Heading
)
104 HTML_TAG(h5
, Heading
, Heading
)
105 HTML_TAG(h6
, Heading
, Heading
)
106 HTML_TAG(head
, Shared
, Head
)
107 HTML_HTMLELEMENT_TAG(header
)
108 HTML_HTMLELEMENT_TAG(hgroup
)
110 HTML_TAG(html
, Shared
, Html
)
111 HTML_HTMLELEMENT_TAG(i
)
112 HTML_TAG(iframe
, IFrame
, IFrame
)
113 HTML_HTMLELEMENT_TAG(image
)
114 HTML_TAG(img
, Image
, Image
)
115 HTML_TAG(input
, Input
, Input
)
116 HTML_TAG(ins
, Mod
, Mod
)
117 HTML_HTMLELEMENT_TAG(kbd
)
118 HTML_TAG(keygen
, Unknown
, Unknown
)
119 HTML_TAG(label
, Label
, Label
)
120 HTML_TAG(legend
, Legend
, Legend
)
122 HTML_TAG(link
, Link
, Link
)
123 HTML_TAG(listing
, Pre
, Pre
)
124 HTML_HTMLELEMENT_TAG(main
)
125 HTML_TAG(map
, Map
, Map
)
126 HTML_HTMLELEMENT_TAG(mark
)
127 HTML_TAG(marquee
, Marquee
, Marquee
)
128 HTML_TAG(menu
, Menu
, Menu
)
129 HTML_TAG(meta
, Meta
, Meta
)
130 HTML_TAG(meter
, Meter
, Meter
)
131 HTML_TAG(multicol
, Unknown
, Unknown
)
132 HTML_HTMLELEMENT_TAG(nav
)
133 HTML_HTMLELEMENT_TAG(nobr
)
134 HTML_HTMLELEMENT_TAG(noembed
)
135 HTML_HTMLELEMENT_TAG(noframes
)
136 HTML_HTMLELEMENT_TAG(noscript
)
137 HTML_TAG(object
, Object
, Object
)
138 HTML_TAG(ol
, SharedList
, OList
)
139 HTML_TAG(optgroup
, OptGroup
, OptGroup
)
140 HTML_TAG(option
, Option
, Option
)
141 HTML_TAG(output
, Output
, Output
)
142 HTML_TAG(p
, Paragraph
, Paragraph
)
143 HTML_TAG(param
, Shared
, Param
)
144 HTML_TAG(picture
, Picture
, Picture
)
145 HTML_HTMLELEMENT_TAG(plaintext
)
146 HTML_TAG(pre
, Pre
, Pre
)
147 HTML_TAG(progress
, Progress
, Progress
)
148 HTML_TAG(q
, Shared
, Quote
)
149 HTML_HTMLELEMENT_TAG(rb
)
150 HTML_HTMLELEMENT_TAG(rp
)
151 HTML_HTMLELEMENT_TAG(rt
)
152 HTML_HTMLELEMENT_TAG(rtc
)
153 HTML_HTMLELEMENT_TAG(ruby
)
154 HTML_HTMLELEMENT_TAG(s
)
155 HTML_HTMLELEMENT_TAG(samp
)
156 HTML_TAG(script
, Script
, Script
)
157 HTML_HTMLELEMENT_TAG(search
)
158 HTML_HTMLELEMENT_TAG(section
)
159 HTML_TAG(select
, Select
, Select
)
160 HTML_HTMLELEMENT_TAG(small
)
161 HTML_TAG(slot
, Slot
, Slot
)
162 HTML_TAG(source
, Source
, Source
)
163 HTML_TAG(span
, Span
, Span
)
164 HTML_HTMLELEMENT_TAG(strike
)
165 HTML_HTMLELEMENT_TAG(strong
)
166 HTML_TAG(style
, Style
, Style
)
167 HTML_HTMLELEMENT_TAG(sub
)
168 HTML_TAG(summary
, Summary
, )
169 HTML_HTMLELEMENT_TAG(sup
)
170 HTML_TAG(table
, Table
, Table
)
171 HTML_TAG(tbody
, TableSection
, TableSection
)
172 HTML_TAG(td
, TableCell
, TableCell
)
173 HTML_TAG(textarea
, TextArea
, TextArea
)
174 HTML_TAG(tfoot
, TableSection
, TableSection
)
175 HTML_TAG(th
, TableCell
, TableCell
)
176 HTML_TAG(thead
, TableSection
, TableSection
)
177 HTML_TAG(template, Template
, Template
)
178 HTML_TAG(time
, Time
, Time
)
179 HTML_TAG(title
, Title
, Title
)
180 HTML_TAG(tr
, TableRow
, TableRow
)
181 HTML_TAG(track
, Track
, Track
)
182 HTML_HTMLELEMENT_TAG(tt
)
183 HTML_HTMLELEMENT_TAG(u
)
184 HTML_TAG(ul
, SharedList
, UList
)
185 HTML_HTMLELEMENT_TAG(var
)
186 HTML_TAG(video
, Video
, Video
)
187 HTML_HTMLELEMENT_TAG(wbr
)
188 HTML_TAG(xmp
, Pre
, Pre
)
190 /* These are not for tags. But they will be included in the nsHTMLTag
194 HTML_OTHER(whitespace
)
198 HTML_OTHER(doctypeDecl
)
199 HTML_OTHER(markupDecl
)
200 HTML_OTHER(instruction
)
202 #undef HTML_HTMLELEMENT_TAG
204 #pragma pop_macro("small")