Current Assignment(s)
P1 Workshop (Submission)
Due 11:55PM Wednesday, 10.03
The Image Element
We will get into images much later in the course, but by using a little borrowed code, you can already add images to your new HTML files. Like the others in this section, the image tag, <img />
, creates an empty element. src=""
tells the browser where the image is located, or the URL to the file.
Please note that instead of wrapping the URL in parentheses ((...)
) like we do in Markdown, in HTML, we use quotations ("..."
) to contain the URL to the file.
<img src="./images/name-of-image.jpg" />
Compare this to Markdown:
![My Image](./images/name-of-image.jpg)
At this stage in your development journey, you can get an image to embed very similar as you would in Markdown using the element <img src="..." />
.
html
- Previous
- Next