search
HomeWeb Front-endHTML TutorialHtml tag usage--text, list, table, hyperlink_html/css_WEB-ITnose

Html内容

1.   Html就是超文本标记语言的简写,是最基础的网页语言。

2.   Html是通过标签来定义的语言,代码都是由标签所组成。

3.   Html代码不用区分大小写。

4.   Html代码由开始结束。里面由头部分

和体部分两部分组成。

5.   头部分是给Html页面增加一些辅助或者属性信息,它里面的内容会最先加载。

6.   体部分是真正存放页面数据的地方。

 

l  多数标签都是有开始标签和结束标签,其中有个别标签因为只有单一功能,或者没有要修饰的内容可以在标签内结束。

l  想要对被标签修饰的内容进行更丰富的操作,就用到了标签中的属性,通过对属性值的改变,增加了更多的效果选择。

l  属性与属性值之间用“=”连接,属性值可以用双引号或单引号或者不用引号,一般都会用双引号。或公司规定书写规范。

l  格式:数据内容标签>

操作思想:

    为了数据操作都需要将数据进行不同标签的封装,通过标签中的属性对封装的数据进行操作。标签就详单与容器。对容器中的数据进行操作,就是在不断地改变容器中的属性值。

 

常用标签的使用

字  体

1.   字体标签

例:字体标签示例

注:简单颜色可是直接写对应的英文,复杂颜色用16进制表示,表现形式#FF0000两个数为一组,按红,绿,蓝排列,如:#00FF00表示绿色。建议用工具选取。

2.   标题标签

…..

因为标题是文本中常用的内容,为了方便操作而定义的。其实就是某个字号和粗体的组合。

3.   特殊字符:

如果要在网页上显示一些特殊符号,比如 & 等。因为这些符号在代码中会被浏览器识别并解释,所以用一些特殊的方式来表示。

<

<

>

&

&

"

®

®

©

©

?

 

空格

 

 

注:在Dreamweaver8中都具有联想功能。

列   表

4.   列表标签:

:上层项目

:下层项目

例:

   

游戏名称

      

星际争霸

      

红色警戒

   

部门名称

      

技术部

      

培训部

效果:

列表中项目符号对应的标签

    :数字标签(a A 1 i I)

    :符号标签(○●■)

  • :具体项目内容标签。此标签只在
      中有效。

      通过type属性更改项目符号,如果想做出效果更好的列表,如:黑色圆点用图片表示,就用到CSS。

Column table

4. List tag:

图   像

5.   图像标签Html tag usage--text, list, table, hyperlink_html/css_WEB-ITnose

例:”图片说明文字”/

align:属性定义图片的排列方式,border用来设置图像的边框。Src  连接一个文件

6.   图像地图

应用:当要在图像中选取某一部分作为连接的时候。如:中国地图每个省所对应的区域。

map标签要和img标签联合使用。Href是超连接

图片说明文字

 

   

   

 

: upper-level project
: lower-level project Example:
Game name
;Department name                                                                                                                      Effect: Label corresponding to the bullet in the list
    : numeric label (a A 1 i I)
    : symbol tag (○●■)
  • : specific project content tag. This tag is only valid in
      . Change the bullets through the type attribute. If you want to make a better list, such as black dots represented by pictures, use CSS.
Image td>
5. Image tag: Html tag usage--text, list, table, hyperlink_html/css_WEB-ITnose Example: ”Picture align: attribute defines the arrangement of the image, and border is used to set the border of the image. Src Connect a file 6. Image map: Application: When you want to select a certain part of the image as a connection. For example: the area corresponding to each province on the Chinese map. The map tag should be used in conjunction with the img tag. Href is a hyperlink Picture caption

表   格

7.   表格标签

组成:标题标签:

单元格标签:

和。
,给表格提供标题。

表头标签:

,一般对表格的第一行或者第一列进行格式化,就是粗体显示。并不常用。

行标签:

,加载行标签的里面。可以简单理解为,先有行,在行中在加入单元格。

格式:

   

   

      

      

   

   

      

      

   

表格标题
姓名 年龄
张三 23

效果:

   

   

   

   

      

      

   

    个人信息

   

张三 23

效果:

每个表格可以有一个表头、一个表尾和一个或多个表体(即正文),分别以THEAD、TFOOT和TBODY元素表示。

