HTML - [5] Adding an image
Programming Stuff :: HTML :: HTML/XHTML
Page 1 of 1 • Share •
HTML - [5] Adding an image
HyperText Markup Language
HTML
[Adding an image]
To get an image on your website you should use the following code:
<img src="1">
Explaining: 1 - the link to the image; http://www.something.com/image.jpg
( if the image is in the same folder as the webpage its; image.jpg )
you can also use different files as jpg like; png,gif,bmp and so on.
code you should have now:
To trim the size of the image you need to add something to the code.
That's how to change the size of the image in pixels.
That's how to change the size of the image in %.
HTML
[Adding an image]
To get an image on your website you should use the following code:
<img src="1">
Explaining: 1 - the link to the image; http://www.something.com/image.jpg
( if the image is in the same folder as the webpage its; image.jpg )
you can also use different files as jpg like; png,gif,bmp and so on.
code you should have now:
- Code:
<html>
<head>
<title>My Website</title>
</head>
<body bgcolor="Green">
<h1>Welcome to my website!</h1><br>
<h3>This is the first website ive made</h3><br>
<br>
<h3>Greeting from me.</h3><br>
<a href="http://www.google.nl">go to google..</a><br>
<img src="http://www.google.nl/intl/nl_nl/images/logo.gif">
</body>
</html>
To trim the size of the image you need to add something to the code.
- Code:
<img src="http://www.google.nl/intl/nl_nl/images/logo.gif" height="200" width="150">
That's how to change the size of the image in pixels.
- Code:
<img src="http://www.google.nl/intl/nl_nl/images/logo.gif" height="80%" width="80%">
That's how to change the size of the image in %.

Robin- Moderator

- Number of posts: 11
Age: 18
Location: Holland
Registration date: 2008-08-31
Permissions of this forum:
You cannot reply to topics in this forum





