A preliminary understanding of the basic structure and tags of HTML
1. Preliminary understanding of HTML
HTML is a hypertext tag language, and the browser is a tool used to "interpret and execute" HTML source code.
The basic structure of HTML
nbsp;html><meta><title></title>
##Where is a document type declaration, which declares that this file must be an HTML5 file, allowing the browser to parse according to HTML5 preparations. It must be in HTML5 and must be Yes, and it must be written at the top of the file.
##

<span style="max-width:90%"><span style="font-family: 宋体"> 是用来描述网页的一些关键信息。例如网页的配置、设置、关键字等等。</span>。</span><span style="font-size: 18px"><span style="font-size: 16px">。这些信息,大多在浏览器看不到,但是对网页的解析至关重要!</span><br></span>
<span style="font-family: 宋体; font-size: 16px"> 则是所有的代码都写在其中。<br><span style="font-size: 18pt; background-color: #cc99ff">二、初步了解标签<br></span></span>
1.Header part
##1) link: icon of web page title链接网页的小图标,网页选项卡上面的小图片
where rel="icon" indicates that the current link is used to link to the web page icon
href="img/ss.gif "Indicates the location of the icon's address
<link>
<span style="font-family: 宋体; font-size: 16px; background-color: #ffffff"><span style="font-family: 宋体"><span style="line-height: 36px"><span style="color: #ff6600; background-color: #ffffff">①</span>其中<meta charset="utf-8">设置网页的编码格式为utf-8格式<br>常见的中文编码格式:GB2312:国标码,简体中文;GBK:扩展国标码,简体中文<br><span style="color: #ff0000">utf-8:万国码,兼容各种语言编码,常用!<br></span></span></span></span>
<meta>
<br>
<meta>
name="description" means that this meta tag sets the description information of the web page;
content="" means the detailed description information content! ! <br>
<br>
<meta>
<br>
2、主体部分
1)标签的分类
①块级标签:显示为块状,独占一行,自动换行。<br>②行级标签:在一行中,从左往右依次排列,不会自动换行。
2)块级标签
常见的块级标签有:
a.标题标签:...... 特点:h1最大,h6最小且自动加粗。
b.水平线标签:
c.段落标签:
d.换行标签:<br>
e.引用标签:<br> 要的cite属性表明引用的来源,一般为网址,且网址不会在网页中展示,浏览器一般显示为首行缩进
f.预格式标签:<br> 浏览器默认显示样式:①显示为等宽字体
②代码中的换行,空格等元素可在浏览器中直接显示。<br>
nbsp;html><meta>HTML基本块级标签 这是h1标签
这是h2标签
这是h3标签
这是h4标签
这是h5标签
这是h6标签
这是一段文字!哈哈啊哈哈哈啊哈哈哈哈啊哈!这是一段文字!哈哈啊哈哈哈啊哈哈哈哈啊哈!这是一段文字! 哈哈啊哈哈哈啊哈哈哈哈啊哈!<br>这是一段文字!哈哈啊哈哈哈啊哈哈哈哈啊哈!
这是一段文字!哈哈啊哈哈哈啊哈哈哈哈啊哈!这是一段文字!哈哈啊哈哈哈啊哈哈哈哈啊哈!这是一段文字!哈哈啊哈哈哈啊哈哈哈哈啊哈!这是一段文字!哈哈啊哈哈哈啊哈哈哈哈啊哈!
if(entity != null){ tring result = EntityUtils.toString(entity,"UTF-8");//HttpEntity转为字符串类型 jsonObject = JSONObject.fromObject(result);//字符串类型转为JSON类型 }光明正大的不要脸!这段话就是抄的!你能咋地!
g.有序列表<br>
- (order list)<br>
- ... 列表项可以有n多个<br>
- ... <br>
- ... <br>
h.无序列表<br>
- (unorder list)<br>
- ... n多个<br>
- ... <br>
- ... <br>
i.定义描述列表<br>
-
<br>
- 一般只有一项 (列表标题)<br>
- 可以有很多项 (列表描述项)<br>
- 132 <br>
- 123 <br>
g.组合标签 显示效果:上面是图片,下面是图片的标题,同时图片和标题前代缩进。<br> 图片<br>
k.分区标签
可以包裹任何标签,也可以被包裹进任何标签。
nbsp;html><meta>HTML基本块级标签
- 这是无序列表第一项
- 这是无序列表第二项
- 这是无序列表第三项
- 这是无序列表第四项
- 这是无序列表第一项
- 这是无序列表第二项
- 这是无序列表第三项
- 这是无序列表第四项
- 这是dl列表的标题
- 这是dl列表的描述项1
- 这是dl列表的描述项2
- 这是dl列表的描述项3

11111
3) Row-level tags
Common row-level tags:
(1) Text tag span
① The span tag is just a wrapping function and has no other meaning; <br> ② The span function is similar to that of div and needs to be Used with CSS. It’s just that div is a block-level tag and span is a line-level tag
<br> (2) Emphasize the tags em and strong; slant the tag i; bold the tag b; between the four The difference
#① both em and i can be tilted. Both strong and b can be made bold! However, i and b are simply bold and slanted, while em and strong have more emphasized semantics. <br> ② Both em and strong indicate emphasis, but strong emphasizes a higher level! ! <br> Note: <br> 1. The purpose of emphasis: Let search engines know what the web page emphasizes! Easy to display on search engines! <br> 2. Strong and em can be nested in multiple layers, indicating increasing emphasis!
(3) Short reference tag q: indicates a short reference. cite attribute: used to declare the source of the citation.
##【Commonly used quote tags】<br>
Used to quote a piece of content<br>
Used to quote a sentence<br> Commonly used to cite the title of works, calligraphy and painting titles, etc. <br><br> Similarity: The three citation tags all use the cite attribute to indicate the source of the citation <br> Difference: ① The content of the citation is different. Blockquote->A paragraph, q->A sentence, cite->Work name<br>② The default effects displayed are different. blockquote->The entire paragraph is indented to the right by default; q->Quotes are added by default; cite->Italic by default!
(4) Reduce the tag small: reduce the font by one size; big tag: enlarge the font by one size.
Note: <br> ① Small and big can be nested in multiple levels until the font reaches the minimum or maximum; <br> ② These two tags have been eliminated and are not recommended for use.
(5) Image tag img
① src attribute: Indicates the path of the image [Legal way of image path]<br>A. Internet link: Since the pictures are on other websites, if other websites delete the pictures, we cannot access them, so this method is not recommended; <br> <br>
<br>B. Absolute path: Pictures using absolute paths can only be accessed using the file protocol on this machine! Therefore, it is strictly prohibited to use this method! <br>
<br>C. Relative path: <br>a. The picture is in the same folder as the current document: directly write the picture name <br> <br>b. The picture is in the folder below the current document: folder name/picture name<br> <br>c. The picture is in the upper folder of the current document: ../picture name (../ means going back one layer)<br> <br>However, be sure to note: the picture must be included in the project and cannot be accessed outside the project picture of. <br><br><br>② height: the height of the picture width: the width of the picture <br>
<br><br> ③ title: The title of the picture, which is the prompt text you see after pointing the mouse over it<br> < ;img src="img/icon.jpg" title="Prompt text seen when the mouse is pointed over" /><br><br> ④ alt: Text displayed when the image cannot be loaded<br>
<br><br> ⑤ align: image How the surrounding text is aligned relative to the image. <br> Optional values: top->top of picture center->middle of picture bottom->bottom of picture<br>
12345
(6)Hyperlink tag a
A, href Attribute: Indicates the page to which the hyperlink jumps. <br> ① You can write the network address: <br> This is a hyperlink a>
<br> ② You can open a local html file: <br>Use a relative path to determine the file address. Determined in the same way as the img tag. <br> This is a hyperlink
<br>## B. title attribute: the prompt text displayed after the mouse is pointed over <br> This is a hyperlink C、target属性:设置新页面打开的窗口位置<br> 可选值:_self自身页面打开(默认)<br> _blank 新窗口打开<br> 这是一个超链接 <br><br>【超链接的特殊应用】<br> 1、功能性链接:(了解)<br> mailto:// 点击链接给指定邮箱发送邮件<br> 点击发送邮件<br>tencent://message/?uin=1105093212"<br>还有:tell://手机端点击打电话<br>message://手机端点击发送短信<br>ftp://使用ftp协议进行文件的上传下载<br>2、锚点链接:<br> >>>本页面锚链接<br> ① 在页面的指定位置中设置一个锚点,用那么属性表示锚点名字:<br> a name="top">
nbsp;html><meta>HTML基本行级标签 糖糖真帅!!!<br> 这是em标签<br>这是strong标签<br>这是i标签<br>这是b标签<br>这是b标签<br>我是q标签引用我是blockqoute的引用!!!!!我是cite标签的引用!!<br> 我比正常小两号<br>我比正常大一号<br>12345 -->
12345 点击发送邮件点击123
4)块级标签与行级标签的区别
1、块级标签:默认宽度100%(占满一行);<br> 块级标签自动换行(独占一行,右边不能有任何东西);<br> 块级标签可以使用CSS设置宽度高度!<br><br> 2、行级标签:默认宽度由内容撑开(内容多宽、宽度就占多宽);<br> 行级标签不会自动换行(一行当中,从左往右依次排列);<br> 行级标签的宽度高度不能设置!
5)表格
(1)表格table
表格用table表示,表格中的每一行tr表示,一行中的每一列用td表示<br><br> th表示的是:表头。表头中的文字,默认为加粗居中。th要放在tr中,用于替换掉td。<br><br>(2)table的常用属性<br>A、border:给表格加边框。 默认给所有td加边框,并且给整个table加外边框。 当增大border的值时,td上的边框不变化,只有最外层大边框变宽。<br><br>B、cellspacing:单元格与单元格之间的距离。<br> cellspacing="0" 表示单元格与单元格之间没有距离,但是边框线的宽度依然是两条线的宽度。<br><br> [注意] 表格边框合并的CSS写法:<br> style="border-collapse: collapse;"<br><br>这条CSS与cellspacing="0"有什么区别?<br> cellspacing="0"仅仅是将单元格之间的距离调整为0,实际上单元格之间依然还是两条线;<br> border-collapse: collapse; 是将表格相邻的两条边框进行合并处理,只有一条线存在。(一旦边框合并,cellspace属性将会失效。)<br><br><br>C、cellpadding:单元格中的文字与单元格边框的距离。<br><br>D、 height:表格的高度<br> width:表格的宽度<br><br> 使用表格宽、高属性设置大小:<br>
<br><br> 使用CSS样式设置大小:<br>
<br><br><br>E、align:设置表格在浏览器中的位置。不建议使用了。<br> 可选值:left 表格居左 /center 表格居中/right 表格居右<br><br><br>F、bgcolor:背景色<br> bordercolor:边框颜色<br> background:背景图 background="img/computer.jpg" <br> 背景色和背景图同时存在时,背景图会覆盖背景色<br><br><br>(3)tr与td常用属性<br>A、width:单元格宽度<br> height:单元格的高度<br><br>B、bgcolor: 单元格的颜色<br><br>C、align:设置单元格中的文字,水平对齐方式。<br> left、center、right<br> valign:设置单元格中的文字,垂直对齐方式。<br> top、middle、bottom<br><br>D、 nowrap="nowrap" 当单元格文字过多时,设置单元格文字不断行显示。 但是,会把表格的宽度撑大!!!<br><br><br>(4)表格的跨行与跨列<br><br>①跨列:在td上使用属性colspan="n"进行跨列。如果一个单元格跨n列,则,单元格右边的n-1个单元格需要去掉。<br><br>②跨行:在td上使用属性rowspan="n"进行跨行。如果一个单元格跨n行,则,单元格下边的n-1个单元格需要去掉。
nbsp;html><meta>表格
标题一 | 标题二 | |
---|---|---|
1-1 | 1-2 | 1-3 |
2-2 | 2-3 |
3. The words written at the back
#This is my first time contacting a blog. I was a little excited when I posted the first post. As a code person, I feel that code is a magical place, and it is both magical and fun.
I have always felt that these things are very profound and beyond my reach, but when I came into contact with them, I still liked them. .
#Finally, please take care of me.
##
The above is the detailed content of A preliminary understanding of the basic structure and tags of HTML. For more information, please follow other related articles on the PHP Chinese website!

