HTML - [5] Adding an image

Post new topic   Reply to topic

View previous topic View next topic Go down

HTML - [5] Adding an image

Post  Robin on Mon Sep 01, 2008 10:08 pm

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:

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
Moderator

Number of posts: 11
Age: 18
Location: Holland
Registration date: 2008-08-31

View user profile

Back to top Go down

View previous topic View next topic Back to top


Post new topic   Reply to topic
Permissions of this forum:
You cannot reply to topics in this forum