{"id":38065,"date":"2017-09-18T23:01:18","date_gmt":"2017-09-18T15:01:18","guid":{"rendered":"https:\/\/www.hongkiat.com\/blog\/?p=38065"},"modified":"2025-04-04T02:49:45","modified_gmt":"2025-04-03T18:49:45","slug":"img-css-properties","status":"publish","type":"post","link":"https:\/\/www.hongkiat.com\/blog\/img-css-properties\/","title":{"rendered":"5 &lt;IMG&gt; CSS Properties You Should Know"},"content":{"rendered":"<p>There are CSS properties, such as background images, <a href=\"https:\/\/www.hongkiat.com\/blog\/css-gradient-border\/\">border images<\/a>, <a href=\"https:\/\/www.hongkiat.com\/blog\/css-mask-switch\/\">masking<\/a>, and <a href=\"https:\/\/www.hongkiat.com\/blog\/css-masking\/\">clipping<\/a> properties, with which you can <strong>directly add images<\/strong> to web pages and control their behavior. However, there are also less frequently mentioned image-related CSS properties that <strong>work on images added with the <code>&lt;img&gt;<\/code> HTML tag<\/strong>, which the preferred way of adding images to web pages.<\/p>\n<p>The job description of these latter properties varies from <strong>controlling the image shadow<\/strong> to <strong>setting the sharpness<\/strong>, helping us better control the appearance and the position of images added with the <code>&lt;img&gt;<\/code> tag. Let\u2019s see them one by one.<\/p>\n<p class=\"note\"><strong>Read Also:<\/strong> <a target=\"_blank\" href=\"https:\/\/www.hongkiat.com\/blog\/grayscale-image-web\/\" rel=\"noopener\">3 Ways to Turn Web Images to Grayscale<\/a><\/p>\n<h2>1. Sharpen images with <code>image-rendering<\/code><\/h2>\n<p>When an image is upscaled, the browser <strong>smoothens the image<\/strong>, so it doesn\u2019t look pixelated. But, depending on the resolution of the image and screen, this might not be the best at all times. You can control this browser behavior with the <strong><a target=\"_blank\" href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/CSS\/image-rendering\" rel=\"noopener\"><code>image-rendering<\/code><\/a> property<\/strong>.<\/p>\n<p>This <a target=\"_blank\" href=\"https:\/\/caniuse.com\/css-crisp-edges\" rel=\"noopener\">well-supported<\/a> property <strong>controls the algorithm used to scale an image<\/strong>. Its two main values are <strong><code>crisp-edges<\/code><\/strong> and <strong><code>pixelated<\/code><\/strong>.<\/p>\n<p>The <code>crisp-edges<\/code> value <strong>maintains the color contrast between pixels<\/strong>. In other words, no  smoothening is done to images, which <strong>great for pixel artwork<\/strong>.<\/p>\n<p>When <code>pixelated<\/code> is used, the nearby pixels of a pixel might <strong>take up its appearance<\/strong>, making it seem like together they <strong>form one big pixel<\/strong>, great for high-resolution screens.<\/p>\n<p>If you keep looking closely at the flower edges in the GIF below, you can see the difference between a regular and a <code>pixelated<\/code> image.<\/p>\n<pre>\r\nimg {\r\n  image-rendering: pixelated;\r\n}\r\n<\/pre>\n<figure><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/assets.hongkiat.com\/uploads\/img-css-properties\/image-rendering.gif\" alt=\"Image rendering\" width=\"640\" height=\"359\"><\/figure>\n<h2>2. Stretch images with <code>object-fit<\/code><\/h2>\n<p>The <code>contain<\/code>, <code>cover<\/code>, <code>fill<\/code> values are all familiar, we use them for the <code>background-size<\/code> property that controls how a background image fills up the element it belongs to. The <strong><a target=\"_blank\" href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/CSS\/object-fit\" rel=\"noopener\"><code>object-fit<\/code><\/a><\/strong> property is quite similar to it, as it also determines <strong>how an image sizes inside its container<\/strong>.<\/p>\n<p>The <code>contain<\/code> value <strong>contains the image within its container<\/strong>. <code>cover<\/code> does the same, but if the aspect ratio of the image and the container doesn\u2019t match, the <strong>image is clipped<\/strong>. <code>fill<\/code> causes the image to <strong>stretch and fill its container<\/strong>.  <code>scale-down<\/code> <strong>chooses the smallest version of the image<\/strong> to display.<\/p>\n<pre>\r\n&lt;div id='container'&gt;\r\n  &lt;img src=\"rose.png' alt=\"rose flower'&gt;\r\n&lt;\/div&gt;\r\n<\/pre>\n<pre>\r\n#container {\r\n  width: 300px;\r\n  height: 300px;\r\n}\r\nimg {\r\n  width: 100%;\r\n  height: 100%;\r\n  object-fit: contain;\r\n}\r\n<\/pre>\n<figure><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/assets.hongkiat.com\/uploads\/img-css-properties\/object-fit.gif\" alt=\"Object fit\" width=\"500\" height=\"498\"><\/figure>\n<h2>3. Shift images with <code>object-position<\/code><\/h2>\n<p>Similarly to the complementing <code>background-position<\/code> property of <code>background-size<\/code>, there\u2019s an <strong><a target=\"_blank\" href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/CSS\/object-position\" rel=\"noopener\"><code>object-position<\/code><\/a><\/strong> property for <code>object-fit<\/code>, too.<\/p>\n<p>The <code>object-fit<\/code> property <strong>moves an image<\/strong> inside an image container <strong>to the given coordinates<\/strong>. The coordinates can be defined as <strong>absolute length units<\/strong>, <strong>relative length units<\/strong>, <strong>keywords<\/strong> (<code>top<\/code>, <code>left<\/code>, <code>center<\/code>, <code>bottom<\/code>, and <code>right<\/code>), or a <strong>valid combination of them<\/strong>\n(<code>top 20px right 5px<\/code>, <code>center right 80px<\/code>).<\/p>\n<pre>\r\n&lt;div id='container'&gt;\r\n  &lt;img src=\"rose.png' alt=\"rose flower'&gt;\r\n&lt;\/div&gt;\r\n<\/pre>\n<pre>\r\n#container {\r\n  width: 300px;\r\n  height: 300px;\r\n}\r\nimg {\r\n  width: 100%;\r\n  height: 100%;\r\n  object-position: 150px 0;\r\n}\r\n<\/pre>\n<figure><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/assets.hongkiat.com\/uploads\/img-css-properties\/object-position.jpg\" alt=\"Object position\" width=\"476\" height=\"541\"><\/figure>\n<h2>4. Situate images with <code>vertical-align<\/code><\/h2>\n<p>We sometimes add <code>&lt;img&gt;<\/code> (which are inline by nature) next to text strings <strong>for added information or decoration<\/strong>. In that case, <strong>aligning the text and the image<\/strong> into the desired position can be a tad bit tricky\u2014if you don\u2019t know which property to use.<\/p>\n<p>The <strong><a target=\"_blank\" href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/CSS\/vertical-align\" rel=\"noopener\"><code>vertical-align<\/code><\/a><\/strong> property is <strong>not exclusive to table cells alone<\/strong>.  It  can also align an inline element inside an inline box, and thus can be used to <strong>align an image in a line of text<\/strong>. It takes a fair number of <a target=\"_blank\" href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/CSS\/vertical-align#Syntax\" rel=\"noopener\">values<\/a> that can be applied to an inline element, so you have many options to choose from.<\/p>\n<pre>\r\n&lt;p&gt;\r\nPDF &lt;img width=\"15\" src=\"pdf.png\"\r\nstyle=\"vertical-align:text-top\" alt=\"Image\"&gt;\r\n&lt;\/p&gt;\r\n<\/pre>\n<figure><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/assets.hongkiat.com\/uploads\/img-css-properties\/vertical-align.jpg\" alt=\"Vertical align\" width=\"686\" height=\"552\"><\/figure>\n<h2>5. Shadow images with <code>filter: drop-shadow()<\/code><\/h2>\n<p>When used inconspicuously in texts and boxes, shadows can add life to a web page. The same is true for in images. <strong>Images with core shapes and transparent backgrounds<\/strong> can benefit from the <strong><a target=\"_blank\" href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/CSS\/filter#drop-shadow()_2)\" rel=\"noopener\"><code>drop-shadow<\/code><\/a><\/strong> CSS filter.<\/p>\n<p>Its arguments are <strong>similar to the values of the shadow-related CSS properties<\/strong> (<a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/CSS\/text-shadow\" target=\"_blank\" rel=\"noopener\"><code>text-shadow<\/code><\/a>, <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/CSS\/box-shadow\" target=\"_blank\" rel=\"noopener\"><code>box-shadow<\/code><\/a>). The first two represent the <strong>vertical and horizontal distance<\/strong> between the shadows and the image, the third and fourth are the <strong>blur<\/strong> and the <strong>spread radius of the shadow<\/strong>, and the last one is the <strong>shadow color<\/strong>.<\/p>\n<p>Just like <code>text-shadow<\/code>, <code>drop-shadow<\/code> also  creates a shadow that is <strong>molded to the belonging object<\/strong>. So, when it\u2019s applied to an image, the shadow takes the shape of the visible portion of the image.<\/p>\n<pre>\r\nimg {\r\n  filter: drop-shadow(0 0 5px blue);\r\n}\r\n<\/pre>\n<figure><img decoding=\"async\" src=\"https:\/\/assets.hongkiat.com\/uploads\/img-css-properties\/drop-shadow.jpg\" alt=\"Drop shadow filter\" width='508\" height=\"565\"><\/figure>\n<p class=\"note\"><strong>Read Also:<\/strong> <a target=\"_blank\" href=\"https:\/\/www.hongkiat.com\/blog\/css-reflection\/\" rel=\"noopener\">CSS3 Image Reflection [CSS3 Tips]<\/a><\/p>\n<\/body>\n        <\/html>'><\/figure>","protected":false},"excerpt":{"rendered":"<p>There are CSS properties, such as background images, border images, masking, and clipping properties, with which you can directly add images to web pages and control their behavior. However, there are also less frequently mentioned image-related CSS properties that work on images added with the &lt;img&gt; HTML tag, which the preferred way of adding images&hellip;<\/p>\n","protected":false},"author":145,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[3392],"tags":[507,4501],"topic":[4520],"class_list":["entry-content","is-maxi"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v22.8 (Yoast SEO v27.4) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>5 CSS Properties You Should Know<\/title>\n<meta name=\"description\" content=\"There are CSS properties, such as background images, border images, masking, and clipping properties, with which you can directly add images to web pages\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.hongkiat.com\/blog\/img-css-properties\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"5 &lt;IMG&gt; CSS Properties You Should Know\" \/>\n<meta property=\"og:description\" content=\"There are CSS properties, such as background images, border images, masking, and clipping properties, with which you can directly add images to web pages\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.hongkiat.com\/blog\/img-css-properties\/\" \/>\n<meta property=\"og:site_name\" content=\"Hongkiat\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/hongkiatcom\" \/>\n<meta property=\"article:published_time\" content=\"2017-09-18T15:01:18+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-04-03T18:49:45+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/assets.hongkiat.com\/uploads\/img-css-properties\/image-rendering.gif\" \/>\n<meta name=\"author\" content=\"Preethi Ranjit\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@hongkiat\" \/>\n<meta name=\"twitter:site\" content=\"@hongkiat\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Preethi Ranjit\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/img-css-properties\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/img-css-properties\\\/\"},\"author\":{\"name\":\"Preethi Ranjit\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/person\\\/e981676afae36d1ff5feb75094950ab3\"},\"headline\":\"5 &lt;IMG&gt; CSS Properties You Should Know\",\"datePublished\":\"2017-09-18T15:01:18+00:00\",\"dateModified\":\"2025-04-03T18:49:45+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/img-css-properties\\\/\"},\"wordCount\":611,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/img-css-properties\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/assets.hongkiat.com\\\/uploads\\\/img-css-properties\\\/image-rendering.gif\",\"keywords\":[\"CSS\",\"CSS Tutorials\"],\"articleSection\":[\"Coding\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/img-css-properties\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/img-css-properties\\\/\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/img-css-properties\\\/\",\"name\":\"5 CSS Properties You Should Know\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/img-css-properties\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/img-css-properties\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/assets.hongkiat.com\\\/uploads\\\/img-css-properties\\\/image-rendering.gif\",\"datePublished\":\"2017-09-18T15:01:18+00:00\",\"dateModified\":\"2025-04-03T18:49:45+00:00\",\"description\":\"There are CSS properties, such as background images, border images, masking, and clipping properties, with which you can directly add images to web pages\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/img-css-properties\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/img-css-properties\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/img-css-properties\\\/#primaryimage\",\"url\":\"https:\\\/\\\/assets.hongkiat.com\\\/uploads\\\/img-css-properties\\\/image-rendering.gif\",\"contentUrl\":\"https:\\\/\\\/assets.hongkiat.com\\\/uploads\\\/img-css-properties\\\/image-rendering.gif\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/img-css-properties\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"5 &lt;IMG&gt; CSS Properties You Should Know\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/\",\"name\":\"Hongkiat\",\"description\":\"Tech and Design Tips\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#organization\",\"name\":\"Hongkiat.com\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/wp-content\\\/uploads\\\/hkdc-logo-rect-yoast.jpg\",\"contentUrl\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/wp-content\\\/uploads\\\/hkdc-logo-rect-yoast.jpg\",\"width\":1200,\"height\":799,\"caption\":\"Hongkiat.com\"},\"image\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/hongkiatcom\",\"https:\\\/\\\/x.com\\\/hongkiat\",\"https:\\\/\\\/www.pinterest.com\\\/hongkiat\\\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/person\\\/e981676afae36d1ff5feb75094950ab3\",\"name\":\"Preethi Ranjit\",\"description\":\"A .NET developer with a JavaScript background, Preethi is expert in front-end coding, JavaScript, HTML, and CSS.\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/author\\\/preethi\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"5 CSS Properties You Should Know","description":"There are CSS properties, such as background images, border images, masking, and clipping properties, with which you can directly add images to web pages","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.hongkiat.com\/blog\/img-css-properties\/","og_locale":"en_US","og_type":"article","og_title":"5 &lt;IMG&gt; CSS Properties You Should Know","og_description":"There are CSS properties, such as background images, border images, masking, and clipping properties, with which you can directly add images to web pages","og_url":"https:\/\/www.hongkiat.com\/blog\/img-css-properties\/","og_site_name":"Hongkiat","article_publisher":"https:\/\/www.facebook.com\/hongkiatcom","article_published_time":"2017-09-18T15:01:18+00:00","article_modified_time":"2025-04-03T18:49:45+00:00","og_image":[{"url":"https:\/\/assets.hongkiat.com\/uploads\/img-css-properties\/image-rendering.gif","type":"","width":"","height":""}],"author":"Preethi Ranjit","twitter_card":"summary_large_image","twitter_creator":"@hongkiat","twitter_site":"@hongkiat","twitter_misc":{"Written by":"Preethi Ranjit","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.hongkiat.com\/blog\/img-css-properties\/#article","isPartOf":{"@id":"https:\/\/www.hongkiat.com\/blog\/img-css-properties\/"},"author":{"name":"Preethi Ranjit","@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/person\/e981676afae36d1ff5feb75094950ab3"},"headline":"5 &lt;IMG&gt; CSS Properties You Should Know","datePublished":"2017-09-18T15:01:18+00:00","dateModified":"2025-04-03T18:49:45+00:00","mainEntityOfPage":{"@id":"https:\/\/www.hongkiat.com\/blog\/img-css-properties\/"},"wordCount":611,"commentCount":0,"publisher":{"@id":"https:\/\/www.hongkiat.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.hongkiat.com\/blog\/img-css-properties\/#primaryimage"},"thumbnailUrl":"https:\/\/assets.hongkiat.com\/uploads\/img-css-properties\/image-rendering.gif","keywords":["CSS","CSS Tutorials"],"articleSection":["Coding"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.hongkiat.com\/blog\/img-css-properties\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.hongkiat.com\/blog\/img-css-properties\/","url":"https:\/\/www.hongkiat.com\/blog\/img-css-properties\/","name":"5 CSS Properties You Should Know","isPartOf":{"@id":"https:\/\/www.hongkiat.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.hongkiat.com\/blog\/img-css-properties\/#primaryimage"},"image":{"@id":"https:\/\/www.hongkiat.com\/blog\/img-css-properties\/#primaryimage"},"thumbnailUrl":"https:\/\/assets.hongkiat.com\/uploads\/img-css-properties\/image-rendering.gif","datePublished":"2017-09-18T15:01:18+00:00","dateModified":"2025-04-03T18:49:45+00:00","description":"There are CSS properties, such as background images, border images, masking, and clipping properties, with which you can directly add images to web pages","breadcrumb":{"@id":"https:\/\/www.hongkiat.com\/blog\/img-css-properties\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.hongkiat.com\/blog\/img-css-properties\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.hongkiat.com\/blog\/img-css-properties\/#primaryimage","url":"https:\/\/assets.hongkiat.com\/uploads\/img-css-properties\/image-rendering.gif","contentUrl":"https:\/\/assets.hongkiat.com\/uploads\/img-css-properties\/image-rendering.gif"},{"@type":"BreadcrumbList","@id":"https:\/\/www.hongkiat.com\/blog\/img-css-properties\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.hongkiat.com\/blog\/"},{"@type":"ListItem","position":2,"name":"5 &lt;IMG&gt; CSS Properties You Should Know"}]},{"@type":"WebSite","@id":"https:\/\/www.hongkiat.com\/blog\/#website","url":"https:\/\/www.hongkiat.com\/blog\/","name":"Hongkiat","description":"Tech and Design Tips","publisher":{"@id":"https:\/\/www.hongkiat.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.hongkiat.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.hongkiat.com\/blog\/#organization","name":"Hongkiat.com","url":"https:\/\/www.hongkiat.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.hongkiat.com\/blog\/wp-content\/uploads\/hkdc-logo-rect-yoast.jpg","contentUrl":"https:\/\/www.hongkiat.com\/blog\/wp-content\/uploads\/hkdc-logo-rect-yoast.jpg","width":1200,"height":799,"caption":"Hongkiat.com"},"image":{"@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/hongkiatcom","https:\/\/x.com\/hongkiat","https:\/\/www.pinterest.com\/hongkiat\/"]},{"@type":"Person","@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/person\/e981676afae36d1ff5feb75094950ab3","name":"Preethi Ranjit","description":"A .NET developer with a JavaScript background, Preethi is expert in front-end coding, JavaScript, HTML, and CSS.","url":"https:\/\/www.hongkiat.com\/blog\/author\/preethi\/"}]}},"jetpack_featured_media_url":"https:\/\/","jetpack_shortlink":"https:\/\/wp.me\/p4uxU-9TX","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts\/38065","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/users\/145"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/comments?post=38065"}],"version-history":[{"count":3,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts\/38065\/revisions"}],"predecessor-version":[{"id":73736,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts\/38065\/revisions\/73736"}],"wp:attachment":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/media?parent=38065"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/categories?post=38065"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/tags?post=38065"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/topic?post=38065"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}