HTML Tutorial for Beginners - 07 - Adding a image to a web page
Adding an Image to Your Web Page
In this tutorial, the instructor shows how to add an image to a web page using HTML. The tutorial assumes that the image is saved in the same directory as the HTML code.
Creating Header and Paragraph Tags
- To create a header tag, use
<header>and specify the text inside it.
- To create a paragraph tag, use
<p>and encapsulate everything inside it.
Adding an Image
- Use
<img>tag to add an image.
- Specify the source of the image using
srcattribute.
- If the image is in the same directory as HTML code, no need to specify a directory.
- The
<img>tag does not require a closing tag.
Rendering Image
- Save your HTML file and render it in your browser.
- The image should appear on your web page with its header describing where it was taken.