What are web page elements

In order to give you a better understanding of what is a web element, we first install a Google browser, after installation, open the Google home page!

20-1.jpg


After opening the Google home page, place the mouse over the input box and right-click-> click Inspect above the menu.

20-2.jpg

We will see the source code of the web page on the right side, and the "textarea" in the red oval circle above is the search input box element in the web page.

----------------------------------------------------------------------------------------
Important recognition: Any web page is made up of several elements.The image is an element, the input box is an element..

----------------------------------------------------------------------------------------

Each element in a web page is composed of a tag name and 0 to multiple attribute names and attribute values. We can get an element through tags and attributes, and click, input and other operations on it.


Explanation of the label in the figure above:

This is an input box element. Its element tag name is textarea, its attribute name is name, and its attribute value is q. Generally, an element has 0 or more attribute names and attribute values. The element in the above figure has more than one attribute name and attribute value.


If we need to operate on an element, we must make sure that the attribute name and value of the element are unique in the whole page, which is helpful for the system to determine which element to operate on!If there is more than one tag name, attribute name, and value in the web page, we can specify which one to operate on.