国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

HTML basic tutorial: DIV in HTML

What is DIV

First look at a website

18.png

Every red color on this website The boxes roughly represent a DIV, which is a logical part.

During the web page creation process, some independent logical parts are divided and placed in a <div> tag. This <div> tag functions as a container.

Syntax:

<div>…</div>

Determine the logical part:

What is the logical part? It is a set of interrelated elements on the page. For example, an independent column section in a web page is a typical logical part. As shown in the picture above


Name the DIV

Above, we put some tags into <div> to divide it into an independent logical part. In common applications, in order to make the logic clearer, we can set a name for this independent logical part and use the id attribute to provide a unique name for <div>. This is like each of us having an ID card. Number, this ID number uniquely identifies our identity and must be unique.

Combine this id with the CSS and JavaScript that you will learn later, and you can create a very cool website. We will introduce this later. In this section, everyone understands the DIV Just use it

<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>php.cn</title>
</head>
<body>
<div id="html">
   <h2>HTML課程</h2>
    <ol>
       <li>輕松入門(mén)HTML+CSS,掌握編程必備技能</li>
      <li>HTML 0基礎(chǔ)入門(mén)教程</li>
       <li>HTML+CSS 輕松入門(mén)</li>
    </ol>
</div>
<div id="php">
    <h2>PHP課程</h2>
    <ul>
       <li>輕松入門(mén)PHP,踏上成為大牛的第一步</li>
       <li>php 新手入門(mén)</li>
       <li>PHP 零基礎(chǔ) 輕松學(xué)</li>
    </ul>
</div>
</body>
</html>


Continuing Learning
||
<!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>php.cn</title> </head> <body> <div id="html"> <h2>HTML課程</h2> <ol> <li>輕松入門(mén)HTML+CSS,掌握編程必備技能</li> <li>HTML 0基礎(chǔ)入門(mén)教程</li> <li>HTML+CSS 輕松入門(mén)</li> </ol> </div> <div id="php"> <h2>PHP課程</h2> <ul> <li>輕松入門(mén)PHP,踏上成為大牛的第一步</li> <li>php 新手入門(mén)</li> <li>PHP 零基礎(chǔ) 輕松學(xué)</li> </ul> </div> </body> </html>
submitReset Code