Tuesday, March 27, 2018

WebDesign: Inserting Images (W12-P2) [VID]

To insert images (graphics, photographs, etc.) into a web page, you use the <img> element.

A "<img>" element is an inline element used to display an image. It is "is a self-containing, or empty, element, which means that it doesn't wrap any other content and it exists as a single tag” (Howe).

There are also some key attributes to be used within the element.

  • src attribute: an attribute within the the element that indicates the location of the image file to be displayed.
  • alt attribute: an attribute within the element that describes the content of the image. It is the alternative text.
  • height and width attributes: attributes within the element that control the size of the image. May also appear within CSS.

Now, let's take a look at how this is done in the coding.

Let’s continue with special attention to resizing an image.

If you are curious, for more info see the W3schools image page. Especially see the green “Try It Yourself” buttons and try it yourself if you are interested.

Share this post with others. See the Twitter, Facebook and other buttons below.
Please follow, add, friend or subscribe to help support this blog.
See more about me at my web site WilliamHartPhD.com.

No comments:

Post a Comment

Thank you for your comment.
Your comment will be reviewed.
If acceptable, it will be posted after it is carefully reviewed. The review process may take a few minutes or maybe a day or two.