---
title: "Discussion on \"Best practices for container queries\" | Hashnode"
description: "Discussion on \"Best practices for container queries\". I've been playing around with container queries and so far, there is only one best practice that I would recommend.\nWhenever you use container queries, make sure you wrap the element with a container element.\nSo your HTML should look like this:\n<div ..."
url: "https://hashnode.com/posts/best-practices-for-container-queries/64916d8bbed25c7349a0fd65"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Best practices for container queries](https://zellwk.com/best-practices-for-container-queries?utm_source=hashnode&utm_medium=feed)

I've been playing around with container queries and so far, there is only one best practice that I would recommend. Whenever you use container queries, make sure you wrap the element with a container element. So your HTML should look like this: <div ...

Jun 20, 2023 · 3 min read · zellwk.com  
Read the article

-   [#css](https://hashnode.com/tag/css)
-   [#container-queries](https://hashnode.com/tag/container-queries)

## Written by

[Zell Liew](https://hashnode.com/@zellwk)

@zellwk · Singapore

  
[View profile](https://hashnode.com/@zellwk)

Just a developer :)

I'm just a developer who loves to share what I discovered. I primarily blog at http://zellwk.com and cross-post to this website :)

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
