Getting used to html tags
If you know html already, just skip this.
This is just a short tutorial that will give you an idea what html tags are.
HTML stands for hypertext markup language. It’s a way of presenting everything we see on a webpage. HTML uses tags that determine how everything is rendered.
Tags are in this form: <name_of_tag>What is rendered</name_of_tag>
Here are some example of tags:
Paragraph: <p>This is rendered as normal text. Like the one you see now </p>
Headings: <h1>This is text as big as the heading you see up there </h1>
<h2>This is the second biggest heading tag </h2>
<h3>Then the third</h3>
Link: <a href=’1selfsolutions.com’>Link to 1selfsolutions</a>
I hope you’re getting a hang on this. Let’s not talk too much, you’re not here to create html files so we won’t worry too much about the details.
html tags have attributes. Attributes are very important in browser automation and so are tags too. Without these, you can’t make your script interact with anything on the webpage… Well there will be no webpage without tags anyway.
Examples of attributes
A tag may be given a name this way: <button name=”submit-button”>Submit here</button>
This allows you to interact with this particular button (or any tag) using it’s name.
Id is probably the most important attribute since it allows you to target a specific tag and manipulate it easily. Example: <h4 id=”heading”>This is a heading</h4>
You need links to open new webpages. A link tag is in this format: <a href=’http://1selfsolutions.com’>This link</a>
The link text is in between the opening <a> and closing </a> tags and the link itself, is held by an href attrbute.
Class may define an html tag. Classes can be used for multiple tags unlike id. For instance, we may have a list of names on a webpage, each name could be in a <div> </div> tag with a class “name-details” like: <div name-details=”names detailss”
This allows for selecting multiple elements that have that class in common.
You may want to learn HTML in-depth, check this link out.
With this series, we won’t be creating HTML webpages, instead we will inspect what others have done, and build bots that will make use of the html tags to control the webpage as a human would do.
See how it’s done: