HTML and CSS Reference
In-Depth Information
Table A-3 HTML Tags and Attributes
(continued)
HTML Tag and Attributes
Description
<select>….</select>
(continued)
name=
text
Assigns a name to the selection list
size=
value
Sets the number of visible options in the list
<small>….</small>
Sets enclosed text to appear in a smaller typeface
<source>...</source>
Defines media resources
new
media=
media_query
Specifies what media/device the media resource is optimized for; default
value: all
src=
URL
The URL of the media
type=
mime_type
Specifies the MIME type of the media resource
<span>….</span>
Creates a user-defined container to add inline structure to the HTML
document
<strike>….</strike> **
Sets enclosed text to appear with strong emphasis; usually displayed as
bold text
<strong>….</strong>
Sets enclosed text to appear with strong emphasis; usually displayed as
bold text
<style>….</style>
Encloses embedded style sheet rules for use in the HTML document
media=
media_query
Identifies the intended medium of the style
scoped=
scoped
If present, the styles should only apply to this element's parent element and
its child elements
new
type=text/css
Specifies the MIME type of the style sheet
<sub>….</sub>
Sets enclosed text to appear in subscript
<summary>...</summary>
Defines the header of a “detail” element
new
<sup>….</sup>
Sets enclosed text to appear in superscript
<table>….</table>
Marks the start and end of a table
align=
position
**
Aligns the table text
border=
value
Specifies if the table cells have borders or not; the only values are “” and 1
cellpadding=
pixels
**
Sets padding around each cell's contents to a value in pixels
cellspacing=
pixels
**
Sets spacing between cells to a value in pixels
frame=
option
**
Defines which parts of the outer border (frame) to display
rules=
option
**
Specifies which inner borders are to appear between the table cells
summary=
text
**
Provides a summary of the table's purpose and structure
width=
pixels, %
**
Sets table width in pixels or a percentage of the window
<tbody>….</tbody>
Defines a groups of rows in a table body
align=
option
**
Aligns text
char=
character
**
Specifies a character on which to align column values (for example, a
period is used to align monetary values)
charoff=
value
**
Specifies a number of characters to offset data aligned with the character
specified in the char property
valign=
position
**
Sets vertical alignment of cells in a group
<td>….</td>
Defines a data cell in a table; contents are left-aligned and normal text
by default
abbr=
text
**
Provides an abbreviated version of the cell's contents that browsers can use
if space is limited
align=
position
**
Specifies horizontal alignment
new
New with HTML5
* Deprecated tags
** Not supported in HTML5