What are XHTML tags?
XHTML tag elements are the basic building blocks of XHTML documents. XHTML tags can be understood as the tags used by the XHTML language to define "what this is, what that is" in an XHTML document.
XHTML tags are keywords surrounded by angle brackets, often appearing in pairs, such as . This tag indicates that this is an hmtl (xhtml) document. The first tag in a tag pair is the start tag, and the second tag is the end tag.
There are also a small number of tags that are not paired or have no end tags, such as line break tags
.
XHTML tag closing
In the XHTML specification, all tags must be closed. Usually paired tags are closed with a closing tag, and unpaired tags are closed with a space plus />, such as
.
Although the browser can recognize unclosed tags, from a regulatory and long-term perspective, closing tags is necessary.
Commonly used XHTML tags
tag
This tag indicates that this is an hmtl (xhtml) document, except for the XHTML file type declaration , all other XHTML tag elements must be embedded within this tag.
<html> <head> ... </head> <body> <p>文字段落等正文内容</p> </body> </html>
Tag
This tag defines the title of the entire XHTML document and is used to display in the title bar at the top of the browser window. This tag is embedded Nested within
<head> <title>XHTML 标签 - XHTML教程</title> </head> <body></body>标签
As the name suggests, this tag describes the body content of the XHTML document, and all the body content that needs to be displayed is included in this tag.
XHTML Title
XHTML document title is divided into 6 levels, defined by
<h1>一级标题</h1> <h1>二级标题</h1> <h1>三级标题</h1>
Note that this title is not a
XHTML paragraph
XHTML paragraph defined by
<p>这是一个段落</p>
XHTML hyperlink
XHTML hyperlink defined by< /a> Tag definition:
<a href="//m.sbmmt.com">5iDev Web开发在线教程</a>
XHTML image
XHTML image is defined through the tag:
<img src="flower.jpg" alt="花" />
In this tag, provide the image source with the src attribute, and the tag will display the flower.jpg image in the browser.
XHTML form
##
<form> 各种表单元素(文本域、下拉列表、单选框、复选框等) </form>