Flexbox or grid - How to decide?

  Рет қаралды 702,955

Kevin Powell

Kevin Powell

Күн бұрын

Flexbox and grid are two fantastic layout tools. It can be hard to know which one to pick, but when you focus on the strengths of each one, it becomes a lot easier.
🔗 Links
✅ The easiest way to get started with Grid: • Learn CSS Grid the eas...
✅ The easiest way to get started with Flexbox: • Learn flexbox the easy...
✅ Using the Grid inspector: • The grid inspector: ma...
✅ Why I love grid-template-areas: • Why CSS grid-area is t...
⌚ Timestamps
00:00 - Introduction
01:13 - Comparing their behaviors
09:54 - When you should use flexbox
13:40 - When you should use grid
17:23 - Mixing flexbox and grid
#css
--
Come hang out with other dev's in my Discord Community
💬 / discord
Keep up to date with everything I'm up to
✉ www.kevinpowell.co/newsletter
Come hang out with me live every Monday on Twitch!
📺 / kevinpowellcss
---
Help support my channel
👨‍🎓 Get a course: www.kevinpowell.co/courses
👕 Buy a shirt: teespring.com/stores/making-t...
💖 Support me on Patreon: / kevinpowell
---
My editor: VS Code - code.visualstudio.com/
---
I'm on some other places on the internet too!
If you'd like a behind the scenes and previews of what's coming up on my KZbin channel, make sure to follow me on Instagram and Twitter.
Twitter: / kevinjpowell
Codepen: codepen.io/kevinpowell/
Github: github.com/kevin-powell
---
And whatever you do, don't forget to keep on making your corner of the internet just a little bit more awesome!

