Lesson 1

Images/Graphics are very important in web designing. They express and enhance web experience. Inserting images are very easy. Tag for images is <img>. There are many attributes associated like alt, src, height and width. align, border, hspace and vspace are deprecated, means they cannot be used in html. You can only use them in CSS Style Sheet. Let me explain the one which can be used in HTML.

alt: Is used to tag a picture. When you move mouse pointer to a picture, some text show up under the pointer. alt does that.
src: The source of image where it is located either from inside or outside.
height: You can set height of the image.
width: You can also set width of the image.

Now look at this example below. Code to generate this is below the output.

The Beatles

The Beatles
The Beatles are rock's classic act, in the fullest sense of the term.
Their music has spoken not only to its own time, but also every generation since. They remain more widely known than any other band of the rock era, and maybe of any era. The group consisted of four Englishmen: George Harrison, John Lennon, Paul McCartney, and Ringo Starr. Starr was the drummer and the others usually played electric guitar. All of the Beatles sang occasionally. They became knows as the Beatles in 1960.


<h2>The Beatles</h2>
<img src="/uploads/2/8/4/5/2845297/4834879.jpg?600x448" alt="The Beatles" />
<h3>The Beatles are rock's classic act, in the fullest sense of the term.</h3>
<p>Their music has spoken not only to its own time, but also every generation since. 
They remain more widely known than any other band of the rock era, and maybe of any era. 
The group consisted of four Englishmen: George Harrison, John Lennon, Paul McCartney, and Ringo Starr. 
Starr was the drummer and the others usually played electric guitar. All of the Beatles sang occasionally. 
They became knows as the Beatles in 1960.</p>

The above code is self explanatory. You can use height and width attributes to specify the height and width of the picture or at the end of source file followed by ?width x height

Images  1  prev