{"id":72518,"date":"2024-08-08T21:00:50","date_gmt":"2024-08-08T13:00:50","guid":{"rendered":"https:\/\/www.hongkiat.com\/blog\/?p=72518"},"modified":"2024-10-29T19:56:51","modified_gmt":"2024-10-29T11:56:51","slug":"native-css-masonry-grid","status":"publish","type":"post","link":"https:\/\/www.hongkiat.com\/blog\/native-css-masonry-grid\/","title":{"rendered":"Native CSS Masonry Grid"},"content":{"rendered":"<p>One popular layout style on the web is the <strong><em>masonry<\/em><\/strong> layout, often used in image galleries and portfolio websites to display images or items of varying sizes.<\/p>\n<p>Traditionally, creating a <em>masonry<\/em> layout required JavaScript libraries, such as the popular <a href=\"https:\/\/masonry.desandro.com\">Masonry.js by DeSandro<\/a> and <a href=\"https:\/\/spope.github.io\/MiniMasonry.js\/\">MiniMasonry<\/a>. However, with <a href=\"https:\/\/www.hongkiat.com\/blog\/css-grid-layout-module\/\">CSS Grid<\/a>, you can now create this layout <strong>using pure CSS<\/strong>.<\/p>\n<p>In this article, we will explore what a CSS Grid masonry layout is and provide some examples to help you understand how it works. Let\u2019s get started.<\/p>\n<hr>\n<h2>Getting Started<\/h2>\n<p><strong>CSS Grid<\/strong> is a native CSS layout system that provides a grid-based framework where you can define rows and columns and place items within this grid. The masonry layout can be created by combining CSS Grid with certain properties that allow items to span multiple rows or columns, creating the masonry effect. Let\u2019s start with a simple example to understand the basics of creating a masonry layout using CSS Grid.<\/p>\n<p>First, we have the HTML. We have a container with eight items. Each item has a different height and width so that we can see the masonry effect more clearly.<\/p>\n<pre>\r\n&lt;div class=\"masonry\"&gt;\r\n    &lt;div class=\"gallery\"&gt;\r\n        &lt;figure&gt;\r\n            &lt;img src=\"images\/image-1.jpg\" width=\"600\" height=\"1200\" \/&gt;\r\n        &lt;\/figure&gt;\r\n    &lt;\/div&gt;\r\n    &lt;div class=\"gallery\"&gt;\r\n        &lt;figure&gt;\r\n            &lt;img src=\"images\/image-2.jpg\" width=\"400\" height=\"200\" \/&gt;\r\n        &lt;\/figure&gt;\r\n    &lt;\/div&gt;\r\n    \/\/ 6 more items...\r\n&lt;\/div&gt;\r\n<\/pre>\n<p>And, the CSS, as follows:<\/p>\n<pre>\r\n.masonry {\r\n    display: grid;\r\n    grid-template-columns: repeat(6, 1fr);\r\n    grid-template-rows: masonry;\r\n    gap: 10px;\r\n}\r\n\/\/ More stylistic styles...\r\n<\/pre>\n<p>The <code>grid-template-columns<\/code> property defines six equal columns, the <code>gap<\/code> property adds space between the grid items, and the <code>grid-template-rows: masonry;<\/code> property creates the masonry layout based on the available space within the grid container.<\/p>\n<figure><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/assets.hongkiat.com\/uploads\/native-css-masonry-grid\/masonry-layout-default.jpg\" width=\"750\" height=\"800\" alt=\"Default masonry layout\"><\/figure>\n<p>You can adjust the layout behavior using the <code>masonry-auto-flow<\/code> property. When set to <code>next<\/code>, this property displays items in order along the grid axis instead of placing them in the track with the most free space. As shown below, the items are placed in order from left to right, top to bottom, regardless of the available space.<\/p>\n<figure><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/assets.hongkiat.com\/uploads\/native-css-masonry-grid\/masonry-layout-next.jpg\" width=\"750\" height=\"1198\" alt=\"Masonry layout with next auto-flow\"><\/figure>\n<hr>\n<h2>Making It Responsive<\/h2>\n<p>One of the advantages of using CSS Grid is that it allows you to create responsive layouts with ease. You can use media queries to adjust the grid layout based on the screen size. For example, you can change the number of columns in the grid based on the screen width to ensure that the layout looks good on different devices.<\/p>\n<pre>\r\n@media (max-width: 1200px) {\r\n    .masonry {\r\n        grid-template-columns: repeat(4, 1fr);\r\n    }\r\n}\r\n@media (max-width: 640px) {\r\n    .masonry {\r\n        grid-template-columns: repeat(2, 1fr);\r\n    }\r\n}\r\n<\/pre>\n<p>You can also change the <code>repeat()<\/code> value to use <code>auto-fill<\/code> and <code>minmax()<\/code> functions to create a responsive layout that automatically adjusts the number of columns based on the available space. The <code>minmax()<\/code> function allows you to set a minimum and maximum size for the columns, ensuring that they don\u2019t get too small or too large.<\/p>\n<pre>\r\n.masonry {\r\n    display: grid;\r\n    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));\r\n    grid-template-rows: masonry;\r\n    gap: 10px;\r\n}\r\n<\/pre>\n<p>That\u2019s it! You now have a responsive masonry layout that adjusts based on the screen size. You can experiment with different values for the <code>minmax()<\/code> function and the <code>gap<\/code> property to achieve the desired layout for your project.<\/p>\n<hr>\n<h2>Browser Support<\/h2>\n<p>It\u2019s important to note that CSS Grid with the masonry layout is still in the experimental stage and not yet supported in mainstream browsers.<\/p>\n<table>\n<thead>\n<tr>\n<th>Browser<\/th>\n<th>Version<\/th>\n<th>Support<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Google Chrome<\/td>\n<td>Not supported<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>Firefox<\/td>\n<td>77-131<\/td>\n<td>Experimental. Can be enabled from config.<\/td>\n<\/tr>\n<tr>\n<td>Safari<\/td>\n<td>Technology Preview<\/td>\n<td>Supported<\/td>\n<\/tr>\n<tr>\n<td>Microsoft Edge<\/td>\n<td>Not supported<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>Opera<\/td>\n<td>Not supported<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>Safari on iOS<\/td>\n<td>Technology Preview<\/td>\n<td>Supported<\/td>\n<\/tr>\n<tr>\n<td>Android WebView<\/td>\n<td>Not supported<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>Samsung Internet<\/td>\n<td>Not supported<\/td>\n<td><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>As shown in the table, you can view the masonry layout in the <a href=\"https:\/\/developer.apple.com\/safari\/technology-preview\/\">Safari Technology Preview<\/a> or Firefox.<\/p>\n<p>If you\u2019re using Firefox, type <code>about:config<\/code> in the address bar, search for the configuration name, and set it to <code>true<\/code>. The update will take effect immediately, so you can refresh the page without needing to restart the browser.<\/p>\n<figure><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/assets.hongkiat.com\/uploads\/native-css-masonry-grid\/firefox-about-config.jpg\" alt=\"Firefox about config screen\" width=\"750\" height=\"480\"><\/figure>\n<p>The status of browser support may change, so it\u2019s a good idea to check the latest updates from the respective browser documentation or support pages.<\/p>\n<hr>\n<h2>Wrapping Up<\/h2>\n<p>The CSS Grid masonry layout is a powerful tool that allows you to create complex grid-based layouts with ease. By combining CSS Grid with media queries and other CSS properties, you can create responsive masonry layouts that look great on all devices. While the masonry layout is still in the experimental stage, it is worth experimenting with to see how it can benefit your projects.<\/p>\n<p>Last but not least, here\u2019s a CodePen demo for you to try out. Enjoy!<\/p>\n<p class=\"codepen\" data-height=\"480\" data-theme-id=\"light\" data-default-tab=\"result\" data-slug-hash=\"RwzpEVB\" data-pen-title=\"CSS Grid Masonry\" data-user=\"hkdc\" style=\"height: 480px; box-sizing: border-box; display: flex; align-items: center; justify-content: center; border: 2px solid; margin: 1em 0; padding: 1em;\"><span>See the Pen <a href=\"https:\/\/codepen.io\/hkdc\/pen\/RwzpEVB\" rel=\"nofollow\">CSS Grid Masonry<\/a> by HONGKIAT (<a href=\"https:\/\/codepen.io\/hkdc\" rel=\"nofollow\">@hkdc<\/a>) on <a href=\"https:\/\/codepen.io\" rel=\"nofollow\">CodePen<\/a>.<\/span><\/p>\n<p><script async src=\"https:\/\/cpwebassets.codepen.io\/assets\/embed\/ei.js\"><\/script><\/p>","protected":false},"excerpt":{"rendered":"<p>One popular layout style on the web is the masonry layout, often used in image galleries and portfolio websites to display images or items of varying sizes. Traditionally, creating a masonry layout required JavaScript libraries, such as the popular Masonry.js by DeSandro and MiniMasonry. However, with CSS Grid, you can now create this layout using&hellip;<\/p>\n","protected":false},"author":113,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[3392],"tags":[507],"topic":[],"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>Native CSS Masonry Grid - Hongkiat<\/title>\n<meta name=\"description\" content=\"One popular layout style on the web is the masonry layout, often used in image galleries and portfolio websites to display images or items of varying\" \/>\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\/native-css-masonry-grid\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Native CSS Masonry Grid\" \/>\n<meta property=\"og:description\" content=\"One popular layout style on the web is the masonry layout, often used in image galleries and portfolio websites to display images or items of varying\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.hongkiat.com\/blog\/native-css-masonry-grid\/\" \/>\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=\"2024-08-08T13:00:50+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-10-29T11:56:51+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/assets.hongkiat.com\/uploads\/native-css-masonry-grid\/masonry-layout-default.jpg\" \/>\n<meta name=\"author\" content=\"Thoriq Firdaus\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@tfirdaus\" \/>\n<meta name=\"twitter:site\" content=\"@hongkiat\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Thoriq Firdaus\" \/>\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\\\/native-css-masonry-grid\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/native-css-masonry-grid\\\/\"},\"author\":{\"name\":\"Thoriq Firdaus\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/person\\\/e7948c7a175d211496331e4b6ce55807\"},\"headline\":\"Native CSS Masonry Grid\",\"datePublished\":\"2024-08-08T13:00:50+00:00\",\"dateModified\":\"2024-10-29T11:56:51+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/native-css-masonry-grid\\\/\"},\"wordCount\":669,\"publisher\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/native-css-masonry-grid\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/assets.hongkiat.com\\\/uploads\\\/native-css-masonry-grid\\\/masonry-layout-default.jpg\",\"keywords\":[\"CSS\"],\"articleSection\":[\"Coding\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/native-css-masonry-grid\\\/\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/native-css-masonry-grid\\\/\",\"name\":\"Native CSS Masonry Grid - Hongkiat\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/native-css-masonry-grid\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/native-css-masonry-grid\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/assets.hongkiat.com\\\/uploads\\\/native-css-masonry-grid\\\/masonry-layout-default.jpg\",\"datePublished\":\"2024-08-08T13:00:50+00:00\",\"dateModified\":\"2024-10-29T11:56:51+00:00\",\"description\":\"One popular layout style on the web is the masonry layout, often used in image galleries and portfolio websites to display images or items of varying\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/native-css-masonry-grid\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/native-css-masonry-grid\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/native-css-masonry-grid\\\/#primaryimage\",\"url\":\"https:\\\/\\\/assets.hongkiat.com\\\/uploads\\\/native-css-masonry-grid\\\/masonry-layout-default.jpg\",\"contentUrl\":\"https:\\\/\\\/assets.hongkiat.com\\\/uploads\\\/native-css-masonry-grid\\\/masonry-layout-default.jpg\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/native-css-masonry-grid\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Native CSS Masonry Grid\"}]},{\"@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\\\/e7948c7a175d211496331e4b6ce55807\",\"name\":\"Thoriq Firdaus\",\"description\":\"Thoriq is a writer for Hongkiat.com with a passion for web design and development. He is the author of Responsive Web Design by Examples, where he covered his best approaches in developing responsive websites quickly with a framework.\",\"sameAs\":[\"https:\\\/\\\/thoriq.com\",\"https:\\\/\\\/x.com\\\/tfirdaus\"],\"jobTitle\":\"Web Developer\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/author\\\/thoriq\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Native CSS Masonry Grid - Hongkiat","description":"One popular layout style on the web is the masonry layout, often used in image galleries and portfolio websites to display images or items of varying","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\/native-css-masonry-grid\/","og_locale":"en_US","og_type":"article","og_title":"Native CSS Masonry Grid","og_description":"One popular layout style on the web is the masonry layout, often used in image galleries and portfolio websites to display images or items of varying","og_url":"https:\/\/www.hongkiat.com\/blog\/native-css-masonry-grid\/","og_site_name":"Hongkiat","article_publisher":"https:\/\/www.facebook.com\/hongkiatcom","article_published_time":"2024-08-08T13:00:50+00:00","article_modified_time":"2024-10-29T11:56:51+00:00","og_image":[{"url":"https:\/\/assets.hongkiat.com\/uploads\/native-css-masonry-grid\/masonry-layout-default.jpg","type":"","width":"","height":""}],"author":"Thoriq Firdaus","twitter_card":"summary_large_image","twitter_creator":"@tfirdaus","twitter_site":"@hongkiat","twitter_misc":{"Written by":"Thoriq Firdaus","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.hongkiat.com\/blog\/native-css-masonry-grid\/#article","isPartOf":{"@id":"https:\/\/www.hongkiat.com\/blog\/native-css-masonry-grid\/"},"author":{"name":"Thoriq Firdaus","@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/person\/e7948c7a175d211496331e4b6ce55807"},"headline":"Native CSS Masonry Grid","datePublished":"2024-08-08T13:00:50+00:00","dateModified":"2024-10-29T11:56:51+00:00","mainEntityOfPage":{"@id":"https:\/\/www.hongkiat.com\/blog\/native-css-masonry-grid\/"},"wordCount":669,"publisher":{"@id":"https:\/\/www.hongkiat.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.hongkiat.com\/blog\/native-css-masonry-grid\/#primaryimage"},"thumbnailUrl":"https:\/\/assets.hongkiat.com\/uploads\/native-css-masonry-grid\/masonry-layout-default.jpg","keywords":["CSS"],"articleSection":["Coding"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.hongkiat.com\/blog\/native-css-masonry-grid\/","url":"https:\/\/www.hongkiat.com\/blog\/native-css-masonry-grid\/","name":"Native CSS Masonry Grid - Hongkiat","isPartOf":{"@id":"https:\/\/www.hongkiat.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.hongkiat.com\/blog\/native-css-masonry-grid\/#primaryimage"},"image":{"@id":"https:\/\/www.hongkiat.com\/blog\/native-css-masonry-grid\/#primaryimage"},"thumbnailUrl":"https:\/\/assets.hongkiat.com\/uploads\/native-css-masonry-grid\/masonry-layout-default.jpg","datePublished":"2024-08-08T13:00:50+00:00","dateModified":"2024-10-29T11:56:51+00:00","description":"One popular layout style on the web is the masonry layout, often used in image galleries and portfolio websites to display images or items of varying","breadcrumb":{"@id":"https:\/\/www.hongkiat.com\/blog\/native-css-masonry-grid\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.hongkiat.com\/blog\/native-css-masonry-grid\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.hongkiat.com\/blog\/native-css-masonry-grid\/#primaryimage","url":"https:\/\/assets.hongkiat.com\/uploads\/native-css-masonry-grid\/masonry-layout-default.jpg","contentUrl":"https:\/\/assets.hongkiat.com\/uploads\/native-css-masonry-grid\/masonry-layout-default.jpg"},{"@type":"BreadcrumbList","@id":"https:\/\/www.hongkiat.com\/blog\/native-css-masonry-grid\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.hongkiat.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Native CSS Masonry Grid"}]},{"@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\/e7948c7a175d211496331e4b6ce55807","name":"Thoriq Firdaus","description":"Thoriq is a writer for Hongkiat.com with a passion for web design and development. He is the author of Responsive Web Design by Examples, where he covered his best approaches in developing responsive websites quickly with a framework.","sameAs":["https:\/\/thoriq.com","https:\/\/x.com\/tfirdaus"],"jobTitle":"Web Developer","url":"https:\/\/www.hongkiat.com\/blog\/author\/thoriq\/"}]}},"jetpack_featured_media_url":"https:\/\/","jetpack_shortlink":"https:\/\/wp.me\/p4uxU-iRE","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts\/72518","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\/113"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/comments?post=72518"}],"version-history":[{"count":3,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts\/72518\/revisions"}],"predecessor-version":[{"id":73014,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts\/72518\/revisions\/73014"}],"wp:attachment":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/media?parent=72518"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/categories?post=72518"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/tags?post=72518"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/topic?post=72518"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}