HTML Tutorial 10
Prepared by: Anthony Larrain
More on Images
Suppose you have an image file river2.jpg in the same directory as your html document with width 400 and height 152. Suppose the HTML file had the following code along with the text.
A river in the smokey mountain, taken summer 1985 Browser Display
A River in the Smokey Mountains, taken summer 1985.
- Notice the image is placed in the normal flow of the document and the text continues next to the image along the bottom of the image
- Can use the
alignattribute to adjust the text. - Values for the align attribute.
- Bottom (The default Alignment)
- Middle
- Top
Example 1
A river in the smokey mountain, taken summer 1985
A river in the smokey mountain, taken summer 1985
Browser Display
A river in the smokey mountain, taken summer 1985
A river in the smokey mountain, taken summer 1985
Floating an image
<div> tag along with the align attribute. Or use the center tag.HTML div tag
- The
divtag defines a division within a web page. - The
divtag allows individual sections of an HTML page to be styled. - Browsers usually place a line break before and after the div element.