This Forum has been archived there is no more new posts or threads ... use this link to report any abusive content
==> Report abusive content in this page <==
Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to insert an image in html using brackets?
05-22-2014, 10:00 AM
Post: #1
How to insert an image in html using brackets?
I am using the programme brackets as i am on a mac. I am trying to insert an image, i am teaching myself html off a tutorial online but the tutorial is using an older form of html is assume?
I have tried

<img src="twitter.jpg"> and it isn't showing anything when i save the doc and try to view it, what am i doing wrong?

Ads

Find all posts by this user
Quote this message in a reply
05-22-2014, 10:06 AM
Post: #2
 
Aren&#x27;t you supposed to have the &lt;&#x2F;img&gt; at the end? Or is that only for headers and body etc.?

Ads

Find all posts by this user
Quote this message in a reply
05-22-2014, 10:12 AM
Post: #3
 
Hello

The picture should be with the web page, and the part where it says .jpg in the html img tag must match the picture's file extension. The name twitter must be spelled the same way as the picture's file name.

You have to save the web page like .html
Find all posts by this user
Quote this message in a reply
05-22-2014, 10:24 AM
Post: #4
 
you need the full path to where the image is stored. If it's in the same folder as the html file then your code should work but lets say it's in a folder called 'images' and the images folder is in the same folder as the html file it would be
<img src="images/twitter.jpg" /> (note the forward slash before the closing '>'
You should aslo include the width and height of the image and an alt tag to describe it.

Assuming the twitter image is 20 pixels square your code would be
<img src="images/twitter.jpg" width="20" height="20" alt="Twitter Icon" />

You could also add a title tag and a class to the image if you wanted to
Find all posts by this user
Quote this message in a reply
05-22-2014, 10:40 AM
Post: #5
 
<img src="twitter\picturename.jpg">
try this way
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)