THEAD、TFOOT包含关于表格列的信息。

TBODY作用是:可以控制表格分行下载,从而提高下载速度。(网页的打开是先表格的的内容全部下载完毕后,才显示出来,分行下载可以先显示部分内容,这样会减少用户等待时间。)

使用TBODY的目的是可以使得这些包含在内的代码不用在整个表格都解析后一起显示,就是说如果有多个行,那么如果得到一个TBODY行,就可以先显示一行。

TBODY这个标签可以控制表格分行下载,当表格内容很大时比较实用,在需要分行下载处加上

超  链  接

8.   超链接标签:

两种用法:

一、超链接

例:

新浪

二、定位标记

一般在本页面中使用,当网页内容过长,定位标记会比拖动滚动条方便快捷。

注:定位标记要和超链接结合使用才有效。

例:

标记位置

…….

返回标记位置

注:使用定位标记时一定在href值的开始加入#标记名。

Table
7. Table tag: Composition: Title tag: Cell label: and where branch downloading is required.
, provides a title for the table. Header tag:
, generally format the first row or column of the table, which is displayed in bold. Not commonly used. Row label:
, load inside the row label. It can be simply understood as, there are rows first, and cells are added in the rows. Format: ;th>Name     >   🎜>
AgeZhang San
Effect:   >
Personal information
Zhang San
Effect: Each table can have a header, a footer and One or more table bodies (i.e. text), represented by THEAD, TFOOT and TBODY elements respectively. THEAD, TFOOT contain information about table columns. The function of TBODY is to control the downloading of table branches, thereby increasing the download speed. (The web page is opened after all the contents of the table are downloaded before it is displayed. For branch downloads, part of the content can be displayed first, which will reduce the user's waiting time.) The purpose of using TBODY is to make these include The code included does not need to be displayed together after the entire table is parsed. That is to say, if there are multiple rows, then if a TBODY row is obtained, one row can be displayed first. The TBODY tag can control the downloading of tables in separate rows. It is more practical when the table content is large. Add
Super link
8. Hyperlink tag: Two uses: 1. Hyperlink Example: Sina 2. Positioning tag is generally used on this page. When the web page content is too long, the positioning tag will be slower than dragging the scroll bar. Convenient and fast. Note: Positioning tags must be used in conjunction with hyperlinks to be effective. Example: Mark position

……. Return to mark position Note: When using positioning tags Be sure to add the # tag name at the beginning of the href value.

框   架

9.   框架标签:

注:框架标签不可以放到

,一般为了代码的可读性,会到和之间。

例:

   

   

      

      

   

这段代码会需要已经存在的3个html页面,分别是:1.html,2,html,3.html

效果:

注:当框架大小不想被鼠标拖动而改变,可以在frame标签中加入noresize属性,这个属性没有属性值,称为标记属性,加上就为固定。在XHTML的规范中,所有的属性都要有属性值,那么标记属性的属性值就是自身,如:noresize=”noresize”

10. 画中画标签:

很遗憾,画中画你没有看到,因为你的浏览器不支持iframe标签。

框架标签现在不是很常用,布局都用div css table。框架很少使用了。

Frame
9. Frame tag: Note: The frame tag cannot be placed in . Generally, for the sake of code readability, it will Between and . Example: ; ;   This code will Requires 3 existing html pages, namely: 1.html, 2, html, 3.html Effect: Note: When the frame size does not want to be To change by dragging the mouse, you can add the noresize attribute to the frame tag. This attribute has no attribute value and is called the mark attribute. If added, it is fixed. In the XHTML specification, all attributes must have attribute values, so the attribute value of the mark attribute is itself, such as: noresize=”noresize” 10. Picture-in-picture tag: Frame tags are not very commonly used now, and div css table is used for layout. Frames are rarely used anymore.

tr>

ø表   单ø

11. 表单标签:

表单标签是最常用的标签,用于与服务器端的交互。

:输入标签 :接收用户输入信息。

其中的type属性指定输入标签的类型。

l  文本框 text。输入的文本信息直接显示在框中。

l  密码框 password。输入的文本以原点或者星号的形式显示。

l  单选框 radio 如:性别选择。

l  复选框 checkbox 如:兴趣选择。

l  隐藏字段 hidden 在页面上不显示,但在提交的时候随其他内容一起提交。

l  提交按钮 submit 用于提交表单中的内容。

l  重置按钮 reset 将表单中填写的内容设置为初始值。

l  按钮 button 可以为其自定义事件。

l  文件上传 file 后期扩展内容,会自动生成一个文本框,和一个浏览按钮。

l  图像 image 它可以替代submit按钮。

for 属性:指定快捷键作用的表单元素。必须与要作用的表单元素的id值相同。

accesskey 属性:指定快捷键,此快捷键需要和alt键组合使用。

例:

头  标  签

头标签都放在

头部分之间。包括:title base meta link

12.

:指定浏览器的标题栏显示的内容。 <p>13. <base>:</p> <p>href 属性:指定网页中所有的超链接的目录。可以是本地目录,也可以是网络目录。注意值得结尾处一定要用/表示目录。只作用于相对路径的超链接文件。</p> <p>target 属性:指定打开超链接的方式。如_blank 表示所有的超链接都用新窗口打开显示。</p> <p>14. <meta>:</p> <p>name 属性:网页的描述信息。当取keywords时,content属性的内容就作为搜索引擎的关键字进行搜索。</p> <p>http-equiv 属性:模拟HTTP协议的响应消息头。</p> <p>例:</p> <p><meta http-equiv="refresh" content="3;url=http://www.sina.com.cn"></p> <p>表示打开此页面3秒后自动转到新浪页面。</p> <p>15. <link>:</p> <p>rel 属性:描述目标文档与当前文档的关系。</p> <p>type 属性:文档类型。</p> <p>media:指定目标文档在哪种设备上起作用。</p> <p>例:</p> <p><link rel="stylesheet" type="text/css" media="screen,print" href="a.css"></p>
øTable Singleø

11. Form tag:

Other

16. 让内容动起来。

direction 属性:left right down up

behavior 属性:scroll alternate slide

17.

:可以将文本内容按在代码区的样子显示在页面上。 
The form tag is the most commonly used tag and is used for interaction with the server.

: Input tag: Receive user input information.

XHTML   XML

XHTML是可扩展的超文本标记语言(Extensible HyperText Markup Language)。

l  XHTML是w3c组织在2000年的时候为了增强HTML推出的,本来是想替代HTML,但是发现Internet上用HTML写的网页太多,未遂!可以理解为它是HTML一个升级版(HTML4.01)。

l  XHTML的代码结构更为严谨,是基于XML的一种应用。

XML是可扩展标记语言(Extensible Markup Language)

l  XML是对数据信息的描述。HTML是数据显示的描述。

l  XML代码规定的更为严格,如:标签不结束被视为错误。

l  XML规范可以被更多的应用程序所解释,将成为一种通用的数据交换语言。

l  各个服务器,框架都将XML作为配置文件。

The type attribute specifies the type of input tag.

l text box text. The entered text information is displayed directly in the box.
l Password box password. The entered text is displayed as an origin or asterisk. l radio button such as: gender selection. l Checkbox checkbox Such as: interest selection. l Hidden field hidden is not displayed on the page, but is submitted with other content when submitted. l Submit button submit is used to submit the content in the form. l Reset button reset sets the content filled in the form to the initial value. l Button button can have custom events for it. l File upload file will automatically generate a text box and a browse button after expanding the content. l Image image It can replace the submit button.
Header tag
Head tags are placed between the header parts. Includes: title base meta link 12. : Specifies the content displayed in the title bar of the browser. 13. <base>: href attribute: Specifies the directory of all hyperlinks in the web page. It can be a local directory or a network directory. Note that the directory must be represented by / at the end. Only works on hyperlinked files with relative paths. target attribute: Specifies how to open a hyperlink. For example, _blank means that all hyperlinks are opened and displayed in new windows. 14. <meta>: name attribute: description information of the web page. When keywords are retrieved, the content of the content attribute is used as the search engine's keywords for searching. http-equiv attribute: simulates the response header of the HTTP protocol. Example: <meta http-equiv="refresh" content="3;url=http://www.sina.com.cn"> means that you will automatically be redirected to the Sina page after 3 seconds of opening this page. 15. <link>: rel attribute: describes the relationship between the target document and the current document. type attribute: document type. media: Specifies which device the target document will work on. Example: <link rel="stylesheet" type="text/css" media="screen,print" href="a.css">
Other
16. Let the content move. direction attribute: left right down up behavior attribute: scroll alternate slide 17.
: The text content can be displayed as it is in the code area. on the page.  
XHTML XML td>
XHTML is Extensible HyperText Markup Language. l XHTML was launched by the w3c organization in 2000 to enhance HTML. It was originally intended to replace HTML, but it was found that there were too many web pages written in HTML on the Internet, so it failed! It can be understood that it is an upgraded version of HTML (HTML4.01). l XHTML has a more rigorous code structure and is an application based on XML. XML is Extensible Markup Language (Extensible Markup Language) l XML is a description of data information. HTML is the description of the data display. l XML code regulations are more strict. For example, if the tag does not end, it is considered an error. l The XML specification can be interpreted by more applications and will become a universal data exchange language. l Each server and framework uses XML as a configuration file.
Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Difficulty in updating caching of official account web pages: How to avoid the old cache affecting the user experience after version update?Difficulty in updating caching of official account web pages: How to avoid the old cache affecting the user experience after version update?Mar 04, 2025 pm 12:32 PM

The official account web page update cache, this thing is simple and simple, and it is complicated enough to drink a pot of it. You worked hard to update the official account article, but the user still opened the old version. Who can bear the taste? In this article, let’s take a look at the twists and turns behind this and how to solve this problem gracefully. After reading it, you can easily deal with various caching problems, allowing your users to always experience the freshest content. Let’s talk about the basics first. To put it bluntly, in order to improve access speed, the browser or server stores some static resources (such as pictures, CSS, JS) or page content. Next time you access it, you can directly retrieve it from the cache without having to download it again, and it is naturally fast. But this thing is also a double-edged sword. The new version is online,

How to efficiently add stroke effects to PNG images on web pages?How to efficiently add stroke effects to PNG images on web pages?Mar 04, 2025 pm 02:39 PM

This article demonstrates efficient PNG border addition to webpages using CSS. It argues that CSS offers superior performance compared to JavaScript or libraries, detailing how to adjust border width, style, and color for subtle or prominent effect

How do I use HTML5 form validation attributes to validate user input?How do I use HTML5 form validation attributes to validate user input?Mar 17, 2025 pm 12:27 PM

The article discusses using HTML5 form validation attributes like required, pattern, min, max, and length limits to validate user input directly in the browser.

What is the purpose of the <datalist> element?What is the purpose of the <datalist> element?Mar 21, 2025 pm 12:33 PM

The article discusses the HTML <datalist> element, which enhances forms by providing autocomplete suggestions, improving user experience and reducing errors.Character count: 159

What are the best practices for cross-browser compatibility in HTML5?What are the best practices for cross-browser compatibility in HTML5?Mar 17, 2025 pm 12:20 PM

Article discusses best practices for ensuring HTML5 cross-browser compatibility, focusing on feature detection, progressive enhancement, and testing methods.

What is the purpose of the <progress> element?What is the purpose of the <progress> element?Mar 21, 2025 pm 12:34 PM

The article discusses the HTML <progress> element, its purpose, styling, and differences from the <meter> element. The main focus is on using <progress> for task completion and <meter> for stati

What is the purpose of the <meter> element?What is the purpose of the <meter> element?Mar 21, 2025 pm 12:35 PM

The article discusses the HTML <meter> element, used for displaying scalar or fractional values within a range, and its common applications in web development. It differentiates <meter> from <progress> and ex

How do I use the HTML5 <time> element to represent dates and times semantically?How do I use the HTML5 <time> element to represent dates and times semantically?Mar 12, 2025 pm 04:05 PM

This article explains the HTML5 <time> element for semantic date/time representation. It emphasizes the importance of the datetime attribute for machine readability (ISO 8601 format) alongside human-readable text, boosting accessibilit

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
1 months agoBy尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
1 months agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

SublimeText3 Linux new version

SublimeText3 Linux new version

SublimeText3 Linux latest version

MinGW - Minimalist GNU for Windows

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.

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.

VSCode Windows 64-bit Download

VSCode Windows 64-bit Download

A free and powerful IDE editor launched by Microsoft

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor