HtmlElement Members
Collapse the table of content
Expand the table of content

HtmlElement Members

Represents an HTML element inside of a Web page.

The following tables list the members exposed by the HtmlElement type.

  Name Description
Public property All Gets an HtmlElementCollection of all elements underneath the current element.
Public property CanHaveChildren Gets a value indicating whether this element can have child elements.
Public property Children Gets an HtmlElementCollection of all children of the current element.
Public property ClientRectangle Gets the bounds of the client area of the element in the HTML document.
Public property Document Gets the HtmlDocument to which this element belongs.
Public property DomElement Gets an unmanaged interface pointer for this element.
Public property Enabled Gets or sets whether the user can input data into this element.
Public property FirstChild Gets the next element below this element in the document tree.
Public property Id Gets or sets a label by which to identify the element.
Public property InnerHtml Gets or sets the HTML markup underneath this element.
Public property InnerText Gets or sets the text assigned to the element.
Public property Name Gets or sets the name of the element.
Public property NextSibling Gets the next element at the same level as this element in the document tree.
Public property OffsetParent Gets the element from which OffsetRectangle is calculated.
Public property OffsetRectangle Gets the location of an element relative to its parent.
Public property OuterHtml Gets or sets the current element's HTML code.
Public property OuterText Gets or sets the current element's text.
Public property Parent Gets the current element's parent element.
Public property ScrollLeft Gets or sets the distance between the edge of the element and the left edge of its content.
Public property ScrollRectangle Gets the dimensions of an element's scrollable region.
Public property ScrollTop Gets or sets the distance between the edge of the element and the top edge of its content.
Public property Style Gets or sets a comma-delimited list of styles for the current element.
Public property TabIndex Gets or sets the location of this element in the tab order.
Public property TagName Gets the name of the HTML tag.
Top

(see also Protected Methods )
  Name Description
Public method AppendChild Adds an element to another element's subtree.
Public method AttachEventHandler Adds an event handler for a named event on the HTML Document Object Model (DOM).
Public method DetachEventHandler Removes an event handler from a named event on the HTML Document Object Model (DOM).
Public method Equals Overloaded. Overridden.  
Public method Focus Puts user input focus on the current element.
Public method GetAttribute Retrieves the value of the named attribute on the element.
Public method GetElementsByTagName Retrieves a collection of elements represented in HTML by the specified HTML tag.
Public method GetHashCode Overridden.  
Public method GetType  Gets the Type of the current instance. (Inherited from Object.)
Public method InsertAdjacentElement Insert a new element into the Document Object Model (DOM).
Public method InvokeMember Overloaded. Executes a method unique to the current element.
Public method Static op_Equality Compares two elements for equality.
Public method Static op_Inequality Compares two HtmlElement objects for inequality.
Public method RaiseEvent Causes the named event to call all registered event handlers.
Public method Static ReferenceEquals  Determines whether the specified Object instances are the same instance. (Inherited from Object.)
Public method RemoveFocus Removes focus from the current element, if that element has focus.
Public method ScrollIntoView Scrolls through the document containing this element until the top or bottom edge of this element is aligned with the document's window.
Public method SetAttribute Sets the value of the named attribute on the element.
Public method ToString  Returns a String that represents the current Object. (Inherited from Object.)
Top

  Name Description
Protected method 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.)
Protected method MemberwiseClone  Creates a shallow copy of the current Object. (Inherited from Object.)
Top

  Name Description
Public event Click Occurs when the user clicks on the element with the left mouse button.
Public event DoubleClick Occurs when the user clicks the left mouse button over an element twice, in rapid succession.
Public event Drag Occurs when the user drags text to various locations.
Public event DragEnd Occurs when a user finishes a drag operation.
Public event DragLeave Occurs when the user is no longer dragging an item over this element.
Public event DragOver Occurs when the user drags text over the element.
Public event Focusing Occurs when the element first receives user input focus.
Public event GotFocus Occurs when the element has received user input focus.
Public event KeyDown Occurs when the user presses a key on the keyboard.
Public event KeyPress Occurs when the user presses and releases a key on the keyboard.
Public event KeyUp Occurs when the user releases a key on the keyboard.
Public event LosingFocus Occurs when the element is losing user input focus.
Public event LostFocus Occurs when the element has lost user input focus.
Public event MouseDown Occurs when the user presses a mouse button.
Public event MouseEnter Occurs when the user first moves the mouse cursor over the current element.
Public event MouseLeave Occurs when the user moves the mouse cursor off of the current element.
Public event MouseMove Occurs when the user moves the mouse cursor across the element.
Public event MouseOver Occurs when the mouse cursor enters the bounds of the element.
Public event MouseUp Occurs when the user releases a mouse button.
Top

Community Additions

ADD
Show:
© 2016 Microsoft