Current Assignment(s)
P1: The Live Site
Due: Recommended by Monday, 5.21
Due: Recommended by Monday, 5.21
Image Element Intro
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 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.
HTML
<img src="./images/name-of-image.jpg" />
Compare this to Markdown:
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="..." />
.
- Previous
- Next