Key Points
Valid graphics formats for Web use are GIF, PNG, and JPG.
When possible, use graphics files that are as close as possible in resolution to the size at which they will be displayed on the Web page. Use a photo-editing program to change the resolution.
Use the <img /> tag to insert an image. The
src=argument specifies the image file name. Like other one-sided tags, the <img /> tag must end with a space and slash ( /) to be valid in XHTML.To refer to a graphic in a subfolder, precede the name with the subfolder name and a slash (/).
To allow a graphic to float to the left or right of the text, use a
style="float: left"orstyle="float: right"argument within the <img> tag.To force text to be positioned below an image, add
style="clear: left" ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access