HTML Images | 99codes

HTML Images


Pictures are essential to decorate just as to delineate numerous intricate ideas in basic manner on your page. This instructional exercise will find a way to utilize pictures in your site pages.



Addition Image-


You can embed any picture in your page by utilizing <img> tag. Following is the straightforward sentence structure to utilize this tag.



The <img> tag is a vacant tag, which implies that, it can contain just rundown of characteristics and it has no end tag.

Example -

To have a go at following precedent, how about we keep our HTML record test.htm and picture document test.png in a similar catalog −



Following Result -

You can utilize PNG, JPEG or GIF picture document dependent on your solace yet ensure you indicate right picture record name in src trait. Picture name is dependably case touchy.

The alt characteristic is an obligatory trait which indicates a substitute content for a picture, if the picture can't be shown.

Set Image Location -


Normally we keep every one of the pictures in a different registry. So we should keep HTML record test.htm in our home registry and make a subdirectory pictures inside the home index where we will keep our picture test.png.

Example -

Accepting our picture area is "picture/test.png", attempt the accompanying model −



Following Result -

Set Image Height and Width -


You can set picture width and tallness dependent on your necessity utilizing width and stature characteristics. You can indicate width and stature of the picture as far as either pixels or level of its genuine size.

Example -

Following Result -


Set Image Border -


Of course, picture will have an outskirt around it, you can indicate fringe thickness as far as pixels utilizing fringe property. A thickness of 0 implies, no outskirt around the image.

Example -


Following Result -


Set Image Alignment -


As a matter of course, picture will adjust at the left half of the page, however you can utilize adjust ascribe to set it in the inside or right.

Example -



Following Result -





HTML Images | 99codes HTML Images | 99codes Reviewed by Arup Roy on May 25, 2019 Rating: 5

No comments:

Powered by Blogger.