Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
HTML Attributes | Getting Acquainted with HTML
Web Scraping with Python
course content

Course Content

Web Scraping with Python

Web Scraping with Python

1. Getting Acquainted with HTML
2. Beautiful Soup: Part I
3. Beautiful Soup: Part II

book
HTML Attributes

When including additional information about HTML elements, you should use attributes. Attributes are specified within an opening tag, usually in the form of name="value".

For example, to embed an image, use the <img> tag with the src attribute. The value of this attribute should be the URL of the image.

Here is an example:

This code will display the specified image. Note that the <img> tag is self-closing, meaning it doesn't require a closing tag.

Another commonly used tag that always includes an attribute is the <a> (anchor) tag. It is used to create hyperlinks, and you must specify the link destination within the href attribute. For example:

Will return a link to the Test page.
The target parameter is set to '_blank', ensuring that clicking the link opens the page in a new tab.

Which attribute do we use for the hyperlink?

Which attribute do we use for the hyperlink?

Select the correct answer

Everything was clear?

How can we improve it?

Thanks for your feedback!

Section 1. Chapter 5
We're sorry to hear that something went wrong. What happened?
some-alt