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

Зміст курсу

Web Scraping with Python

Web Scraping with Python

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

bookHTML Attributes

If you wish to include additional information about HTML elements, you should employ attributes. Attributes must be specified within an opening tag, typically in pairs: name="value".

For example, when you want to embed an image, you should utilize the <img> tag with the src attribute. The value of this attribute should be the link to the image.

For instance:

This code will display the following 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 anchor <a> tag. It is used to create hyperlinks, and you must specify the link destination within the href attribute. For example:

will return Test page. There we also set the target parameter to '_blank' so that pressing on the link will open the page in a new tab.

Which attribute do we use for the hyperlink?

Which attribute do we use for the hyperlink?

Виберіть правильну відповідь

Все було зрозуміло?

Як ми можемо покращити це?

Дякуємо за ваш відгук!

Секція 1. Розділ 5
We're sorry to hear that something went wrong. What happened?
some-alt