<!DOCTYPE html>
<
html
>
<
head
>
<
title
>To make div height expand with its content</
title
>
<
style
>
body {
text-align: center;
}
h1 {
color: green;
}
.auto {
height: auto;
background-color: orange;
}
.inherit {
height: inherit;
background-color: cyan;
}
</
style
>
</
head
>
<
body
>
<
h1
>GeeksforGeeks</
h1
>
<
div
class
=
"auto"
>
<
p
>
Also, any geeks can help other geeks by writing
articles on the GeeksforGeeks, publishing articles
follow few steps that are Articles that need
little modification/improvement from reviewers
are published first. To quickly get your articles
reviewed, please refer existing articles, their
formatting style, coding style, and try to make
you are close to them.
</
p
>
<
div
class
=
"inherit"
>
<
p
>
It is a good platform to learn programming. It
is an educational website. Prepare for the
Recruitment drive of product based companies
like Microsoft, Amazon, Adobe etc with a free
online placement preparation course.
</
p
>
</
div
>
</
div
>
</
body
>
</
html
>