In order to select elements on an HTML page, we have to sort of know what kind of element is it and
what kind of attribute does it have to be able to select it.
So to look at the HTML code, you can go into the dot, dot, dot over here on the right side and go
to more tools and then developer tools.
There's also a shortcut that is shown over here to the right side, depending on if you're on Windows
or Mac.
Now, if you click on that, we will open the Chrome developer tools.
Here we have different tabs.
The ones you're going to be using 95% of the time when you're scraping is going to be elements, console
and network.
But first, let's see how we select elements inside of a HTML page.
So we can click on the select element to inspect it over here with the arrow, and then you can select
elements on the side.
So I can click on this one and then it gets highlighted inside the code here and I can see what kind
of element is this?
I can see it is AH1 element, and down below we have the link, which is a a element.
And these things are going to come in handy when we want to select elements and, for example, get
the text that is inside them, such as simple select of HTML element.
I also recommend that you go into an actual real site and try and fiddle around with this feature as
well and see how it works, how it looks like.
So I can go into Craigslist, which is a site we're going to scrape in another section and you can click
again on Select Element to inspect it.
And select different elements, see how they look like, how it looks like.
So we can see, especially when we have a large site with a lot of HTML.
This feature with selecting elements on a site as you see it, is going to come in handy because we're
going to see in the code where this element is that we are pointing to.
And I can see here it is a span element with the office commercial text inside and outside there is
a element with the link.
These things are going to come in real handy when we want to select different elements inside the HTML.
For example, let's say we are making such that our scraper is selecting all span elements that also
has a element and then we want to select the href property of this element to get the links to all of
these different sections.
That could be one thing you want to build a scraper for.
There's a lot of opportunities and things you can do.
Now, with that being said, I think it's time for us to start writing how we can actually select this
element and get the text out inside of our console.