Results 1 to 6 of 6

Thread: How to display an image in HTML?

  1. #1
    Join Date
    Jul 2018
    Location
    Bangalore
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default How to display an image in HTML?

    can anyone help me out to resolve this?

  2. #2
    Join Date
    Nov 2006
    Location
    chertsey, a small town 25 miles south west of london, england.
    Posts
    1,445
    Thanks
    1
    Thanked 246 Times in 241 Posts

    Default

    Quote Originally Posted by shashi101 View Post
    "How to display an image in HTML?"

    This link...

    <img>: The Image Embed element

    ...should, hopefully, provide a modicum of enlightenment.

    ...while this link...

    HTML elements reference

    ...will take you a great deal further on the path.

    coothead
    ~ the original bald headed old fart ~

  3. #3
    Join Date
    Jul 2018
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    To reflect an image or other element, including text, a transform property and a scale () function with a negative value are used. The options are:

    transform: scale (-1, 1) - horizontal reflection;
    transform: scale (1, -1) - vertical reflection;
    transform: scale (-1, -1) - simultaneous reflection in the horizontal and vertical.
    There are also separate scaleX () and scaleY () functions, they are responsible for scaling by the corresponding coordinates.

    Although the scale () function is intended to change the scale of an element, a negative value also allows reflection. In Example 1, a normal image is added, and then it is the same, but it is reflected vertically. To do this, a class called mirrorY is added to the <img>.

    Example 1. Reflection of a photo

    <! DOCTYPE html>
    <html>
    *<head>
    **<meta charset = "utf-8">
    **<title> Reflection </ title>
    **<style>
    ***.mirrorY {transform: scale (1, -1); }
    **</ style>
    *</ head>
    *<body>
    **<img src = "images / spam.jpg" alt = "Spam">
    **<img src = "images / spam.jpg" alt = "Spam" class = "mirrorY">
    *</ body>
    </ html>

  4. #4
    Join Date
    Feb 2019
    Location
    Indianapolis
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Yep, you're right. To insert the image in the HTML you need to write in the body of the document such code:
    HTML Code:
    <img src="image.gif" alt="some text" width=32 height=32>
    - img stands for "image." It announces to the browser that an image will go here on the page.
    - src stands for "source." This again is an attribute, a command inside a command. It's telling the browser where to go to find the image.
    - image.gif is the name of the image. Notice it's following the same type of format as your HTML documents. There is a name (image) then a dot and then there is a suffix (gif).
    - alt stands for "alternate text". This tells the browser that if it can't find the image, then just display this text. It also tells anyone who can't view your image what the image is about.
    - width stands for just that, the width of the image in pixels. It can range from 1 pixel to, well, just about any number, but generally will be less than the width of the web browser.
    - height stands for, as you might guess, the height of the image in pixels. Again, the height can be just about anything, but generally will be less than the height of the web browser.

    I take many examples and assignments for HTML from spam link, so I can still show how to activate image (turning an image into a link). In order for the image to become clickable or “active”, the following code needs to be written:
    HTML Code:
    <a href="http://www.site.com"><img src="image.gif" alt="Home"></a>
    Last edited by james438; 02-02-2019 at 01:31 AM.

  5. #5
    Join Date
    Dec 2018
    Location
    Texas
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Use the following code to add image using html
    <img src="imgage name.jpg" alt="alt tag">

  6. #6
    Join Date
    Dec 2018
    Location
    Texas
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    use this.
    <img src="image.jpg" alt="alt tag">

Similar Threads

  1. Looking for an image/html message display script according to hours of operation
    By Tominator in forum Looking for such a script or service
    Replies: 0
    Last Post: 07-03-2009, 05:07 PM
  2. How to make Image Load before display html page
    By woooody in forum Dynamic Drive scripts help
    Replies: 0
    Last Post: 03-22-2009, 10:47 PM
  3. Replies: 3
    Last Post: 03-09-2007, 04:30 PM
  4. Replies: 1
    Last Post: 03-09-2007, 04:03 PM
  5. Replies: 7
    Last Post: 01-24-2007, 06:44 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •