Professional Documents
Culture Documents
SOME Properties CSS
SOME Properties CSS
Property accessKey className clientHeight Description Sets or returns an accesskey for an element Sets or returns the class attribute of an element Returns the viewable height of the content on a page (not including borders, margins, or scrollbars) clientWidth Returns the viewable width of the content on a page (not including borders, margins, or scrollbars) dir id innerHTML lang offsetHeight Sets or returns the text direction of an element Sets or returns the id of an element Sets or returns the HTML contents (+text) of an element Sets or returns the language code for an element Returns the height of an element, including borders and padding if any, but not margins offsetLeft Returns the horizontal offset position of the current element relative to its offset container offsetParent offsetTop Returns the offset container of an element Returns the vertical offset position of the current element relative to its offset container offsetWidth Returns the width of an element, including borders and padding if any, but not margins scrollHeight Returns the entire height of an element (including areas hidden with scrollbars) scrollLeft Returns the distance between the actual left edge of an element and its left edge currently in view scrollTop Returns the distance between the actual top edge of an element and its top edge currently in view scrollWidth Returns the entire width of an element (including areas No No No No No No No No Yes Yes Yes Yes No No W3C Yes Yes No
hidden with scrollbars) style tabIndex title Sets or returns the style attribute of an element Sets or returns the tab order of an element Sets or returns the title attribute of an element Yes Yes Yes
Sets or returns the port part of the href attribute value Sets or returns the protocol part of the href attribute value Sets or returns the querystring part of the href attribute value Sets or returns the value of the shape attribute of an area Sets or returns the value of the target attribute of an area
Description Sets or returns whether a button is disabled, or not Returns a reference to the form that contains a button Sets or returns the value of the name attribute of a button Sets or returns the type of a button Sets or returns the value of the value attribute of a button
W3C: W3C Standard. Property align Description Sets or returns the value of the align attribute in an iframe W3C Yes
contentDocument
Yes
contentWindow
No
frameBorder
Yes
height
Yes
longDesc
Yes
marginHeight
Yes
marginWidth
Yes
name
noResize
Yes
scrolling
Yes
src
Yes
width
Yes
cols
Yes
rows
Yes
alt
Yes
border
Yes
complete
No
height
Yes
hspace
Yes
longDesc
Yes
lowsrc
No
name
Yes
src
Yes
useMap
Yes
vspace
Yes
width
Yes
form
Yes
name
Yes
type
Yes
value
Yes
checked
Yes
defaultChecked
Yes
form
Yes
name
Yes
type
Yes
value
Yes
accept
Yes
form
Yes
name
Sets or returns the value of the name attribute of the FileUpload object
Yes
type
Yes
value
Yes
name
Sets or returns the value of the name attribute of the hidden input field
Yes
type
Yes
value
Sets or returns the value of the value attribute of the hidden input field
Yes
disabled
Yes
form
Yes
maxLength
Yes
name
Yes
readOnly
Yes
size
Yes
type
Yes
value
Sets or returns the value of the value attribute of the password field
Yes
Property checked
W3C Yes
defaultChecked
Yes
disabled
Yes
form
Yes
name
Yes
type
Yes
value
Sets or returns the value of the value attribute of the radio button
Yes
form
Yes
name
Yes
type
Yes
value
Sets or returns the value of the value attribute of the reset button
Yes
W3C: W3C Standard. Property disabled Description Sets or returns whether the submit button is disabled, or not W3C Yes
form
Yes
name
Yes
type
Yes
value
Sets or returns the value of the value attribute of the submit button
Yes
disabled
Yes
form
Yes
maxLength
Yes
name
Yes
readOnly
Yes
size
Yes
type
Yes
value
Sets or returns the value of the value attribute of the text field
Yes
href
Yes
hreflang
Yes
media
Yes
rel
Sets or returns the relationship between the current document and the linked document
Yes
rev
Sets or returns the reverse relationship from the linked document to the current document
Yes
type
Yes
httpEquiv
Sets or returns an HTTP header for the information in the content attribute
Yes
name
Yes
scheme
Yes
Object Properties
W3C: W3C Standard. Property align Description Sets or returns the alignment of the object according to the surrounding text W3C Yes
archive
Sets or returns a string that can be used to implement your own archive functionality for the object
Yes
border
Yes
code
Sets or returns the URL of the file that contains the compiled Java class
Yes
codeBase
Yes
codeType
Yes
data
Yes
declare
Yes
form
Yes
height
Yes
hspace
Yes
name
Yes
standby
Yes
type
Sets or returns the content type for data downloaded via the data attribute
Yes
useMap
Yes
vspace
Yes
width
Yes
disabled
Yes
form
Yes
index
Yes
selected
Yes
text
Yes
value
Yes
form
Yes
length
Yes
multiple
Sets or returns whether more than one item can be selected from the dropdown list
Yes
name
Yes
selectedIndex
Yes
size
Yes
type
Yes
Style object
Syntax for using the Style object properties: document.getElementById("id").style.property="value" The Style object property categories:
Misc
Text
Background properties
W3C: W3C Standard. Property background Description Sets or returns all the background properties in one declaration backgroundAttachment Sets or returns whether a background-image is fixed or scrolls with the page backgroundColor backgroundImage backgroundPosition backgroundRepeat Sets or returns the background-color of an element Sets or returns the background-image for an element Sets or returns the starting position of a background-image Sets or returns how to repeat (tile) a background-image Yes Yes Yes Yes Yes W3C Yes
Border/Outline properties
Property border Description W3C Sets or returns border-width, border-style, and border-color Yes in one declaration borderBottom Sets or returns all the borderBottom* properties in one declaration borderBottomColor borderBottomStyle borderBottomWidth borderColor Sets or returns the color of the bottom border Sets or returns the style of the bottom border Sets or returns the width of the bottom border Sets or returns the color of an element's border (can have up to four values) borderLeft Sets or returns all the borderLeft* properties in one declaration Yes Yes Yes Yes Yes Yes
Sets or returns the color of the left border Sets or returns the style of the left border Sets or returns the width of the left border Sets or returns all the borderRight* properties in one declaration
Sets or returns the color of the right border Sets or returns the style of the right border Sets or returns the width of the right border Sets or returns the style of an element's border (can have up to four values)
borderTop
Yes
Sets or returns the color of the top border Sets or returns the style of the top border Sets or returns the width of the top border Sets or returns the width of an element's border (can have up to four values)
Sets or returns all the outline properties in one declaration Sets or returns the color of the outline around a element Sets or returns the style of the outline around an element Sets or returns the width of the outline around an element
counterReset
Yes
List properties
Property listStyle Description Sets or returns list-style-image, list-style-position, and liststyle-type in one declaration listStyleImage listStylePosition listStyleType Sets or returns an image as the list-item marker Sets or returns the position of the list-item marker Sets or returns the list-item marker type Yes Yes Yes W3C Yes
Margin/Padding properties
Property margin Description Sets or returns the margins of an element (can have up to four values) marginBottom marginLeft marginRight marginTop padding Sets or returns the bottom margin of an element Sets or returns the left margin of an element Sets or returns the right margin of an element Sets or returns the top margin of an element Sets or returns the padding of an element (can have up to four values) paddingBottom paddingLeft paddingRight paddingTop Sets or returns the bottom padding of an element Sets or returns the left padding of an element Sets or returns the right padding of an element Sets or returns the top padding of an element Yes Yes Yes Yes Yes Yes Yes Yes Yes W3C Yes
Misc properties
Property cssText Description Sets or returns the contents of a style declaration as a string W3C Yes
Positioning/Layout properties
Property bottom clear Description Sets or returns the bottom position of a positioned element Sets or returns the position of the element relative to floating objects clip cssFloat cursor Sets or returns which part of a positioned element is visible Sets or returns the horizontal alignment of an object Sets or returns the type of cursor to display for the mouse pointer display height left maxHeight maxWidth minHeight minWidth overflow Sets or returns an element's display type Sets or returns the height of an element Sets or returns the left position of a positioned element Sets or returns the maximum height of an element Sets or returns the maximum width of an element Sets or returns the minimum height of an element Sets or returns the minimum width of an element Sets or returns what to do with content that renders outside the element box position Sets or returns the type of positioning method used for an element (static, relative, absolute or fixed) right top verticalAlign Sets or returns the right position of a positioned element Sets or returns the top position of a positioned element Sets or returns the vertical alignment of the content in an element visibility width Sets or returns whether an element should be visible Sets or returns the width of an element Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes W3C Yes Yes
zIndex
Yes
Printing properties
Property orphans Description Sets or returns the minimum number of lines for an element that must be visible at the bottom of a page pageBreakAfter pageBreakBefore pageBreakInside widows Sets or returns the page-break behavior after an element Sets or returns the page-break behavior before an element Sets or returns the page-break behavior inside an element Sets or returns the minimum number of lines for an element that must be visible at the top of a page Yes Yes Yes Yes W3C Yes
Table properties
Property borderCollapse Description Sets or returns whether the table border should be collapsed into a single border, or not borderSpacing captionSide emptyCells Sets or returns the space between cells in a table Sets or returns the position of the table caption Yes Yes W3C Yes
Sets or returns whether to show the border and background Yes of empty cells, or not
tableLayout
Sets or returns the way to lay out table cells, rows, and columns
Yes
Text properties
Property color direction font Description Sets or returns the color of the text Sets or returns the text direction Sets or returns font-style, font-variant, font-weight, fontsize, line-height, and font-family in one declaration fontFamily Sets or returns the font face for text Yes W3C Yes Yes Yes
Sets or returns the font size of the text Sets or returns the font aspect value
Yes Yes
Sets or returns whether the style of the font is normal, italic Yes or oblique
fontVariant
Sets or returns whether the font should be displayed in small capital letters
Yes
Sets or returns the boldness of the font Sets or returns the space between characters in a text Sets or returns the distance between lines in a text Sets or returns the type of quotation marks for embedded quotations
Sets or returns the horizontal alignment of text Sets or returns the decoration of a text Sets or returns the indentation of the first line of text Sets or returns the shadow effect of a text Sets or returns the case of a text Sets or returns whether the text should be overridden to support multiple languages in the same document
whiteSpace
Sets or returns how to handle tabs, line breaks and whitespace in a text
Yes
wordSpacing
Yes
background
bgColor
border
Sets or returns the width of the table border. Use style.border instead
caption
Yes
cellPadding
Sets or returns the amount of space between the cell border and cell content
Yes
cellSpacing
Yes
frame
Yes
height
rules
Sets or returns which inner-borders (between the cells) that should be displayed in a table
Yes
summary
Yes
tFoot
Yes
tHead
Yes
width
tr Object Properties
Property Description W3C
align
Sets or returns the horizontal alignment of the content within a table row. Use style.textAlign instead
bgColor
Sets or returns the background color of a table row. Use style.backgroundColor instead
ch
Yes
chOff
Yes
height
rowIndex
Yes
sectionRowIndex
Returns the position of a row in the rows collection of a tbody, thead, or tfoot
Yes
vAlign
Sets or returns the vertical alignment of the content within a table row
Yes
defaultValue
Yes
disabled
Yes
form
Yes
name
Yes
readOnly
Yes
rows
Yes
type
Yes
value
Yes