The content of this article is about the analysis of commonly used tags in HTML (with code). It has certain reference value. Friends in need can refer to it. I hope it will be helpful to you.
1.1 Classification of tags
1.1.1 Classification by subject:
1. Tags with subject : Such as data
2. Label without subject: such as
Line break label
Determine whether a table needs to be Subject, you can think about whether the tag needs to encapsulate data. If it needs to encapsulate data, then the tag must have a body. If it does not need to encapsulate data, then there is no need to have a body .
2.1.2 Classification by line :
1. If the content of a label needs to occupy an independent line, we call it a block label. For example:
Title tag
2. If a tag does not need to occupy a separate line, we call it an inline tag. For example: Font tag
2.2 Text tag:
#Tag name | Tag description | Common attributes |
Title tag, | All titles are bold , 1 means level 1 heading, the largest word size, level 6 heading is the smallest | Attribute is inside the start tag align:Set title alignment center: center, right: right-aligned, left: left-aligned
|
Draw a horizontal line | width: Line length size: Thickness color: Color | |
b | Bold the font, which has the same function as the strong tag||
i | Set the font to italic||
br | Line break
| |
Font (obsolete in HTML5) | color: color size: size face: the name of the specified font | |
Paragraph, each p tag is a paragraph, there is no first line indentation. There are gaps between paragraphs | If you want to indent, use half-width space can also be full-width space title:When the mouse is moved up, text prompt information will be displayed |
特殊的字符 | 对应的实体字符 |
b3c24fd0ddf36efa4ab199a4c401ea84 | |
空格 | |
¥ |
¥ |
© 版本所有 | © |
® | ® |
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> <style type="text/css"></style> <script type="text/javascript"></script> </head> <body> <h1>标签是标题标签<br/> 百度(纳斯达克:BIDU),全球最大的中文搜索引擎、最大的中文网站。 1999年底,身在美国硅谷的李彦宏看到了中国互联网及中文搜索引擎服务的巨大发展潜力, 抱着技术改变世界的梦想,他毅然辞掉硅谷的高薪工作,携搜索引擎专利技术,于 2000年1月1日在中关村创建了百度公司。<br/> 青岛啤酒:¥16元一瓶。<br/> 《java从入门到放弃》:© XXX版权所有<br/> 本次活动解释权归XXX公司所有:®XXX有限公司 </body> </html>
2.6 图像标签(img)
2.6.1 标签的作用:
在网页中显示图片。
2.6.2 常用的属性:
属性名 | 作用 |
src | source图片文件地址,注:不能使用客户端本地地址,如:c:/aaa.jpg |
width | 图片宽度,如果只指定宽和高,另一个参数会等比例缩放 |
height | 图片高度 |
alt | 如果图片丢失,图片显示的文字 |
title | 如果鼠标移到图片上,显示提示文字信息 |
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> <style type="text/css"></style> <script type="text/javascript"></script> </head> <body> <img src="/static/imghwm/default1.png" data-src="img/11.jpg" class="lazy" style="max-width:90%" style="max-width:90%" title="这个是一辆豪车" / alt="Analysis of commonly used tags in html (with code)" > </body> </html>
相关推荐:
The above is the detailed content of Analysis of commonly used tags in html (with code). For more information, please follow other related articles on the PHP Chinese website!

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.

The roles of HTML, CSS and JavaScript in web development are: HTML is responsible for content structure, CSS is responsible for style, and JavaScript is responsible for dynamic behavior. 1. HTML defines the web page structure and content through tags to ensure semantics. 2. CSS controls the web page style through selectors and attributes to make it beautiful and easy to read. 3. JavaScript controls web page behavior through scripts to achieve dynamic and interactive functions.

HTMLisnotaprogramminglanguage;itisamarkuplanguage.1)HTMLstructuresandformatswebcontentusingtags.2)ItworkswithCSSforstylingandJavaScriptforinteractivity,enhancingwebdevelopment.

HTML is the cornerstone of building web page structure. 1. HTML defines the content structure and semantics, and uses, etc. tags. 2. Provide semantic markers, such as, etc., to improve SEO effect. 3. To realize user interaction through tags, pay attention to form verification. 4. Use advanced elements such as, combined with JavaScript to achieve dynamic effects. 5. Common errors include unclosed labels and unquoted attribute values, and verification tools are required. 6. Optimization strategies include reducing HTTP requests, compressing HTML, using semantic tags, etc.

HTML is a language used to build web pages, defining web page structure and content through tags and attributes. 1) HTML organizes document structure through tags, such as,. 2) The browser parses HTML to build the DOM and renders the web page. 3) New features of HTML5, such as, enhance multimedia functions. 4) Common errors include unclosed labels and unquoted attribute values. 5) Optimization suggestions include using semantic tags and reducing file size.


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

Dreamweaver Mac version
Visual web development tools

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.

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