The main differences between HTML5 (H5) and older versions of HTML include: 1) H5 introduces semantic tags, 2) supports multimedia content, and 3) provides offline storage functions. H5 enhances the functionality and expressiveness of web pages through new tags and APIs, such as and tags, improving user experience and SEO effects, but need to pay attention to compatibility issues.

The difference between H5 and HTML5 is: 1) HTML5 is a web page standard that defines structure and content; 2) H5 is a mobile web application based on HTML5, suitable for rapid development and marketing.

The core features of HTML5 include semantic tags, multimedia support, form enhancement, offline storage and local storage. 1. Semantic tags such as, improve code readability and SEO effect. 2. Multimedia support simplifies the process of embedding media content through and tags. 3. Form Enhancement introduces new input types and verification properties, simplifying form development. 4. Offline storage and local storage improve web page performance and user experience through ApplicationCache and localStorage.

HTML5isamajorrevisionoftheHTMLstandardthatrevolutionizeswebdevelopmentbyintroducingnewsemanticelementsandcapabilities.1)ItenhancescodereadabilityandSEOwithelementslike,,,and.2)HTML5enablesricher,interactiveexperienceswithoutplugins,allowingdirectembe

Advanced tips for H5 include: 1. Use complex graphics to draw, 2. Use WebWorkers to improve performance, 3. Enhance user experience through WebStorage, 4. Implement responsive design, 5. Use WebRTC to achieve real-time communication, 6. Perform performance optimization and best practices. These tips help developers build more dynamic, interactive and efficient web applications.

H5 (HTML5) will improve web content and design through new elements and APIs. 1) H5 enhances semantic tagging and multimedia support. 2) It introduces Canvas and SVG, enriching web design. 3) H5 works by extending HTML functionality through new tags and APIs. 4) Basic usage includes creating graphics using it, and advanced usage involves WebStorageAPI. 5) Developers need to pay attention to browser compatibility and performance optimization.

H5 brings a number of new functions and capabilities, greatly improving the interactivity and development efficiency of web pages. 1. Semantic tags such as enhance SEO. 2. Multimedia support simplifies audio and video playback through and tags. 3. Canvas drawing provides dynamic graphics drawing tools. 4. Local storage simplifies data storage through localStorage and sessionStorage. 5. The geolocation API facilitates the development of location-based services.

HTML5 brings five key improvements: 1. Semantic tags improve code clarity and SEO effects; 2. Multimedia support simplifies video and audio embedding; 3. Form enhancement simplifies verification; 4. Offline and local storage improves user experience; 5. Canvas and graphics functions enhance the visualization of web pages.


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Linux new version
SublimeText3 Linux latest version

MantisBT
Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

SublimeText3 Mac version
God-level code editing software (SublimeText3)

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool
