Question: Here is an **h3** inside a **div** (using inline styles which I know is bad).

```html
<div style="background-color: rgb(238, 238, 238); width: 500px; height: 36pt; text-align: center;">
<h3 style="font-family: Helvetica;">Hello World!</h3></div>
```

How can I center the **h3** tag inside the **div**?

Answer: 
You can add line-height: 36pt to h3 tag.

```
<div style="background-color: rgb(238, 238, 238); width: 500px; height: 36pt; text-align: center;">
<h3 style="font-family: Helvetica; line-height: 36pt">Hello World!</h3></div>

```
you can add `line-height` which depends on the height of your `<div>`

```html
<div style="background-color: rgb(238, 238, 238); width: 500px; height: 36pt; text-align: center;">
   <h3 style="font-family: Helvetica; line-height: 36pt">Hello World!</h3>
</div>
```

take a look at this [example fiddle](https://fiddle.jshell.net/kcNeko/d2y7bLdd/)