001/*
002 * $Id: HtmlTags.java 4784 2011-03-15 08:33:00Z blowagie $
003 *
004 * This file is part of the iText (R) project.
005 * Copyright (c) 1998-2011 1T3XT BVBA
006 * Authors: Bruno Lowagie, Paulo Soares, et al.
007 *
008 * This program is free software; you can redistribute it and/or modify
009 * it under the terms of the GNU Affero General Public License version 3
010 * as published by the Free Software Foundation with the addition of the
011 * following permission added to Section 15 as permitted in Section 7(a):
012 * FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY 1T3XT,
013 * 1T3XT DISCLAIMS THE WARRANTY OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
014 *
015 * This program is distributed in the hope that it will be useful, but
016 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
017 * or FITNESS FOR A PARTICULAR PURPOSE.
018 * See the GNU Affero General Public License for more details.
019 * You should have received a copy of the GNU Affero General Public License
020 * along with this program; if not, see http://www.gnu.org/licenses or write to
021 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
022 * Boston, MA, 02110-1301 USA, or download the license from the following URL:
023 * http://itextpdf.com/terms-of-use/
024 *
025 * The interactive user interfaces in modified source and object code versions
026 * of this program must display Appropriate Legal Notices, as required under
027 * Section 5 of the GNU Affero General Public License.
028 *
029 * In accordance with Section 7(b) of the GNU Affero General Public License,
030 * a covered work must retain the producer line in every PDF that is created
031 * or manipulated using iText.
032 *
033 * You can be released from the requirements of the license by purchasing
034 * a commercial license. Buying such a license is mandatory as soon as you
035 * develop commercial activities involving the iText software without
036 * disclosing the source code of your own applications.
037 * These activities include: offering paid services to customers as an ASP,
038 * serving PDFs on the fly in a web application, shipping iText with a closed
039 * source product.
040 *
041 * For more information, please contact iText Software Corp. at this
042 * address: sales@itextpdf.com
043 */
044package com.itextpdf.text.html;
045
046/**
047 * Static final values of supported HTML tags and attributes.
048 * @since 5.0.6
049 */
050public class HtmlTags {
051
052        // tag names
053        
054        /**
055         * name of a tag.
056         * @since 5.0.6 (reorganized all constants)
057         */
058        public static final String A = "a";
059        /** name of a tag */
060        public static final String B = "b";
061        /** name of a tag */
062        public static final String BODY = "body";
063        /**
064         * name of a tag.
065         * @since 5.0.6 (reorganized all constants)
066         */
067        public static final String BLOCKQUOTE = "blockquote";
068        /**
069         * name of a tag.
070         * @since 5.0.6 (reorganized all constants)
071         */
072        public static final String BR = "br";
073        /** name of a tag */
074        public static final String DIV = "div";
075        /** name of a tag */
076        public static final String EM = "em";
077        /** name of a tag */
078        public static final String FONT = "font";
079        /**
080         * name of a tag.
081         * @since 5.0.6 (reorganized all constants)
082         */
083        public static final String H1 = "h1";
084        /**
085         * name of a tag.
086         * @since 5.0.6 (reorganized all constants)
087         */
088        public static final String H2 = "h2";
089        /**
090         * name of a tag.
091         * @since 5.0.6 (reorganized all constants)
092         */
093        public static final String H3 = "h3";
094        /**
095         * name of a tag.
096         * @since 5.0.6 (reorganized all constants)
097         */
098        public static final String H4 = "h4";
099        /**
100         * name of a tag.
101         * @since 5.0.6 (reorganized all constants)
102         */
103        public static final String H5 = "h5";
104        /**
105         * name of a tag.
106         * @since 5.0.6 (reorganized all constants)
107         */
108        public static final String H6 = "h6";
109        /**
110         * name of a tag.
111         * @since 5.0.6 (reorganized all constants)
112         */
113        public static final String HR = "hr";
114        /** name of a tag */
115        public static final String I = "i";
116        /**
117         * name of a tag.
118         * @since 5.0.6 (reorganized all constants)
119         */
120        public static final String IMG = "img";
121        /**
122         * name of a tag.
123         * @since 5.0.6 (reorganized all constants)
124         */
125        public static final String LI = "li";
126        /**
127         * name of a tag.
128         * @since 5.0.6 (reorganized all constants)
129         */
130        public static final String OL = "ol";
131        /**
132         * name of a tag.
133         * @since 5.0.6 (reorganized all constants)
134         */
135        public static final String P = "p";
136        /** name of a tag */
137        public static final String PRE = "pre";
138        /** name of a tag */
139        public static final String S = "s";
140        /** name of a tag */
141        public static final String SPAN = "span";
142        /**
143         * name of a tag.
144         * @since 5.0.6 (reorganized all constants)
145         */
146        public static final String STRIKE = "strike";
147        /** name of a tag */
148        public static final String STRONG = "strong";
149        /** name of a tag */
150        public static final String SUB = "sub";
151        /** name of a tag */
152        public static final String SUP = "sup";
153        /** name of a tag */
154        public static final String TABLE = "table";
155        /**
156         * name of a tag.
157         * @since 5.0.6 (reorganized all constants)
158         */
159        public static final String TD = "td";
160        /**
161         * name of a tag.
162         * @since 5.0.6 (reorganized all constants)
163         */
164        public static final String TH = "th";
165        /**
166         * name of a tag.
167         * @since 5.0.6 (reorganized all constants)
168         */
169        public static final String TR = "tr";
170        /** name of a tag */
171        public static final String U = "u";
172        /**
173         * name of a tag.
174         * @since 5.0.6 (reorganized all constants)
175         */
176        public static final String UL = "ul";
177
178        // attributes (some are not real HTML attributes!)
179
180        /** name of an attribute */
181        public static final String ALIGN = "align";
182        /**
183         * name of an attribute
184         * @since 5.0.6
185         */
186        public static final String BGCOLOR = "bgcolor";
187        /**
188         * name of an attribute
189         * @since 5.0.6
190         */
191        public static final String BORDER = "border";
192        /** name of an attribute */
193        public static final String CELLPADDING = "cellpadding";
194        /** name of an attribute */
195        public static final String COLSPAN = "colspan";
196        /**
197         * name of an attribute
198         * @since 5.0.6
199         */
200        public static final String EXTRAPARASPACE = "extraparaspace";
201        /**
202         * name of an attribute
203         * @since 5.0.6
204         */
205        public static final String ENCODING = "encoding";
206        /**
207         * name of an attribute
208         * @since 5.0.6
209         */
210        public static final String FACE = "face";
211        /**
212         * Name of an attribute.
213         * @since 5.0.6
214         */
215        public static final String HEIGHT = "height";
216        /**
217         * Name of an attribute.
218         * @since 5.0.6
219         */
220        public static final String HREF = "href";
221        /**
222         * Name of an attribute.
223         * @since 5.0.6
224         */
225        public static final String HYPHENATION = "hyphenation";
226        /**
227         * Name of an attribute.
228         * @since 5.0.6
229         */
230        public static final String IMAGEPATH = "image_path";
231        /**
232         * Name of an attribute.
233         * @since 5.0.6
234         */
235        public static final String INDENT = "indent";
236        /**
237         * Name of an attribute.
238         * @since 5.0.6
239         */
240        public static final String LEADING = "leading";
241        /** name of an attribute */
242        public static final String ROWSPAN = "rowspan";
243        /** name of an attribute */
244        public static final String SIZE = "size";
245        /**
246         * Name of an attribute.
247         * @since 5.0.6
248         */
249        public static final String SRC = "src";
250        /**
251         * Name of an attribute.
252         * @since 5.0.6
253         */
254        public static final String VALIGN = "valign";
255        /** name of an attribute */
256        public static final String WIDTH = "width";
257        
258        // attribute values
259
260        /** the possible value of an alignment attribute */
261        public static final String ALIGN_LEFT = "left";
262        /** the possible value of an alignment attribute */
263        public static final String ALIGN_CENTER = "center";
264        /** the possible value of an alignment attribute */
265        public static final String ALIGN_RIGHT = "right";
266        /** 
267         * The possible value of an alignment attribute.
268         * @since 5.0.6
269         */
270        public static final String ALIGN_JUSTIFY = "justify";
271        /** 
272         * The possible value of an alignment attribute.
273         * @since 5.0.6
274         */
275    public static final String ALIGN_JUSTIFIED_ALL = "JustifyAll";
276        /** the possible value of an alignment attribute */
277        public static final String ALIGN_TOP = "top";
278        /** the possible value of an alignment attribute */
279        public static final String ALIGN_MIDDLE = "middle";
280        /** the possible value of an alignment attribute */
281        public static final String ALIGN_BOTTOM = "bottom";
282        /** the possible value of an alignment attribute */
283        public static final String ALIGN_BASELINE = "baseline";
284        
285        // CSS
286        
287        /** This is used for inline css style information */
288        public static final String STYLE = "style";
289        /**
290         * Attribute for specifying externally defined CSS class.
291         * @since 5.0.6
292         */
293        public static final String CLASS = "class";
294        /** the CSS tag for text color */
295        public static final String COLOR = "color";
296        /**
297         * The CSS tag for the font size.
298         * @since 5.0.6
299         */
300        public static final String FONTFAMILY = "font-family";
301        /**
302         * The CSS tag for the font size.
303         * @since 5.0.6
304         */
305        public static final String FONTSIZE = "font-size";
306        /**
307         * The CSS tag for the font size.
308         * @since 5.0.6
309         */
310        public static final String FONTSTYLE = "font-style";
311        /**
312         * The CSS tag for the font size.
313         * @since 5.0.6
314         */
315        public static final String FONTWEIGHT = "font-weight";
316        /**
317         * The CSS tag for the font size.
318         * @since 5.0.6
319         */
320        public static final String LINEHEIGHT = "line-height";
321        /**
322         * The CSS tag for the font size.
323         * @since 5.0.6
324         */
325        public static final String PADDINGLEFT = "padding-left";
326        /**
327         * The CSS tag for the font size.
328         * @since 5.0.6
329         */
330        public static final String TEXTALIGN = "text-align";
331        /**
332         * The CSS tag for the font size.
333         * @since 5.0.6
334         */
335        public static final String TEXTDECORATION = "text-decoration";
336        /** the CSS tag for text decorations */
337        public static final String VERTICALALIGN = "vertical-align";
338        /**
339         * a CSS value for text decoration
340         * @since 5.0.6
341         */
342        public static final String BOLD = "bold";
343        /**
344         * a CSS value for text decoration
345         * @since 5.0.6
346         */
347        public static final String ITALIC = "italic";
348        /**
349         * a CSS value for text decoration
350         * @since 5.0.6
351         */
352        public static final String LINETHROUGH = "line-through";
353        /**
354         * a CSS value for text decoration
355         * @since 5.0.6
356         */
357        public static final String NORMAL = "normal";
358        /**
359         * a CSS value for text decoration
360         * @since 5.0.6
361         */
362        public static final String OBLIQUE = "oblique";
363        /**
364         * a CSS value for text decoration
365         * @since 5.0.6
366         */
367        public static final String UNDERLINE = "underline";
368
369        /**
370         * A possible attribute.
371         * @since 5.0.6
372         */
373        public static final String AFTER = "after";
374        /**
375         * A possible attribute.
376         * @since 5.0.6
377         */
378        public static final String BEFORE = "before";
379}