HTML element PathHyperText Markup Language (HTML) is the standard markup language for creating web pages and web applications. HTML elements are building blocks of HTML pages. With HTML constructs, images and other objects, such as interactive forms may be embedded into the web page. It provides a means to create structured documents by denoting structural semantics for text such as headings, paragraphs, lists, links, quotes and other items. HTML elements are delineated by tags, written using angle brackets. All items in a web page are hierarchically interrelated with each other as well, and organized in a tree structure. The terms parent, child, sibling and path are used to describe the relationships.
First Example
<HTML>.<BODY>.<DIV>(3).<A[href ct ='about.htm']>
Example Explained
Syntax of HTML element Path <element type [Filter expression]>(Ordinal number).<element type [Filter expression]>(Ordinal number)... A node in path is consist of the element tag name, filter expression and ordinal number. The node begins with a left angle bracket (<), followed immediately by the tag name. An optional filter expression surrounded by square brackets can follow the tag name. A right angle bracket (>) closes the node. An optionally ordinal number surrounded by parentheses can follow immediately the node close character (>). Multiple nodes in path are separated by the period character (.). The wildcard characters * and ? are allowed to instead of one or more nodes.
Examples A simplest element path that points to a DIV element. <HTML>.<BODY>.<DIV>
A path points to an element with a filter expression. <HTML>.<BODY>.<DIV>.<A[href ct ='about.htm']>
The filter expression has two conditions, and uses the ordinal number 3 for the DIV element. <HTML>.<BODY>.<DIV>.<A[href ct ='about.htm' and style.border=1]>
The wildcard character is used in the path. <HTML>.<BODY>.*.<A[href ct ='about.htm']> Attributes in Filter ExpressionAll attributes of the HTML element can be used in a filter expression. For a CSS attribute, the attribute name must be preceded with "style." For example: <HTML>.<BODY>.<DIV>.<A[style.border = 1]>
| |||||||||
|