HtmlElement Members
.NET Framework 3.0
Represents an HTML element inside of a Web page.
The following tables list the members exposed by the HtmlElement type.
| Name | Description | |
|---|---|---|
| All | Gets an HtmlElementCollection of all elements underneath the current element. |
| CanHaveChildren | Gets a value indicating whether this element can have child elements. |
| Children | Gets an HtmlElementCollection of all children of the current element. |
| ClientRectangle | Gets the bounds of the client area of the element in the HTML document. |
| Document | Gets the HtmlDocument to which this element belongs. |
| DomElement | Gets an unmanaged interface pointer for this element. |
| Enabled | Gets or sets whether the user can input data into this element. |
| FirstChild | Gets the next element below this element in the document tree. |
| Id | Gets or sets a label by which to identify the element. |
| InnerHtml | Gets or sets the HTML markup underneath this element. |
| InnerText | Gets or sets the text assigned to the element. |
| Name | Gets or sets the name of the element. |
| NextSibling | Gets the next element at the same level as this element in the document tree. |
| OffsetParent | Gets the element from which OffsetRectangle is calculated. |
| OffsetRectangle | Gets the location of an element relative to its parent. |
| OuterHtml | Gets or sets the current element's HTML code. |
| OuterText | Gets or sets the current element's text. |
| Parent | Gets the current element's parent element. |
| ScrollLeft | Gets or sets the distance between the edge of the element and the left edge of its content. |
| ScrollRectangle | Gets the dimensions of an element's scrollable region. |
| ScrollTop | Gets or sets the distance between the edge of the element and the top edge of its content. |
| Style | Gets or sets a comma-delimited list of styles for the current element. |
| TabIndex | Gets or sets the location of this element in the tab order. |
| TagName | Gets the name of the HTML tag. |
(see also
Protected Methods
)
Top
| Name | Description | |
|---|---|---|
| AppendChild | Adds an element to another element's subtree. |
| AttachEventHandler | Adds an event handler for a named event on the HTML Document Object Model (DOM). |
| DetachEventHandler | Removes an event handler from a named event on the HTML Document Object Model (DOM). |
| Equals | Overloaded. Overridden. |
| Focus | Puts user input focus on the current element. |
| GetAttribute | Retrieves the value of the named attribute on the element. |
| GetElementsByTagName | Retrieves a collection of elements represented in HTML by the specified HTML tag. |
| GetHashCode | Overridden. |
| GetType | Gets the Type of the current instance. (inherited from Object) |
| InsertAdjacentElement | Insert a new element into the Document Object Model (DOM). |
| InvokeMember | Overloaded. Executes a method unique to the current element. |
| op_Equality | Compares two elements for equality. |
| op_Inequality | Compares two HtmlElement objects for inequality. |
| RaiseEvent | Causes the named event to call all registered event handlers. |
| ReferenceEquals | Determines whether the specified Object instances are the same instance. (inherited from Object) |
| RemoveFocus | Removes focus from the current element, if that element has focus. |
| ScrollIntoView | Scrolls through the document containing this element until the top or bottom edge of this element is aligned with the document's window. |
| SetAttribute | Sets the value of the named attribute on the element. |
| ToString | Returns a String that represents the current Object. (inherited from Object) |
| Name | Description | |
|---|---|---|
| Finalize | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (inherited from Object) |
| MemberwiseClone | Creates a shallow copy of the current Object. (inherited from Object) |
| Name | Description | |
|---|---|---|
| Click | Occurs when the user clicks on the element with the left mouse button. |
| DoubleClick | Occurs when the user clicks the left mouse button over an element twice, in rapid succession. |
| Drag | Occurs when the user drags text to various locations. |
| DragEnd | Occurs when a user finishes a drag operation. |
| DragLeave | Occurs when the user is no longer dragging an item over this element. |
| DragOver | Occurs when the user drags text over the element. |
| Focusing | Occurs when the element first receives user input focus. |
| GotFocus | Occurs when the element has received user input focus. |
| KeyDown | Occurs when the user presses a key on the keyboard. |
| KeyPress | Occurs when the user presses and releases a key on the keyboard. |
| KeyUp | Occurs when the user releases a key on the keyboard. |
| LosingFocus | Occurs when the element is losing user input focus. |
| LostFocus | Occurs when the element has lost user input focus. |
| MouseDown | Occurs when the user presses a mouse button. |
| MouseEnter | Occurs when the user first moves the mouse cursor over the current element. |
| MouseLeave | Occurs when the user moves the mouse cursor off of the current element. |
| MouseMove | Occurs when the user moves the mouse cursor across the element. |
| MouseOver | Occurs when the mouse cursor enters the bounds of the element. |
| MouseUp | Occurs when the user releases a mouse button. |
Reference
HtmlElement ClassSystem.Windows.Forms Namespace
Other Resources
IHTMLElement2 InterfaceIHTMLElement3 Interface
IHTMLElement4 Interface