(printable version)Elements and Attributes
|
||
| <element attribute="value"
attribute="value">content</element> (2-sided tag) <element attribute="value" attribute="value" /> (1-sided tag) |
||
| element | attributes | value |
| can be applied to almost all elements | class | text |
| id | text | |
| style | list of styles(See: Styles and Values.doc) | |
| title | text | |
| Elements Found in All Web Pages | ||
| !doctype | ||
| html | ||
| head | ||
| title | ||
| body | many deprecated attributes | |
| meta | name | author | description | keywords | generator | revised | others |
| content | text | |
| http-equiv | content-type | content-style-type | expires | set-cookie | others | |
| List Of Other Elements And Their Attributes | ||
| a | accesskey | a character |
| href | path name to file | |
| target | _self | |
| _blank | ||
| title | any text | |
| address | ||
| area | alt | any text |
| coords | list of coordinates separated by commas | |
| href | path name to file | |
| nohref | nohref | |
| shape | circle | poly | rect | |
| blockquote | ||
| br | ||
| div | id (used with styles) | text containing no spaces (used to name a tag) |
| h1, h2, h3, h4, h5, h6 | align | left | right | center (should use css) |
| hr | color | #hhhhhh where 0 <= h <= f |
| noshade | noshade | |
| size | number | |
| width | number or percentage (include %) | |
| img | alt | any text |
| width | # of pixels | |
| height | # of pixels | |
| src | path name to image file | |
| usemap | #text | |
| link | href | path name to style sheet |
| rel | stylesheet | |
| type | text/css | |
| map | id | text containing no spaces (used to give a name) |
| name (still used with id attr. for older browsers.) | text containing no spaces (used to give a name) | |
| p | ||
| span | style (used for inline styles) | list of styles (See Styles and Values.doc) |
| style | type (used for internal styles) | text/css |
| sub | ||
| sup | ||
| Lists | ||
| ul | ||
| ol | ||
| li | ||
| dl | ||
| dt | ||
| dd | ||
| Table | ||
| table | border | number |
| cellpadding | # of pixels | |
| cellspacing | # of pixels | |
| frame | above|below|border|box|hsides|lhs|rhs|void/vsides | |
| rules | all|cols|groups|none|rows | |
| summary | short description of table for those using a screen reader | |
| width | ||
| caption | align | left | right | top | bottom |
| td | align | left | right | center | justify |
| valign | top | middle | bottom | baseline | |
| colspan | number | |
| rowspan | number | |
| th | align | left | right | center | justify |
| valign | top | middle | bottom | baseline | |
| colspan | number | |
| rowspan | number | |
| tr | align | left | right | center | justify |
| valign | top | middle | bottom | baseline | |
| Form | ||
| form w3c - forms |
action (required) | specifies form processing agent |
| accept (optional) | specifies file types server accepts | |
| enctype (optional) | specifies content type | |
| method (optional) | get | post | |
| id (optional) | text (no spaces - used to name form) | |
| input | type | button|checkbox|file|hidden|image|password|radio|reset|submit|text |
| checked | checked | |
| maxlength | number | |
| name | text with no spaces (used to assign a name) | |
| size | number | |
| value | assign a value | |
| disabled | disabled | |
| readonly | readonly | |
| select | name | text with no spaces (used to assign a name) |
| size | number | |
| option | value | assign a value |
| selected | selected | |
| textarea | cols | number |
| rows | number | |
| name | text with no spaces (used to assign a value) | |
| wrap | soft | hard | |