The colorful web pages I saw today are all because of the effects of images. Think about it, the web pages on the Internet are all plain text, which is very boring, and you will know the importance of images in web design. Images can be inserted in html pages. The commonly used image formats for web pages are jpeg and gif:
jpeg (joint photography experts group) is a file format designed specifically for photo images. jpeg supports millions of colors. jpeg is a quality lossy format, which means that some image data is lost during compression, which reduces the quality of the final file. However, the image data is discarded very little and there will be no very significant difference in quality.
Graphic exchange format gif is a very popular format in web images. While it includes only 256 colors, the gif provides excellent, almost no loss of image compression. And gifs can contain transparent areas and multiple animations. It compresses by scanning pixel rows horizontally to find a fixed color area, and then reduces the number of pixels in the same area. Therefore, gifs are usually suitable for cartoons, graphics, logos, graphics with transparent areas, animations, etc.
Inserting pictures into the page can beautify it. There is only one tag to insert the picture, that is the <img> tag. When inserting an image, it is not enough to just use the <img> tag, and it needs to be completed with other attributes, as shown in the following table.
By specifying the path of the image source file with the src attribute, the image insertion can be completed.
Specify the path through the src attribute, file_name is the path to insert the image.
Insert the image through the src attribute marked with <img>.
01 <!-- -------------------------------------------------------------------------------------------------------------------------
02 <!-- File example: 9-1.htm -->
03 <!-- File description: Insert picture-->
04 <!-- -------------------------------------------------------------------------------------------------------------------------
05 <html>
06 <head>
07 <title>Insert picture</title>
08 </head>
09 <body>
10 <h1>Mainstream web design software</h1>
11 <img src=9-1.jpg>
12 At present, web page technology has entered a new stage. Now web pages are no longer piled up pictures and boring text. People are now pursuing the dynamic effects and interactivity of web pages. Macromedia's web design three musketeer software dreamweaver, flash, and fireworks are outstanding representatives of interactive web design. Its latest version mx 2004 inherits the advantages of the previous version and further integrates functions, which is very suitable for the needs of web design and website construction. <p>
13 </body>
14 </html>
Line 11 inserts the image file in jpeg format.