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. Jail Break Rush (1128)
  2. Tommy Slingshot (701)
  3. Theme Hotel (2597)
  4. Stunt Dirt Bike (2090)
  5. JQZoom Image Magnifier (9305)

Popular pages this month

  1. Flash Games - Free online Games (1700)
  2. Qwop (1373)
  3. Courses Web: PHP-MySQL JavaScript Ajax HTML CSS Flash-AS3 (1219)
  4. Tunnel Rush (1170)
  5. Drag Racer V3 (881)