{"id":72388,"date":"2024-07-29T18:00:24","date_gmt":"2024-07-29T10:00:24","guid":{"rendered":"https:\/\/www.hongkiat.com\/blog\/?p=72388"},"modified":"2024-08-02T10:46:28","modified_gmt":"2024-08-02T02:46:28","slug":"where-css-selector","status":"publish","type":"post","link":"https:\/\/www.hongkiat.com\/blog\/where-css-selector\/","title":{"rendered":":where() &#8211; CSS: Cascading Style Sheets"},"content":{"rendered":"<p>Managing CSS can be tricky, especially when styles need to override each other. This often makes it hard to keep the styles in the right places. To simplify things, the <code>:where<\/code> selector was added in CSS. This is a special CSS selector that allows you to group selectors <strong>without increasing their specificity<\/strong>, making it easier to override styles when needed.<\/p>\n<p>Consider the following HTML:<\/p>\n<pre>\r\n<div id=\"root\">\r\n\u00a0\u00a0\u00a0\u00a0<p>1st paragraph<\/p>\r\n\u00a0\u00a0\u00a0\u00a0<section class=\"section\">\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<p class=\"highlight\">2nd paragraph<\/p>\r\n\u00a0\u00a0\u00a0\u00a0<\/section>\r\n<\/div>\r\n<section class=\"section\">\r\n\u00a0\u00a0\u00a0\u00a0<p>3rd paragraph<\/p>\r\n\u00a0\u00a0\u00a0\u00a0<p class=\"highlight\">4th paragraph<\/p>\r\n\u00a0\u00a0\u00a0\u00a0<p class=\"highlight\">5th paragraph<\/p>\r\n<\/section>\r\n<\/pre>\n<p>We have two <code>div<\/code> elements. One is inside <code>#root<\/code>, and the other is outside of it. We want paragraphs inside <code>#root<\/code> to be red and paragraphs inside <code>.section<\/code> to be green. Typically, you can write CSS as follows:<\/p>\n<pre>\r\n#root p {\r\n    color: red;\r\n}\r\n.section p {\r\n    color: green;\r\n}\r\n<\/pre>\n<p>However, with this CSS, the paragraph inside <code>.section<\/code> will be green, but the paragraphs inside <code>#root<\/code> will remain red instead of turning green. This happens because the specificity of the <code>#root<\/code> selector is higher than that of the <code>.section<\/code> selector.<\/p>\n<p class=\"codepen\" data-height=\"300\" data-default-tab=\"css,result\" data-slug-hash=\"JjQKQJp\" data-pen-title=\"CSS :where selector\" data-user=\"hkdc\" style=\"height: 300px; 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\/JjQKQJp\" rel=\"nofollow\">CSS :where selector<\/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>To solve this situation, traditionally, we could update our CSS as follows:<\/p>\n<pre>\r\n#root p {\r\n    color: red;\r\n}\r\n.section p,\r\n#root .section p {\r\n    color: green;\r\n}\r\n<\/pre>\n<p>But this is not ideal because it increases the specificity of the selector and makes them look more complex. It will eventually cause more problems when we need to override the styles.<\/p>\n<p>This is where the <code>:where<\/code> selector comes in. With the <code>:where<\/code> selector, you can group selectors without increasing their specificity. Here\u2019s how we can update our CSS instead:<\/p>\n<pre>\r\n:where(#root) p {\r\n    color: red;\r\n}\r\n.section p {\r\n    color: green;\r\n}\r\n<\/pre>\n<p>The <code>#root<\/code> selector is wrapped with the <code>:where<\/code> selector, which will reduce its specificity to <code>0<\/code>. This will allow the paragraph inside <code>.section<\/code> to be all green, even though it is inside <code>#root<\/code>.<\/p>\n<p class=\"codepen\" data-height=\"300\" data-default-tab=\"css,result\" data-slug-hash=\"rNEMBbe\" data-pen-title=\"CSS :where selector (before)\" data-user=\"hkdc\" style=\"height: 300px; 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\/rNEMBbe\" rel=\"nofollow\"> CSS :where selector (before)<\/a> by HONGKIAT (<a href=\"https:\/\/codepen.io\/hkdc\" rel=\"nofollow\">@hkdc<\/a>)\n  on <a href=\"https:\/\/codepen.io\" rel=\"nofollow\">CodePen<\/a>.<\/span><\/p>\n<h2>How is it different from the <code>:is<\/code> selector?<\/h2>\n<p>The <code>:where<\/code> selector is similar to the <code><a href=\"https:\/\/www.hongkiat.com\/blog\/css-is-selector\/\">:is<\/a><\/code> selector, where we can group a number of selectors together. The main difference is their behavior affecting the specificity within the group. While the <code>:where<\/code> selector will remove it (or set it to <code>0<\/code>), the <code>:is<\/code> selector <strong>may increase<\/strong> the specificity of the selector with the highest specificity within the group.<\/p>\n<p>Let\u2019s take a look at the following example:<\/p>\n<pre>\r\n.section p {\r\n    color: green;\r\n}\r\n\r\n.section .highlight {\r\n    color: orange;\r\n}\r\n\r\np:first-of-type {\r\n    color: red;\r\n}\r\n<\/pre>\n<p>The result would be that only the first and third paragraphs would turn red. The second paragraph would remain orange since <code>.section .highlight<\/code> has higher specificity than the <code>p:first-of-type<\/code>, even though it is also the first paragraph.<\/p>\n<p class=\"codepen\" data-height=\"300\" data-default-tab=\"css,result\" data-slug-hash=\"GRbjKbB\" data-pen-title=\"CSS :where vs :is selector\" data-user=\"hkdc\" style=\"height: 300px; 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\/GRbjKbB\" rel=\"nofollow\">CSS :where vs :is selector<\/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>Traditionally, we can always rewrite our CSS, as follows:<\/p>\n<pre>\r\np:first-of-type,\r\n.section p:first-of-type {\r\n    color: red;\r\n}\r\n<\/pre>\n<p>Alternatively, we can also write it this way:<\/p>\n<pre>\r\np:first-of-type,\r\np.highlight:first-of-type {\r\n    color: red;\r\n}\r\n<\/pre>\n<p>However, this again results in more complex selectors and complicated specificity issues down the road. With the <code>:is<\/code> selector, we can have it much simpler to solve this issue with the following rules.<\/p>\n<pre>\r\n:is(div, section, .section) p:first-of-type {\r\n    color: red;\r\n}\r\n<\/pre>\n<p>We group together <code>div<\/code>, <code>section<\/code>, and <code>.section<\/code>. This group will have the same specificity as <code>.section<\/code> so the color red will apply to both within the <code>div<\/code> and the <code>section<\/code> elements as well.<\/p>\n<p class=\"codepen\" data-height=\"300\" data-default-tab=\"css,result\" data-slug-hash=\"eYwdprW\" data-pen-title=\"CSS :where vs :is selector (applied)\" data-user=\"hkdc\" style=\"height: 300px; 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\/eYwdprW\" rel=\"nofollow\">CSS :where vs :is selector (applied)<\/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<h2>Browser Compatibility<\/h2>\n<table>\n<thead>\n<tr>\n<th>Browser<\/th>\n<th>Desktop Version<\/th>\n<th>Desktop Support<\/th>\n<th>Mobile Version<\/th>\n<th>Mobile Support<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Google Chrome<\/td>\n<td>88 and later<\/td>\n<td>Supported<\/td>\n<td>88 and later<\/td>\n<td>Supported<\/td>\n<\/tr>\n<tr>\n<td>Mozilla Firefox<\/td>\n<td>78 and later<\/td>\n<td>Supported<\/td>\n<td>78 and later<\/td>\n<td>Supported<\/td>\n<\/tr>\n<tr>\n<td>Safari<\/td>\n<td>14.1 and later<\/td>\n<td>Supported<\/td>\n<td>14.5 and later (iOS)<\/td>\n<td>Supported<\/td>\n<\/tr>\n<tr>\n<td>Microsoft Edge<\/td>\n<td>88 and later<\/td>\n<td>Supported<\/td>\n<td>88 and later<\/td>\n<td>Supported<\/td>\n<\/tr>\n<tr>\n<td>Opera<\/td>\n<td>75 and later<\/td>\n<td>Supported<\/td>\n<td>61 and later<\/td>\n<td>Supported<\/td>\n<\/tr>\n<tr>\n<td>Internet Explorer<\/td>\n<td>Not supported<\/td>\n<td>Not supported<\/td>\n<td>Not supported<\/td>\n<td>Not supported<\/td>\n<\/tr>\n<tr>\n<td>Samsung Internet<\/td>\n<td>N\/A<\/td>\n<td>N\/A<\/td>\n<td>14.0 and later<\/td>\n<td>Supported<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>Wrapping up<\/h2>\n<p>The <code>:where<\/code> selector is a great addition to CSS that allows you to group selectors without increasing their specificity. This makes it a perfect selector to add base styles to a group of elements without worrying about the specificity of the selector. It overall makes it easier to manage styles without complicating specificity and override them when needed.<\/p>\n<p><strong>Bonus:<\/strong> Check out <a href=\"https:\/\/specificity.keegan.st\/\">Specificity Calculator<\/a> to see how the specificity of your CSS selectors is calculated.<\/p>\n<p><script async src=\"https:\/\/cpwebassets.codepen.io\/assets\/embed\/ei.js\"><\/script><\/p>","protected":false},"excerpt":{"rendered":"<p>Managing CSS can be tricky, especially when styles need to override each other. This often makes it hard to keep the styles in the right places. To simplify things, the :where selector was added in CSS. This is a special CSS selector that allows you to group selectors without increasing their specificity, making it easier&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,4683],"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.6) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>:where() - CSS: Cascading Style Sheets - Hongkiat<\/title>\n<meta name=\"description\" content=\"Managing CSS can be tricky, especially when styles need to override each other. This often makes it hard to keep the styles in the right places. To\" \/>\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\/where-css-selector\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\":where() - CSS: Cascading Style Sheets\" \/>\n<meta property=\"og:description\" content=\"Managing CSS can be tricky, especially when styles need to override each other. This often makes it hard to keep the styles in the right places. To\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.hongkiat.com\/blog\/where-css-selector\/\" \/>\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-07-29T10:00:24+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-08-02T02:46:28+00:00\" \/>\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=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/where-css-selector\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/where-css-selector\\\/\"},\"author\":{\"name\":\"Thoriq Firdaus\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/person\\\/e7948c7a175d211496331e4b6ce55807\"},\"headline\":\":where() &#8211; CSS: Cascading Style Sheets\",\"datePublished\":\"2024-07-29T10:00:24+00:00\",\"dateModified\":\"2024-08-02T02:46:28+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/where-css-selector\\\/\"},\"wordCount\":612,\"publisher\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#organization\"},\"keywords\":[\"CSS\",\"CSS Selectors\"],\"articleSection\":[\"Coding\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/where-css-selector\\\/\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/where-css-selector\\\/\",\"name\":\":where() - CSS: Cascading Style Sheets - Hongkiat\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#website\"},\"datePublished\":\"2024-07-29T10:00:24+00:00\",\"dateModified\":\"2024-08-02T02:46:28+00:00\",\"description\":\"Managing CSS can be tricky, especially when styles need to override each other. This often makes it hard to keep the styles in the right places. To\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/where-css-selector\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/where-css-selector\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/where-css-selector\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\":where() &#8211; CSS: Cascading Style Sheets\"}]},{\"@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":":where() - CSS: Cascading Style Sheets - Hongkiat","description":"Managing CSS can be tricky, especially when styles need to override each other. This often makes it hard to keep the styles in the right places. To","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\/where-css-selector\/","og_locale":"en_US","og_type":"article","og_title":":where() - CSS: Cascading Style Sheets","og_description":"Managing CSS can be tricky, especially when styles need to override each other. This often makes it hard to keep the styles in the right places. To","og_url":"https:\/\/www.hongkiat.com\/blog\/where-css-selector\/","og_site_name":"Hongkiat","article_publisher":"https:\/\/www.facebook.com\/hongkiatcom","article_published_time":"2024-07-29T10:00:24+00:00","article_modified_time":"2024-08-02T02:46:28+00:00","author":"Thoriq Firdaus","twitter_card":"summary_large_image","twitter_creator":"@tfirdaus","twitter_site":"@hongkiat","twitter_misc":{"Written by":"Thoriq Firdaus","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.hongkiat.com\/blog\/where-css-selector\/#article","isPartOf":{"@id":"https:\/\/www.hongkiat.com\/blog\/where-css-selector\/"},"author":{"name":"Thoriq Firdaus","@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/person\/e7948c7a175d211496331e4b6ce55807"},"headline":":where() &#8211; CSS: Cascading Style Sheets","datePublished":"2024-07-29T10:00:24+00:00","dateModified":"2024-08-02T02:46:28+00:00","mainEntityOfPage":{"@id":"https:\/\/www.hongkiat.com\/blog\/where-css-selector\/"},"wordCount":612,"publisher":{"@id":"https:\/\/www.hongkiat.com\/blog\/#organization"},"keywords":["CSS","CSS Selectors"],"articleSection":["Coding"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.hongkiat.com\/blog\/where-css-selector\/","url":"https:\/\/www.hongkiat.com\/blog\/where-css-selector\/","name":":where() - CSS: Cascading Style Sheets - Hongkiat","isPartOf":{"@id":"https:\/\/www.hongkiat.com\/blog\/#website"},"datePublished":"2024-07-29T10:00:24+00:00","dateModified":"2024-08-02T02:46:28+00:00","description":"Managing CSS can be tricky, especially when styles need to override each other. This often makes it hard to keep the styles in the right places. To","breadcrumb":{"@id":"https:\/\/www.hongkiat.com\/blog\/where-css-selector\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.hongkiat.com\/blog\/where-css-selector\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.hongkiat.com\/blog\/where-css-selector\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.hongkiat.com\/blog\/"},{"@type":"ListItem","position":2,"name":":where() &#8211; CSS: Cascading Style Sheets"}]},{"@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-iPy","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts\/72388","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=72388"}],"version-history":[{"count":3,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts\/72388\/revisions"}],"predecessor-version":[{"id":72461,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts\/72388\/revisions\/72461"}],"wp:attachment":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/media?parent=72388"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/categories?post=72388"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/tags?post=72388"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/topic?post=72388"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}