div

This time, let's learn about the div tag.
The div tag is often used when creating layers. I use it when I write html code and I have the effect with CSS.
It is also used for layout. Header, container, content, footer and so on.
I know it is hard to know by now, but just remember those things, and figure out together later on. Let's take a look at the layout.

I am header

I am content1

I am content2

I am content3

right

I am footer



Create the above layout using the div tag.

However, the above layout is not created with the div tag alone. You should use something called a stylesheet.

The source of the low-level layout is shown below.

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>div</title>
</head>
<body>
<div>
    <div>
        <p>I am header</p>
    </div><!-- header -->
    <div>
        <div>
            <div>
                <p>I am content1</p>
            </div><!-- content1 -->
            <div>
                <p>I am content2</p>
            </div><!-- content2 -->
            <div>
                <p>I am content3</p>
            </div><!-- content3 -->
        </div>
        <div>
            <p>right</p>
        </div>
    </div><!-- container -->
    <div>
        <p >I am footer</p>
    </div><!-- footer -->
</div>
</body>
</html>

result

download

There is only a div tag and a p tag. If you apply a style sheet there, you can do it like that.
I forgot to explain the p tag. ^^
You could think of the p tag as a text-writing tag. As I know, the word p is a abbreviation of paragraph.
If you have text that you'd like to bundle into one, <p> Hello </p>
So let's finish the html course and learn the style sheet.

Thanks for leaning HTML with me !