HTML structure and syntax and HTML DOM

HTML

Generally speaking, the webpage is composed of HTML + JS + CSS
JS (JAVA SCRIPT) to manage webpage dynamics

HTML: Hyper Text Markup Language
HTML is the foundation of web pages

HTML structure and syntax:

Insert picture description here
Web page HTML query example:
shortcut key F12-> Elements

HTML element

The following example:

1 <p> 文本内容 </p>   #整体是Element
#<p>开始标签起始
#</p>闭合标签结束

Additional attributes of the element:

2 <p class="...">  文本内容 </p>

Class is the label attribute, similar to name, id ...
and event attributes: onload, onerror, onclick ... (that is, the action of mouse click)

Common elements are:

1. Notes:

1 <!-- 注释的内容,不在浏览器上显示 -->

tips:
comments are special, HTML is not case sensitive

2. Image:

1 <imag src=......" ,width=""  height="高"/>

3. Link:

1 <a href="......"> 文本内容 </a>   #链接是写在href的属性里的,用来进入其它页面

4. Form:

1 <form>
2 </form>

Insert picture description here
5. Inline framework:

1 <iframe ...> </iframe>  #在开始标签中添加属性就是内联框的内容

6. Login:

1 <form> </form>  #涉及到用户登录时

The relationship between HTML and HTML DOM:

Insert picture description here
DOM is to convert HTML documents into DOM trees, which
can understand the page elements more intuitively

Published 19 original articles · Like1 · Visits 381

Guess you like

Origin blog.csdn.net/weixin_45798017/article/details/105010144