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:
<title>The title</title>
<img src="image.jpg" alt="here you can add any text" align="top" width="100" height="120" border="4" hspace="10" vspace="7"></img>
- 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

Which tag is used to add definition lists into a <dl> element?
<dt> <dd> <li>
  <dd> - Hyper Text Markup Language</dd>
  <dd> - Language for web pages</dd>
Which CSS property can hide an element on page, letting an empty space in its place?
display position visibility
#id {
  visibility: hidden;
Click on the event which is triggered when the mouse clicks on an object.
onclick onmouseover onfocus
document.getElementById("id").onclick = function(){
Indicate the PHP variable that contains the contents of both $_GET, $_POST, and $_COOKIE arrays.
if(isset($_REQUEST["id"])) {
  echo $_REQUEST["id"];
Adding images

Last accessed pages

  1. Ajax-PHP File Manager (3571)
  2. Area and Perimeter Calculator for 2D shapes (5794)
  3. Super Mario Crossover (506)
  4. Flash Games - Free online Games (13206)
  5. Courses Web: PHP-MySQL JavaScript Ajax HTML CSS Flash-AS3 (54372)

Popular pages this month

  1. Bubbles3 (3136)
  2. Butterfly Kyodai (2748)
  3. Zuma Deluxe (2025)
  4. Qwop (1252)
  5. Backgammon (1197)