The Image Tag

02 May 2019

Today we will be learning about the image tag. The <img> tag is a tag used to insert images onto a page. It is also self-closing, meaning that it has no ending tag. To write it you do this <img src="/my-fav-img.jpg"> That would look like
My Favourite Picture
This is a fail proof way to insert an image into a webpage. Right so you've got your image, but wait!!! why is it massive and not at all in the right place. This calls for some CSS, remember... The styling. Try this for a small image with a white border on the side of your page, feel free to rearrange the proportions to make it the right size.
img {
margin: 40px 0px 0px 0px; border: 7px solid white; border-radius: 20px;
}
And you should write this:
width="200" height="200" alt="My Favourite Picture" You can add that in between the last quotation mark and the closing >
I am also going to teach you about the <br> it is again a self closing tag, it puts a break in the text, as if you had pressed enter in a normal word document. It is used for making the image be on its own line, not stuffed in with the other text.
Our Questions/Feedback Box is now usable, you will find it at the bottom of every post!!!!!!!!!!!

NEXT POST →

Any Questions?

Any Questions?