亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

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>輕松入門HTML+CSS,掌握編程必備技能</li>
      <li>HTML 0基礎(chǔ)入門教程</li>
       <li>HTML+CSS 輕松入門</li>
    </ol>
</div>
<div id="php">
    <h2>PHP課程</h2>
    <ul>
       <li>輕松入門PHP,踏上成為大牛的第一步</li>
       <li>php 新手入門</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>輕松入門HTML+CSS,掌握編程必備技能</li> <li>HTML 0基礎(chǔ)入門教程</li> <li>HTML+CSS 輕松入門</li> </ol> </div> <div id="php"> <h2>PHP課程</h2> <ul> <li>輕松入門PHP,踏上成為大牛的第一步</li> <li>php 新手入門</li> <li>PHP 零基礎(chǔ) 輕松學(xué)</li> </ul> </div> </body> </html>
submitReset Code