16 lines
976 B
Markdown
16 lines
976 B
Markdown
![]() |
---
|
||
|
title: Add Images to Your Website
|
||
|
---
|
||
|
## Add Images to Your Website
|
||
|
<!--
|
||
|
Img HTML elements belongs to the group of the "self-closing" HTML elements: it means that they do not follow the ordinary structure - open tag, put content, close tag - but they have just one tag which works as opening and closing tag: <img />
|
||
|
As all opening tag it still can receive attributes though, and these are the tools you can use to manipulate the tag, put some content in, enhance accessibility, etc.
|
||
|
The main attributes of an img tag are src and alt:
|
||
|
<img src="https://linkToAnImage.jpg" alt="Put here a brief description of the image" />
|
||
|
-->
|
||
|
|
||
|
Attributes are key value pairs inserted into the tag. The syntax is `<tag key1="value1" key2="value2"> </tag>` or, in case of self-closing tags, `<tag key1="value1" key2="value2" />` - notice that the pairs are separated by a space character, not by a comma.
|
||
|
|
||
|
### Resources
|
||
|
- [HTML attributes](https://guide.freecodecamp.org/html/attributes)
|