Пікірлер: 473
@carhub0402
@carhub0402 2 жыл бұрын
If we want a FLEXIBLE layout (the layout adapts to fit the content), we use flex. If we want a more fixed layout (the content adapts to fit the layout), we use grid.
@kevinwaag9976
@kevinwaag9976 Жыл бұрын
and if we don't know which one it will be ? ^^ do both ^^ ?
@arshadsiddiqui9071
@arshadsiddiqui9071 Жыл бұрын
If I can picture the grid I use grid. If I can't I just use flex cuz it's easier.
@revi925
@revi925 Жыл бұрын
But isnt grid also flexible if you use minmax?
@lucidattf
@lucidattf Жыл бұрын
@@revi925 that's more for adapting a fixed grid to any screen size than having it be flexible to any content, though sometimes it works for either
@GooseGumlizzard
@GooseGumlizzard Жыл бұрын
nah fam absolute positioning for everything masterrace
@jackfrosch
@jackfrosch Жыл бұрын
As a mostly backend developer, every time I have to use CSS, it feels like I'm starting over. Your videos are my go-to resource to refresh and add to my CSS understanding.
@KevinPowell
@KevinPowell Жыл бұрын
Thanks so much!
@userhenrolwest
@userhenrolwest 8 ай бұрын
As an inspiring backend developer, please can you refer me on the material that will guide me becoming a backend?
@27sosite73
@27sosite73 7 ай бұрын
@@userhenrolwest Hey! the inspiring backend developer hasn't replied yet. Are you still waiting or have you started working on something, Henrol West? if you are curious, how I know you're from India? Typically, only people from India ask questions in that manner.
@userhenrolwest
@userhenrolwest 7 ай бұрын
@@27sosite73 I'm still waiting.
@milos018
@milos018 2 жыл бұрын
This is probably the best summary of Flex vs Grid, the pros and cons and how they can work together. Great job!
@vibonacci
@vibonacci 2 жыл бұрын
My rule: if I can't achieve it easily with flex, I'll pivot to grid. Flex is the go-to choice. But I have to admit that I have less experience with grid than with flex, so that definitely plays a role in the decision. And simply by the amount of choices you have, you can conclude that grid is quite a bit more complex.
@HarshRajAlwaysfree
@HarshRajAlwaysfree 2 жыл бұрын
same, i had tried grid once it was so traumatic, I never did it again
@sourandbitter3062
@sourandbitter3062 2 жыл бұрын
grid-template-areas gives great results. Grid really isn’t too bad.
@turolretar
@turolretar Жыл бұрын
grid is actually op
@offgridvince
@offgridvince Жыл бұрын
@@HarshRajAlwaysfree 😁😂
@WyzrdCat
@WyzrdCat Жыл бұрын
Grid feels like JS not CSS. It's poorly implemented and doesn't belong in the language, but no going back now. Basically grid was their prototype at trying to get away from floats, then with flex they actually did it right.
@Detonat0r
@Detonat0r 2 жыл бұрын
I prefer to use grid for the whole page layout, while flex for smaller scale things as you showed in the last example.
@boukhadc
@boukhadc 2 жыл бұрын
This is the way
@Waruto
@Waruto 2 жыл бұрын
This is the way
@drwho9319
@drwho9319 2 жыл бұрын
Like a bantha. I have spoken
@BboyHotshot
@BboyHotshot 2 жыл бұрын
Same. This is the way.
@prateek5019
@prateek5019 2 жыл бұрын
Thank god, i am not alone😄
@marcelijankowski9593
@marcelijankowski9593 2 жыл бұрын
I tend to use grid for overall layout of the web page or for larger components. While Flexbox often helps me with Individual components, basically I use it on the smaller scale.
@shoxruxraximov1018
@shoxruxraximov1018 2 жыл бұрын
yes
@ahndeux
@ahndeux 2 жыл бұрын
I do the same, except grid for the overall page design and if there is one grid where there is a complex layout (ie: a main page), I would use flexbox... NOT! I use a sub-grid instead. Flexbox is strictly for when I don't care about position exactly. I spent way too much time on flexbox to find out it still doesn't do what I want as the screen size changes.
@bradpirochta9293
@bradpirochta9293 2 жыл бұрын
exactly.
@MrBrancomusic
@MrBrancomusic 2 жыл бұрын
I do exactly the same thing.
@gabriellundmark
@gabriellundmark 2 жыл бұрын
This is the old adage, but it isn't how you should look at Grid in my opinion. I use Grid within button elements and all sorts of tiny things.
@zachjensz
@zachjensz 2 жыл бұрын
Obviously floats are the best layout tool
@c__beck
@c__beck 2 жыл бұрын
Dem be fightin' wordz!
@marcelijankowski9593
@marcelijankowski9593 2 жыл бұрын
floats? Bro they aint supported in IE, better stick with inline and blocks
@c__beck
@c__beck 2 жыл бұрын
​@@marcelijankowski9593 🤣🤣🤣🤣🤣🤣
@jscode6330
@jscode6330 2 жыл бұрын
Obviously you are from the future. How did you leave a comment the day before the video came out?
@b1mind
@b1mind 2 жыл бұрын
@@jscode6330 patron, but he is from the future
@perkin524
@perkin524 2 жыл бұрын
You have made quite a few videos recently on flexbox and grid but I find the repetition enormously helpful. The basic principles are getting hammered in and I find I can now use them much more confidently. Keep on going and thank you!
@ShariLynnSmith
@ShariLynnSmith 2 жыл бұрын
Kevin, thank you for showing each of these as you did. I believe I now have a much better understanding of what each is good for in a way I never have & I've tried. Thank you!
@lamthaotran19
@lamthaotran19 2 жыл бұрын
I'm binge-watching your videos to teach myself CSS during my 30-min breaks at work. Thanks a ton.
@codexaeterna
@codexaeterna 2 жыл бұрын
You did a way better explanation of flex vs. grid than my college professors. CSS is so awesome, I enjoy working with it more than any other languages, probably because of my artistic background.
@VV-wl8gb
@VV-wl8gb 2 жыл бұрын
Amazing demonstration! Kevin is the undisputed MVP! These clicked for me: - in flexbox each row/column is independent of the others - use flexbox when intrinsic sizes are important or useful - use grid when you need a rigid structure (e.g. some card archive, say a blog, shop or events)
@Gocks92
@Gocks92 Жыл бұрын
It's not very often I find one simple, concise video that answers the exact questions I have. Thank you!
@reflectionethio9662
@reflectionethio9662 2 жыл бұрын
I am using grid for the outer structure and flex for positioning items in certain layout inside the container. It holiday today in Ethiopia and am still viewing this tutorial because its kev . Thank you
@terryg4415
@terryg4415 2 жыл бұрын
Thank you so much for these videos. This is the first time I've explored using flex for something, so this is invaluable.
@theyreMineralsMarie
@theyreMineralsMarie 2 жыл бұрын
Grid template areas are a lifesaver when scaffolding apps in a team environment. It's easy to teach other developers and makes it easy to maintain the layout as you add features.
@AdamLeis
@AdamLeis Жыл бұрын
Great video, Kevin. I like the benchmark of asking what determines the column widths: items or parent. That's a helpful way to conceptualize when to choose either. Bravo 👏
@weshorrocks7554
@weshorrocks7554 Жыл бұрын
I’m so glad I watched this. I’ve been trying to figure out a problem on a site where a list of logos wasn’t working as I expected. Finally got it to work thanks to the mention of grid children and a flex/grid combo.
@hugefriend514
@hugefriend514 Жыл бұрын
This video came to me exactly while i was struggling to learn the differences between flexbox and grid, and explained that everything so clearly. Thank you for this amazing content.
@Emily-yb3pd
@Emily-yb3pd 2 жыл бұрын
I always used to read about 'learn flex there, learn flex here' when I was learning css and I thought that grid was some outdated feature but it's not. It's good to know, amazing content
@batuhanbatur7409
@batuhanbatur7409 Жыл бұрын
the way you explain things is great man. as a person who gets distracted by the simpliest things, i can watch your videos without losing my focus for hours. much appreciated.
@mohammedjelidi05
@mohammedjelidi05 2 жыл бұрын
It's crazy how it's highly unlikely that I would have known any of this if I hadn't found this video. Thanks, Kevin.
@kalle4526
@kalle4526 2 жыл бұрын
Absolutely great explanation of flex and grid. Loved it! :)
@unblemished_
@unblemished_ 2 жыл бұрын
You sir, are a real hero. Making these kind of videos for totally free is an honorable work!
@aydanwessels761
@aydanwessels761 Жыл бұрын
That was an awesome tutorial! I love the energy you bring to helping me learn these concepts. Thanks so much!
@MrVurtan
@MrVurtan Жыл бұрын
Thanks for the comparison of both. This will help me in future! I tend to forget how / which layout I should use due to not regulary using it. What me personally drives me crazy is the flex-direction. There I always think the opposite.
@DkzTW
@DkzTW Ай бұрын
You explain so well man, this is great!
@sep1ol
@sep1ol 2 жыл бұрын
i just love your videos man, so helpful! keep up this awesome work of yours! thanks :)
@11gallery36
@11gallery36 2 жыл бұрын
Great video! You explained the pros and cons so perfectly! Thanks!
@eumm11
@eumm11 2 жыл бұрын
thank you so much Kevin, your lessons are always invaluable!
@floverdevel
@floverdevel 2 жыл бұрын
Wow ! Thank you Kevin :) This video is great. It's so well explained. You really helped me understand the differences between Grid and Flexbox.
@juansebastian6463
@juansebastian6463 Жыл бұрын
kevin's videos quality out league every other content creator. He explains every detail of the subject so smooth and clear.
@TheUchihaItachi13
@TheUchihaItachi13 4 күн бұрын
Woow really thank you for explaining everything. I struggle with layout and I started to learn the basics and this really helped me to understand it much more!
@Niksorus
@Niksorus 8 ай бұрын
This is the most useful video about CSS I've ever watched! Thank you so much, Kevin :D
@gauthamnookala1776
@gauthamnookala1776 Жыл бұрын
Always wondered why Flex was considered 1D when we could lay it out in a 2D matrix like manner. Your video has clarified and cleared my doubts. Thank you.
@ntnurobert218
@ntnurobert218 Жыл бұрын
Fantastic video with very clear examples . I finally understand the differences. You are awesome. Thank you so much 😊
@arnaud_b42
@arnaud_b42 10 ай бұрын
Really great content! Coming from software then backend, all too often i have felt like CSS is a nightmare. In only 20min you just gave me the explanations i needed to fix my layout (i switched from grid to flex) and now it looks great and it is responsive. Keep doing what you do. Big thanksss!
@britti73
@britti73 2 жыл бұрын
This was so useful! Awesome video 😃 thank you Kevin
@HarishChouhan
@HarishChouhan 2 жыл бұрын
I recently got back into this as I was working with a WordPress theme and now realize how in some cases flex is easy to use. One area would be a website header with the logo, menu and maybe social icons all aligned in a neat with with just few lines of code.
@luiseduardovieira3982
@luiseduardovieira3982 Жыл бұрын
clarified quite a lot for me, thanks my men, definitely will subscribe
@cleanclothes
@cleanclothes 2 жыл бұрын
Clear explanation and examples. Superb teaching!
@-Wust-
@-Wust- 2 жыл бұрын
Fantastic video. Love the "focus on intrinsic sizing" approach.
@aCitizenJOSerased
@aCitizenJOSerased 2 жыл бұрын
Kevin, really thank you, you are such a magnificent teacher! All the best!
@TheSoulCrisis
@TheSoulCrisis Жыл бұрын
Thanks for this, it's just what the doctor ordered! I'm holding a web developer position now for a Financial Technology company and doing a lot of research and practice with CSS and JavaScript. I was looking to spice up my skills on Flex and Grid, I will be watching your other videos on them too!
@CyrilNeko
@CyrilNeko 2 жыл бұрын
your videos are so smooth and chill
@GildwareTechnologies
@GildwareTechnologies 10 ай бұрын
Flexbox and Grid are two powerful layout systems in CSS, each with its own strengths and use cases. Let's compare them to understand when to use Flexbox and when to use Grid: Flexbox: One-dimensional Layout: Flexbox is designed for one-dimensional layouts, either in rows or columns. It excels at distributing items along a single axis, making it ideal for creating flexible and responsive layouts. Content Ordering: Flexbox allows you to easily change the order of flex items without modifying the HTML structure, which is useful for responsive designs or reordering elements in different screen sizes. Alignment and Justification: Flexbox provides precise control over alignment and justification of flex items along the main axis and cross axis. Complexity: It is relatively easy to understand and implement, making it a good choice for simpler layouts. Grid: Two-dimensional Layout: Grid is designed for two-dimensional layouts, allowing you to create complex grid-based structures with rows and columns. Grid Items Control: It provides fine-grained control over the placement and sizing of grid items. You can define explicit sizes for rows and columns and position items anywhere on the grid. Responsive Layouts: Grid excels at creating responsive layouts where elements reflow based on available space, providing a powerful solution for complex responsive designs. Alignment and Spacing: Grid offers powerful alignment and spacing capabilities along both axes. Complexity: Grid may have a steeper learning curve compared to Flexbox, especially for complex layouts. When to Use Flexbox: For one-dimensional layouts, such as navigation menus, card layouts, or vertically stacked elements. When you need to distribute items along a single axis with flexible sizing. For aligning or justifying items within their container. When to Use Grid: For two-dimensional layouts, like complex grids, magazine-style layouts, or multi-column forms. When you need precise control over the placement and sizing of items in both rows and columns. For creating responsive layouts with automatic reflow and resizing. In many cases, Flexbox and Grid can be used together to create more sophisticated and responsive layouts. It is common to use Flexbox inside Grid cells to further control the alignment and ordering of elements within the grid. In summary, use Flexbox for simpler one-dimensional layouts and flexible content distribution, while Grid is best suited for more complex two-dimensional layouts and fine control over grid items. Understanding both Flexbox and Grid will give you the tools to create versatile and responsive web designs efficiently.
@hjmnoguera
@hjmnoguera Жыл бұрын
Thank you!! I really needed this explanation.
@paulofernando78
@paulofernando78 Жыл бұрын
Can't thank you enough for this. It's one of the best explanations who's struggling to understand that.
@dshl21
@dshl21 Жыл бұрын
exactly what i was looking for. Thank you!
@MO-dg4wr
@MO-dg4wr 10 ай бұрын
Thanks, simplified illustration, yet thoroughly grasped the concept better now...
@datkumar1024
@datkumar1024 2 жыл бұрын
Thank you!! I really needed this explanation💯
@arcosd63
@arcosd63 2 жыл бұрын
Very cool! And great demo! Thank you
@rodrigoniveyro9763
@rodrigoniveyro9763 2 жыл бұрын
dude, thanks a lot for your work, its really useful and appreciated here.
@lorenainfanter.3099
@lorenainfanter.3099 Жыл бұрын
Thank you! It really helps me to have a better understanding about this topic.
@deadalnix
@deadalnix 2 жыл бұрын
Thanks man. I've been a webdev ~15 years ago, when we got to fight with IE6, and recently gettign back into it. Your content is super helpful to get back up to speed.
@jtinz74
@jtinz74 2 жыл бұрын
And nowadays we fight with IE11. How the world has changed.
@deadalnix
@deadalnix 2 жыл бұрын
@@jtinz74 It's nowhere near as bad as it used to be.
@michaeltan7855
@michaeltan7855 2 жыл бұрын
Thank you so much. Your videos have been a blessing to helping me start off and helping my fathers business grow.
@optimat4
@optimat4 Жыл бұрын
the best material about Grid and Flexbox I have evere found. Thanks!
@romankrytski8687
@romankrytski8687 3 ай бұрын
Wow, I love your content, man! That's awesome 😮
@jarrodverhey8563
@jarrodverhey8563 Жыл бұрын
Thank you so much for this video!
@fullStackInKannada
@fullStackInKannada 9 ай бұрын
Thank you! Very nice explanation!
@KojiKazama
@KojiKazama Жыл бұрын
Great video, thanks. This is the first time I am seeing your channel. Something about you reminds me of Fox Mulder, but I'm now subscribed.
@wpeasy
@wpeasy Жыл бұрын
Brilliant and simple as always.
@user-eh9li5tx7h
@user-eh9li5tx7h 3 ай бұрын
This is a wonderful video. Thank you so much.
@eastquack3342
@eastquack3342 2 жыл бұрын
really useful thanks; also, your demeanor is highly appreciated
@halitturanarican3434
@halitturanarican3434 7 ай бұрын
Thank you Kevin, this cleared some things on my mind.
@araibebe
@araibebe Жыл бұрын
GREAT video! easy to understand. Thanks a lot.
@Flash-bq5ts
@Flash-bq5ts Жыл бұрын
On-point explanation, thank you!
@NoFakeCoding
@NoFakeCoding 6 күн бұрын
This is great. it is good example what does when and it is clearer to see it visually. I also sometimes use grid and then inside for some group of items flex.
@michaelkuhn6328
@michaelkuhn6328 Жыл бұрын
Thanks for a great explanation of this!
@vikram87in
@vikram87in 2 жыл бұрын
whenever you speak about css, it's sounds like a beautiful story. totally loved the video 😍
@teemos2732
@teemos2732 Жыл бұрын
Thank you - you're explainers are great.
@muhammadamir4964
@muhammadamir4964 8 ай бұрын
I have learned a lot you. My deeper understanding of css is due to you. I am comfortable using vanilla css than any css framework. Grateful to you.
@stevenwilson5556
@stevenwilson5556 Жыл бұрын
thank you so much. this really helped
@worldclasscode1847
@worldclasscode1847 2 жыл бұрын
Nice vid! I love Flexbox. It's so useful. I use it on each and every web page, multiple times.
@webapple1
@webapple1 2 жыл бұрын
thank you so much! I'm studying my diploma in web development and Im designing a website with HTML/CSS for an assignment , so this helps a lot!!
@cipherxen2
@cipherxen2 2 жыл бұрын
Flex : asks children their size, tells their location Grid : tells children their size and location both Flex for lists Grid for tables
@hichamamroussi9087
@hichamamroussi9087 Жыл бұрын
Awesome video! Thanks so much.
@HocineKamikaz
@HocineKamikaz Жыл бұрын
Great job thanks a lot... That was a great explanation
@michaborzdynski7932
@michaborzdynski7932 2 жыл бұрын
I just watched you’re old video about this topic form 2019 and thought: “It would be nice if you posted an updated version”. What the heck man, your read my mind 😂
@sabinovelasquez
@sabinovelasquez 2 жыл бұрын
Great stuff man, kudos from Chile :)
@everyonecanbefascist
@everyonecanbefascist 2 жыл бұрын
Awesome tutorial just subscribed
@erril8285
@erril8285 2 жыл бұрын
Thank you! Very helpful!
@jamessummers5936
@jamessummers5936 Жыл бұрын
I've been using flex for years and love it, but I recently needed a way to layer a container above another container without using z-index and position properties, grid worked phenomenally with being able to tell 2 containers to be on the same row and column. I will admit that it's a bit more complex than flex, but I'm slowly comprehending it the more I use it, as with anything in life.
@enzocecillon1452
@enzocecillon1452 2 жыл бұрын
I started with flex as a beginner (I’m still) and tried to learn grid. I find it way more intuitive and easier to use overall. Just my newbie opinion 🤷‍♂️.
@Six5
@Six5 2 жыл бұрын
Exactly grid is just simpler to pick up and starting building with.
@charxcx_Purr
@charxcx_Purr 2 жыл бұрын
I totally agree
@shreyasgosavi9647
@shreyasgosavi9647 6 ай бұрын
Woww got different perspective for the flex-box with its intrinsic property !! thankss
@flowi84
@flowi84 11 ай бұрын
This is a great summery of flex and grid. I used alredy Booth. But never felt comfortable with it. this video is realy helpful to understand this two systems
@omidiw1124
@omidiw1124 Жыл бұрын
thank you so much on the explanation i was wondering what the heck is grid and now i know i can rely on both i was fighting with flex so much
@ziddy_mk
@ziddy_mk Жыл бұрын
Great vid, thank you!
@fogaamos6822
@fogaamos6822 Жыл бұрын
Thank you very much Kevin, you made me to fall in love with CSS, by simplifying some concept which are hard to understand
@lukas.webdev
@lukas.webdev Жыл бұрын
If you also want to fall in love with the CSS Framework "Tailwind CSS": I will post a video about it next week on my channel ... 😉
@Gregorius421
@Gregorius421 2 жыл бұрын
Wonderful comparison of what use-cases fit best either grid of flex.
@soroushiiiam6388
@soroushiiiam6388 2 жыл бұрын
Awesome now I learned what should I do with both of them
@ruskasielu6261
@ruskasielu6261 6 ай бұрын
Thanks for this, you convinced me to start using more grid display instead of going for flexbox as my default option!
@lonleybeer
@lonleybeer 2 жыл бұрын
YOOO everytime I'm starting on a project for college wondering what i could use the css king himself comes on my subscription with answers!
@michaelmann9090
@michaelmann9090 Жыл бұрын
freaking really good video my guy!
@VishalTheK
@VishalTheK Жыл бұрын
Well explained. Thanks 👍
@magnoid
@magnoid 3 ай бұрын
Great stuff Kevin!
@i_am_ergo
@i_am_ergo Жыл бұрын
Incredibly well explained!
@broken_diesel
@broken_diesel Жыл бұрын
I've watched quite a few videos on flex grid trying to understand were and how to use them. i can truthfully say with out any doubt that this was by far the easiest and best video of the topic for many reasons. I could have also gone to a bootcamp and payed a few $$$$ for this same information. But i highly doubt that it would have been as effective to get to explain the topic as well as this video.
@yapayzeka
@yapayzeka 2 жыл бұрын
wonderful explanation. thank you
@benvsantos
@benvsantos 2 жыл бұрын
this is so helpful. thank you
5 simple tips to making responsive layouts the easy way
15:54
Kevin Powell
Рет қаралды 744 М.
Learn CSS Grid the easy way
37:04
Kevin Powell
Рет қаралды 874 М.
Which one is the best? #katebrush #shorts
00:12
Kate Brush
Рет қаралды 26 МЛН
MEU IRMÃO FICOU FAMOSO
00:52
Matheus Kriwat
Рет қаралды 25 МЛН
Increíble final 😱
00:37
Juan De Dios Pantoja 2
Рет қаралды 101 МЛН
Flexbox vs. CSS Grid - Which is Better?
4:18
Layout Land
Рет қаралды 297 М.
[css] Flex vs Grid
4:38
theteachr
Рет қаралды 54 М.
The different types of JavaScript functions explained
14:47
Kevin Powell
Рет қаралды 36 М.
How to take control of Flexbox
16:01
Kevin Powell
Рет қаралды 111 М.
Are you using the right CSS units?
6:30
Kevin Powell
Рет қаралды 443 М.
Flexbox or Grid challenge // which would you use to solve these?
25:27
Learn flexbox the easy way
34:04
Kevin Powell
Рет қаралды 682 М.
Create a clean, modern navigation with HTML & CSS
25:17
Kevin Powell
Рет қаралды 142 М.
I've been challenged to a CSS BATTLE by Web Dev Simplified
42:22
Kevin Powell
Рет қаралды 949 М.
Which one is the best? #katebrush #shorts
00:12
Kate Brush
Рет қаралды 26 МЛН