There are many tags in html, and each tag has different uses. The following article on php Chinese website will summarize the commonly used tags in html. Each tag will be followed by an example. Without further ado, let us Let’s take a look at the details.
##
Font tag, used to modify the text style in the display effecttextsize: Control the font size. Minimum 1 ~ maximum 7. If the setting range is not between 1 and 7, the setting is invalid color: Control the font color. Use English settings (for example: red, blue...) face: Control the font type. Only font types that exist in the system font library can be setExample:
<body> 东边日出<font color="green" size="50" face="宋体">西边雨</font> </body>
Effect:
Example:
竹枝词二首·其一<br/> 刘禹锡<br/><br/> 杨柳青青江水平,闻郎江上踏歌声。<br/> 东边日出西边雨,道是无晴却有晴。
Effect:
##
Paragraph tag is used to divide paragraphs in the display effect. And automatically add blank lines before and after the paragraphalign: The alignment of the paragraph content
The default is left, the content is left
Right
Center Centered
Example:<p align="center">黄鹤楼送孟浩然之广陵</p>
<p >故人西辞黄鹤楼,</p><p align="right">烟花三月下扬州。</p>
<p>孤帆远影碧空尽,</p><p align="right">唯见长江天际流。</p>
Title tag, used to divide titles in the display effect
Among them,is the largest,
Example
:<h1 id="念奴娇-赤壁怀古">念奴娇·赤壁怀古</h1> <h2 id="念奴娇-赤壁怀古">念奴娇·赤壁怀古</h2> <h3 id="念奴娇-赤壁怀古">念奴娇·赤壁怀古</h3> <h4 id="念奴娇-赤壁怀古">念奴娇·赤壁怀古</h4> <h5 id="念奴娇-赤壁怀古">念奴娇·赤壁怀古</h5> <h6 id="念奴娇-赤壁怀古">念奴娇·赤壁怀古</h6>Effect:
Multiple spaces in the HTML source code will eventually be merged into one in the effect.
Space symbol, used to display a blank position in the effectExample:
php 中文网</br> php 中文网Effect:
are used to annotate the HTML source code and are not displayed in the HTML effect.
can only be seen in the source code, and there is no format in the page display effect:example :
<!--html标签-->Effect: It will not be displayed in the HTML effect display, and can only be seen in the source code
Picture tag
用于在页面效果中展示一张图片。 src:指明图片的路径。(必有属性) 图片路径的写法: ①内网路径: 绝对路径:文件在硬盘上的具体位置。【不建议使用】 例如:C:\ JavaWeb001_html\img\c_1.jpg 相对路径:从引入者所在目录出发。【建议使用相对路径】 例如:../img/c_1.jpg ../表示上一层目录 ./表示当前目录 互联网路径: 必须前面加上http:// width:图片宽度 height:图片的高度 宽度和高度的设置: 默认单位是px,像素。例如:width=”400” 其实设置的是 width=”400px”。固定设置方式 百分比设置。例如:width=”50%”。 是父标签的百分比。 动态改变的。 示例: 列表标签 无序列表标签,用于在效果中定义一个无序列表
列表条目项标签,用于在效果中定义一个列表的条目 有序列表标签,用于在效果中定义一个有序列表 示例: 效果: 示例: 效果: 超链接标签 超链接标签,用于在效果中定义一个可以点击跳转的链接 href:超链接跳转的路径 (必有属性) 内网本机路径:相对路径和绝对路径 互联网路径:http://地址 本页:默认跳转到本页 超链接正常工作:①a标签中必须有内容 ②a标签必须有href属性 示例: 注意: ①a标签内容体,不仅仅是文字,也可以是其他内容,例如图片 ②a标签的href属性,不仅仅可以链接到html上,也可以链接到其他文件上,例如图片 示例: 示例: 表格标签 表格标签,用于在效果中定义一个表格 border:设置表格的边框粗细 width:设置表格的宽度 表格的行标签,用于在效果中定义一个表格行 表格的单元格标签,用于在效果中定义一个表格行中的单元格 表格的书写顺序: 步骤1:定义一个表格 <img src="/static/imghwm/default1.png" data-src="../c_1.jpg" class="lazy" style="max-width:90%" style="max-width:90%"/ alt="What tags does HTML have? A complete list of commonly used HTML tags" >
<img src="/static/imghwm/default1.png" data-src="../c_2.jpg" class="lazy" style="max-width:90%"/ alt="What tags does HTML have? A complete list of commonly used HTML tags" >
<ul>
<li>古诗</li>
<li>古词</li>
<li>诗歌</li>
</ul>
<ol>
<li>古诗</li>
<li>古词</li>
<li>诗歌</li>
</ol>
<a herf="http://www.php.cn/">php中文网</a>
<a herf="demo html">demo</a>
<a herf="demo html">
<img src="/static/imghwm/default1.png" data-src="../img/c_1.jpg" class="lazy" / alt="What tags does HTML have? A complete list of commonly used HTML tags" >
</a>
<a herf="../img/c_1.jpg" />链接到一张图片</a>
步骤2:定义表格中的一行
步骤3:在表格一行中定义单元格
示例:
<table> <tr> <td>姓名</td> <td>数学</td> </tr> <tr> <td>A</td> <td>100</td> </tr> </table>
效果:
表格的表头单元格标签,用于在效果中定义一个表格行中的表头单元格
示例:
<table boder="1px" width="100%"> <tr> <th>姓名</th> <th>数学</th> </tr> <tr> <td>A</td> <td>100</td> </tr> </table>
效果:
单元格合并
colspan:跨列合并单元格
rowspan:跨行合并单元格
合并步骤:
确定合并哪几个单元格,确定是跨列合并还是跨行合并
在第一个出现的单元格上书写 合并单元格属性
合并几个单元格,属性值就书写几
被合并的单元格必须删掉
示例:
<tr> <td conspan="2">1</td> <td>3</td> <td>4</td> </tr>
示例:
<tr><td rowspan="2">6</td> <td>7</td> <td>8</td> </tr> <tr> <td>12</td> <td>15</td> </tr>
示例:
<tr> <td conspan="2" rowspan="2">8</td> <td>11</td> </tr> <tr> <td>16</td> </tr>
块标签
行级的块标签,用于在效果中 一行上定义一个块,进行内容显示。
span有多少内容,就会占用多大空间。
Span不会自动换行
适用于少量数据展示
示例:
<span>哈哈哈哈哈</span> <span>呵呵呵呵呵</span>
效果:
块级的块标签,用于在效果中 定义一块,默认占满一行,进行内容的显示
默认占满一行
会自动换行
适用于大量数据展示
示例:
<div>哈哈哈哈哈</div> <div>呵呵呵呵呵</div>
效果:
框架标签
框架标签:
The above is the detailed content of What tags does HTML have? A complete list of commonly used HTML tags. For more information, please follow other related articles on the PHP Chinese website!

