Attributes of HTML tags [6/14]
As you may have noticed in the previous task, nothing happened after you inserted the
<img> tag into the code. Why is that?
Tags can have attributes. Some tags should be used only with attributes. For example, the
<img>, tag that defines an image. It has to be used with an attribute
src, that defines the address of the image (otherwise the browser won’t be able to load it).
In common cases the tag is written in the following way:
<tag-name attribute1="value1" attribute2="value2" ...>
There can be several attributes, here are the examples:
<p class="important">...</p> <a class="external" href="https://htmlacademy.org">...</a> <img class="avatar" src="keks.png">
In this task you will practice using tag attributes.
srcattribute with value
- After that – one more attribute