---
title: "Discussion on \"How to Center a Div in 3 Ways Using HTML and CSS\" | Hashnode"
description: "Discussion on \"How to Center a Div in 3 Ways Using HTML and CSS\". A step-by-step tutorial on how to center a Div in three ways using HTML and CSS"
url: "https://hashnode.com/posts/how-to-center-a-div-in-3-ways-using-html-and-css/64f114158e6a4ae79ac5510f"
---

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

Discussion

# [How to Center a Div in 3 Ways Using HTML and CSS](https://richard-ohioze.hashnode.dev/how-to-center-a-div-in-3-ways-using-html-and-css?utm_source=hashnode&utm_medium=feed)

A step-by-step tutorial on how to center a Div in three ways using HTML and CSS

Aug 31, 2023 · 3 min read · richard-ohioze.hashnode.dev  
Read the article

-   [#html](https://hashnode.com/tag/html)
-   [#html5](https://hashnode.com/tag/html5)
-   [#css](https://hashnode.com/tag/css)
-   [#flexbox](https://hashnode.com/tag/flexbox)
-   [#grid](https://hashnode.com/tag/grid)

## Written by

[Richard Ohioze](https://hashnode.com/@RichardOhioze)

@RichardOhioze · Remote

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

Frontend Engineer ● Technical Writer

Frontend Developer | Technical Writer

## Responses 1

Markdown supported · ⌘↵ to post

[Micheal Jeremiah](https://hashnode.com/@Everblazingjay)

[Sep 1, 2023](https://hashnode.com/posts/how-to-center-a-div-in-3-ways-using-html-and-css/64f114158e6a4ae79ac5510f/comment/64f1307b052b196d0934cb47)

Thanks for sharing, I learned some new tricks.