To build a website with powerful functions and good user experience, HTML alone is not enough. The following technology is also required: JavaScript gives web page dynamic and interactiveness, and real-time changes are achieved by operating DOM. CSS is responsible for the style and layout of the web page to improve aesthetics and user experience. Modern frameworks and libraries such as React, Vue.js and Angular improve development efficiency and code organization structure.

Boolean attributes are special attributes in HTML that are activated without a value. 1. The Boolean attribute controls the behavior of the element by whether it exists or not, such as disabled disable the input box. 2.Their working principle is to change element behavior according to the existence of attributes when the browser parses. 3. The basic usage is to directly add attributes, and the advanced usage can be dynamically controlled through JavaScript. 4. Common mistakes are mistakenly thinking that values need to be set, and the correct writing method should be concise. 5. The best practice is to keep the code concise and use Boolean properties reasonably to optimize web page performance and user experience.

HTML code can be cleaner with online validators, integrated tools and automated processes. 1) Use W3CMarkupValidationService to verify HTML code online. 2) Install and configure HTMLHint extension in VisualStudioCode for real-time verification. 3) Use HTMLTidy to automatically verify and clean HTML files in the construction process.

HTML, CSS and JavaScript are the core technologies for building modern web pages: 1. HTML defines the web page structure, 2. CSS is responsible for the appearance of the web page, 3. JavaScript provides web page dynamics and interactivity, and they work together to create a website with a good user experience.

The function of HTML is to define the structure and content of a web page, and its purpose is to provide a standardized way to display information. 1) HTML organizes various parts of the web page through tags and attributes, such as titles and paragraphs. 2) It supports the separation of content and performance and improves maintenance efficiency. 3) HTML is extensible, allowing custom tags to enhance SEO.

The future trends of HTML are semantics and web components, the future trends of CSS are CSS-in-JS and CSSHoudini, and the future trends of JavaScript are WebAssembly and Serverless. 1. HTML semantics improve accessibility and SEO effects, and Web components improve development efficiency, but attention should be paid to browser compatibility. 2. CSS-in-JS enhances style management flexibility but may increase file size. CSSHoudini allows direct operation of CSS rendering. 3.WebAssembly optimizes browser application performance but has a steep learning curve, and Serverless simplifies development but requires optimization of cold start problems.

The roles of HTML, CSS and JavaScript in web development are: 1. HTML defines the web page structure, 2. CSS controls the web page style, and 3. JavaScript adds dynamic behavior. Together, they build the framework, aesthetics and interactivity of modern websites.

The future of HTML is full of infinite possibilities. 1) New features and standards will include more semantic tags and the popularity of WebComponents. 2) The web design trend will continue to develop towards responsive and accessible design. 3) Performance optimization will improve the user experience through responsive image loading and lazy loading technologies.


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

VSCode Windows 64-bit Download
A free and powerful IDE editor launched by Microsoft

Atom editor mac version download
The most popular open source editor

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment

MinGW - Minimalist GNU for Windows
This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

DVWA
Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software
