HTML also contains elements for adding images to your website.
The formats most used for the images added in a HTML page are GIF and JPEG (JPG ; JPE), the advantage of GIF images is that are small in size (in bytes), having a maximum of 256 colors.
Other format types that can be used are:

Adding a image in a webpage

To add an image in a HTML document you must use the element <img> ... </img> together with the following attributes:

In the following example you can see how you can include an image in your web page and how to use these attributes:
<html>
<head>
<title>The title</title>
</head>
<body>
<img src="image.jpg" alt="here you can add any text" align="top" width="100" height="120" border="4" hspace="10" vspace="7"></img>
</body>
</html>
- The web page will appear like this:
you can add any text

Try more examples by yourself, using other attributes and values.

Daily Test with Code Example

HTML
CSS
JavaScript
PHP-MySQL
Which tag adds a new line into a paragraph?
<b> <br> <p>
First line ...<br>
Other line...
Which CSS property can be used to add space between letters?
text-size word-spacing letter-spacing
#id {
  letter-spacing: 2px;
}
What JavaScript function can be used to get access to HTML element with a specified ID?
getElementById() getElementsByTagName() createElement()
var elm = document.getElementById("theID");
var content = elm.innerHTML;
alert(content);
Click on the "echo" correct instruction.
echo "CoursesWeb.net" echo "CoursesWeb.net"; echo ""CoursesWeb.net";
echo "Address URL: http://CoursesWeb.net";
Adding images

Last accessed pages

  1. Qwop (72311)
  2. Chess 2d (1014)
  3. Doodle God 2 (874)
  4. Drag Racer V3 (31504)
  5. Check the file type before Upload (7087)

Popular pages this month

  1. Qwop (4992)
  2. Get Attribute (ID, Class, Name, Title, Src) with jQuery (3084)
  3. Get the value of the selected /checked checkboxes in a form (2379)
  4. Drag Racer V3 (1996)
  5. Flash Games - Free online Games (1612)