- slide 1 of 1
HTML Tag Codes T - Z
HTML tags code utilizes the less-than (<) and greater-than (>) keys found on your keyboard. In order for the HTML code to be executed, each element must contain both a corresponding beginning and ending tag. An ending tag is differentiated from a beginning tag by using the forward slash key (/) prior to the element name, as seen in the following example:
<ELEMENT> content here </ELEMENT>
For the purpose of displaying these articles, the less-than and greater-than symbols have been replaced by an asterisk (*) in the code examples provided. The specific tag element is shown in all-caps, but HTML tag codes do not register letter case, so either may be used with programming.
TABLE: The table tag is often used to organize text and images side-by-side on an HTML page. It divides an area into a designated number of rows and columns. Many attributes can be applied to a table as a whole as well as to individual rows and cells. The table tag contains 3 parts: the table element code, the table row code for each horizontal row (TR) and the table cell code (TD) for each individual cell in a row. Following is the standard configuration for the table tag. Additional rows and cells may be added as required and cells may contain any other HTML tags. Because the table tag is based on a spacial grid, each row should contain the same number of cells.
Code: *TABLE* *TR* *TD* 1st cell content */TD* *TD* 2nd cell content */TD* */TR* */TABLE*
TABLE ATTRIBUTES: There are many attributes that can be applied to a table, and most can either be applied to the entire table or to a specific row or cell. The attribute code should be placed within the TABLE, TR OR TD opening tag.
Border Width: BORDER="#" (where # represents the pixel width of the border)
Border Color: BORDERCOLOR="#??????" (where ? should be replaced by a six-character hexadecimal color code)
Width: WIDTH="#" (where # represents the width in pixels)
Height: HEIGHT="#" (where # represents the height in pixels)
Cell Spacing: CELLSPACING="#" (where # represents the pixel dimension for increasing the space desired between cells)
Cell Padding: CELLPADDING="#" (where # represents the pixel dimension for increasing the space between a cell's border and its content)
Alignment: ALIGN="LEFT" (alignment options: LEFT, RIGHT, CENTER)
Vertical Alignment: (vertical alignment options: TOP, MIDDLE, BOTTOM)
Column Span: COLSPAN="#" (This attribute is used to combine two columns of a table into one. # should be replaced with the number of columns the cell should span)
Row Span: ROWSPAN="#" (This attribute is used to combine two rows of a table into one. # should be replaced with the number of rows the cell should span)
Background Color: BGCOLOR="#??????" (? should be replaced with a six-character hexadecimal color code)
Background Image: BACKGROUND="image URL here"
TITLE: This HTML tag contains the page title that displays in the user's browser window as well as in his bookmark list. It should be included within the header tag.
Code: *TITLE* content here */TITLE*
UNDERLINE: The underline tag is used to underline selected text.
Code: *U* content here */U*
UNORDERED LIST: This tag configures a bulleted text list with appropriate alignment. It contains two parts: the unordered list element code and the list item code. The list item code appears between the unordered list beginning and ending tags and should precede each item in the list. It does not require an ending tag. You may also designate the specific type of "bullet" using the "type" attribute. Bullet options are "disc", "circle" and "square". The following code example configures a list with two items displayed with a disc bullet.
Code: *UL TYPE="DISC"* *LI* list content here *LI* list content here */UL*
WIDTH: The width attribute is used to designate the width in pixels of various elements such as images, table cells, or horizontal rules. It appears within the element beginning tag. Replace the "#" with your specific pixel dimensions.
A Glossary of HTML Tags: T-Z
The series offers an on-going glossary of alphabetized HTML tags. Beginning with an overview of HTML and its correct syntax, it serves as a resource for learning how to code various HTML functions in your web pages.