HTML page layout, which extensions or image formats to choose - jpg, jpeg, png, gif, svg
When coding web pages on HTML often need to use tags, which assume the presence of an image. The path to such images is usually indicated in a special attribute. Before using images on the site, you need to prepare them, as well as decide which image extensions to use on the site .
There are many options for extensions, you should use only the most popular ones. It is important to remember that the extension is best written in lowercase (small) letters and, accordingly, also written in HTML code. Otherwise, the picture may not be displayed.
Consider the following extensions - jpg, jpeg, png, gif, svg :
- jpg and jpeg are essentially the same thing, just different names, but it's best to always write jpg . This extension is the most optimal option - a small size of output files, many website optimization services strongly recommend using this format, as the file size decreases, which means that the site loading speed increases. But the quality may not be very acceptable, then it is worth lowering the compression ratio or using a different format;
- png is a great option, this format was created just for the web. Image quality is acceptable, but file sizes can be large. If you need support for transparency, this is a format that is beyond competition;
- gif - should be used when it is necessary to make animation on the site. In other cases, it is recommended to use other formats;
- svg is a vector format, which means that the image is described by formulas, which allows you to get maximum quality even when scaling. Used for special needs.
Thus, the most popular image formats for the site were briefly reviewed. The most used image format in web development has been found to be jpg .
Latest articles
- 03.04.24IT / Уроки PHP Уроки простыми словами. Урок 3. Все операторы PHP с примерами, с выводом работы кода на экран.
- 02.04.24IT / Уроки PHP Уроки простыми словами. Урок 2. Типы данных в PHP с примерами.
- 02.04.24IT / Уроки PHP Уроки простыми словами. Урок 1. Коротко о языке веб-программирования PHP. Основы синтаксиса.
- 09.11.23IT / Database Errors when migrating from MySQL 5.6 to 5.7 and how to fix them - database dump import failed with an error or INSERT does not work. Disabling STRICT_TRANS_TABLES strict mode or using IGNORE
- 08.07.22IT / Misc Convert office files DOC, DOCX, DOCM, RTF to DOCX, DOCM, DOC, RTF, PDF, HTML, XML, TXT formats without loss and markup changes