1 /*
2  * $Id$
3  *
4  * Copyright 2001, 2002 by Bruno Lowagie.
5  *
6  * The contents of this file are subject to the Mozilla Public License Version 1.1
7  * (the "License"); you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at http://www.mozilla.org/MPL/
9  *
10  * Software distributed under the License is distributed on an "AS IS" basis,
11  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12  * for the specific language governing rights and limitations under the License.
13  *
14  * The Original Code is 'iText, a free JAVA-PDF library'.
15  *
16  * The Initial Developer of the Original Code is Bruno Lowagie. Portions created by
17  * the Initial Developer are Copyright (C) 1999, 2000, 2001, 2002 by Bruno Lowagie.
18  * All Rights Reserved.
19  * Co-Developer of the code is Paulo Soares. Portions created by the Co-Developer
20  * are Copyright (C) 2000, 2001, 2002 by Paulo Soares. All Rights Reserved.
21  *
22  * Contributor(s): all the names of the contributors are added in the source code
23  * where applicable.
24  *
25  * Alternatively, the contents of this file may be used under the terms of the
26  * LGPL license (the "GNU LIBRARY GENERAL PUBLIC LICENSE"), in which case the
27  * provisions of LGPL are applicable instead of those above.  If you wish to
28  * allow use of your version of this file only under the terms of the LGPL
29  * License and not to allow others to use your version of this file under
30  * the MPL, indicate your decision by deleting the provisions above and
31  * replace them with the notice and other provisions required by the LGPL.
32  * If you do not delete the provisions above, a recipient may use your version
33  * of this file under either the MPL or the GNU LIBRARY GENERAL PUBLIC LICENSE.
34  *
35  * This library is free software; you can redistribute it and/or modify it
36  * under the terms of the MPL as stated above or under the terms of the GNU
37  * Library General Public License as published by the Free Software Foundation;
38  * either version 2 of the License, or any later version.
39  *
40  * This library is distributed in the hope that it will be useful, but WITHOUT
41  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
42  * FOR A PARTICULAR PURPOSE. See the GNU Library general Public License for more
43  * details.
44  *
45  * Contributions by:
46  * Lubos Strapko
47  *
48  * If you didn't download this code from the following link, you should check if
49  * you aren't using an obsolete version:
50  * http://www.lowagie.com/iText/
51  */
52 
53 package com.lowagie.text.html;
54 
55 /**
56  * A class that contains all the possible tagnames and their attributes.
57  */
58 
59 public class HtmlTags {
60 
61 	/** the root tag. */
62 	public static final String HTML = "html";
63 
64 	/** the head tag */
65 	public static final String HEAD = "head";
66 
67 	/** This is a possible HTML attribute for the HEAD tag. */
68 	public static final String CONTENT = "content";
69 
70 	/** the meta tag */
71 	public static final String META = "meta";
72 
73 	/** attribute of the root tag */
74 	public static final String SUBJECT = "subject";
75 
76 	/** attribute of the root tag */
77 	public static final String KEYWORDS = "keywords";
78 
79 	/** attribute of the root tag */
80 	public static final String AUTHOR = "author";
81 
82 	/** the title tag. */
83 	public static final String TITLE = "title";
84 
85 	/** the script tag. */
86 	public static final String SCRIPT = "script";
87 
88 	/** This is a possible HTML attribute for the SCRIPT tag. */
89 	public static final String LANGUAGE = "language";
90 
91 	/** This is a possible value for the LANGUAGE attribute. */
92 	public static final String JAVASCRIPT = "JavaScript";
93 
94 	/** the body tag. */
95 	public static final String BODY = "body";
96 
97 	/** This is a possible HTML attribute for the BODY tag */
98 	public static final String JAVASCRIPT_ONLOAD = "onLoad";
99 
100 	/** This is a possible HTML attribute for the BODY tag */
101 	public static final String JAVASCRIPT_ONUNLOAD = "onUnLoad";
102 
103 	/** This is a possible HTML attribute for the BODY tag. */
104 	public static final String TOPMARGIN = "topmargin";
105 
106 	/** This is a possible HTML attribute for the BODY tag. */
107 	public static final String BOTTOMMARGIN = "bottommargin";
108 
109 	/** This is a possible HTML attribute for the BODY tag. */
110 	public static final String LEFTMARGIN = "leftmargin";
111 
112 	/** This is a possible HTML attribute for the BODY tag. */
113 	public static final String RIGHTMARGIN = "rightmargin";
114 
115 	// Phrases, Anchors, Lists and Paragraphs
116 
117 	/** the chunk tag */
118 	public static final String CHUNK = "font";
119 
120 	/** the phrase tag */
121 	public static final String CODE = "code";
122 
123 	/** the phrase tag */
124 	public static final String VAR = "var";
125 
126 	/** the anchor tag */
127 	public static final String ANCHOR = "a";
128 
129 	/** the list tag */
130 	public static final String ORDEREDLIST = "ol";
131 
132 	/** the list tag */
133 	public static final String UNORDEREDLIST = "ul";
134 
135 	/** the listitem tag */
136 	public static final String LISTITEM = "li";
137 
138 	/** the paragraph tag */
139 	public static final String PARAGRAPH = "p";
140 
141 	/** attribute of anchor tag */
142 	public static final String NAME = "name";
143 
144 	/** attribute of anchor tag */
145 	public static final String REFERENCE = "href";
146 
147 	/** attribute of anchor tag */
148 	public static final String[] H = new String[6];
149 	static {
150 		H[0] = "h1";
151 		H[1] = "h2";
152 		H[2] = "h3";
153 		H[3] = "h4";
154 		H[4] = "h5";
155 		H[5] = "h6";
156 	}
157 
158 	// Chunks
159 
160 	/** attribute of the chunk tag */
161 	public static final String FONT = "face";
162 
163 	/** attribute of the chunk tag */
164 	public static final String SIZE = "point-size";
165 
166 	/** attribute of the chunk/table/cell tag */
167 	public static final String COLOR = "color";
168 
169 	/** some phrase tag */
170 	public static final String EM = "em";
171 
172 	/** some phrase tag */
173 	public static final String I = "i";
174 
175 	/** some phrase tag */
176 	public static final String STRONG = "strong";
177 
178 	/** some phrase tag */
179 	public static final String B = "b";
180 
181 	/** some phrase tag */
182 	public static final String S = "s";
183 
184 	/** some phrase tag */
185 	public static final String U = "u";
186 
187 	/** some phrase tag */
188 	public static final String SUB = "sub";
189 
190 	/** some phrase tag */
191 	public static final String SUP = "sup";
192 
193 	/** the possible value of a tag */
194 	public static final String HORIZONTALRULE = "hr";
195 
196 	// tables/cells
197 
198 	/** the table tag */
199 	public static final String TABLE = "table";
200 
201 	/** the cell tag */
202 	public static final String ROW = "tr";
203 
204 	/** the cell tag */
205 	public static final String CELL = "td";
206 
207 	/** attribute of the cell tag */
208 	public static final String HEADERCELL = "th";
209 
210 	/** attribute of the table tag */
211 	public static final String COLUMNS = "cols";
212 
213 	/** attribute of the table tag */
214 	public static final String CELLPADDING = "cellpadding";
215 
216 	/** attribute of the table tag */
217 	public static final String CELLSPACING = "cellspacing";
218 
219 	/** attribute of the cell tag */
220 	public static final String COLSPAN = "colspan";
221 
222 	/** attribute of the cell tag */
223 	public static final String ROWSPAN = "rowspan";
224 
225 	/** attribute of the cell tag */
226 	public static final String NOWRAP = "nowrap";
227 
228 	/** attribute of the table/cell tag */
229 	public static final String BORDERWIDTH = "border";
230 
231 	/** attribute of the table/cell tag */
232 	public static final String WIDTH = "width";
233 
234 	/** attribute of the table/cell tag */
235 	public static final String BACKGROUNDCOLOR = "bgcolor";
236 
237 	/** attribute of the table/cell tag */
238 	public static final String BORDERCOLOR = "bordercolor";
239 
240 	/** attribute of paragraph/image/table tag */
241 	public static final String ALIGN = "align";
242 
243 	/** attribute of chapter/section/paragraph/table/cell tag */
244 	public static final String LEFT = "left";
245 
246 	/** attribute of chapter/section/paragraph/table/cell tag */
247 	public static final String RIGHT = "right";
248 
249 	/** attribute of the cell tag */
250 	public static final String HORIZONTALALIGN = "align";
251 
252 	/** attribute of the cell tag */
253 	public static final String VERTICALALIGN = "valign";
254 
255 	/** attribute of the table/cell tag */
256 	public static final String TOP = "top";
257 
258 	/** attribute of the table/cell tag */
259 	public static final String BOTTOM = "bottom";
260 
261 	// Misc
262 
263 	/** the image tag */
264 	public static final String IMAGE = "img";
265 
266 	/** attribute of the image tag
267 	 * @see com.lowagie.text.ElementTags#SRC
268 	 */
269 	public static final String URL = "src";
270 
271 	/** attribute of the image tag */
272 	public static final String ALT = "alt";
273 
274 	/** attribute of the image tag */
275 	public static final String PLAINWIDTH = "width";
276 
277 	/** attribute of the image tag */
278 	public static final String PLAINHEIGHT = "height";
279 
280 	/** the newpage tag */
281 	public static final String NEWLINE = "br";
282 
283 	// alignment attribute values
284 
285 	/** the possible value of an alignment attribute */
286 	public static final String ALIGN_LEFT = "Left";
287 
288 	/** the possible value of an alignment attribute */
289 	public static final String ALIGN_CENTER = "Center";
290 
291 	/** the possible value of an alignment attribute */
292 	public static final String ALIGN_RIGHT = "Right";
293 
294 	/** the possible value of an alignment attribute */
295 	public static final String ALIGN_JUSTIFIED = "Justify";
296 
297 	/** the possible value of an alignment attribute */
298 	public static final String ALIGN_TOP = "Top";
299 
300 	/** the possible value of an alignment attribute */
301 	public static final String ALIGN_MIDDLE = "Middle";
302 
303 	/** the possible value of an alignment attribute */
304 	public static final String ALIGN_BOTTOM = "Bottom";
305 
306 	/** the possible value of an alignment attribute */
307 	public static final String ALIGN_BASELINE = "Baseline";
308 
309 	/** the possible value of an alignment attribute */
310 	public static final String DEFAULT = "Default";
311 
312 	/** The DIV tag. */
313 	public static final String DIV = "div";
314 
315 	/** The SPAN tag. */
316 	public static final String SPAN = "span";
317 
318 	/** The LINK tag. */
319 	public static final String LINK = "link";
320 
321 	/** This is a possible HTML attribute for the LINK tag. */
322 	public static final String TEXT_CSS = "text/css";
323 
324 	/** This is a possible HTML attribute for the LINK tag. */
325 	public static final String REL = "rel";
326 
327 	/** This is used for inline css style information */
328 	public static final String STYLE = "style";
329 
330 	/** This is a possible HTML attribute for the LINK tag. */
331 	public static final String TYPE = "type";
332 
333 	/** This is a possible HTML attribute. */
334 	public static final String STYLESHEET = "stylesheet";
335 
336 	/** This is a possible HTML attribute for auto-formated
337      * @since 2.1.3
338      */
339 	public static final String PRE = "pre";
340 }