Other common tags in HTML
1.
2.
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.
3. :
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 opening this page for 3 seconds.
4. :
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" />
direction attribute: left right down up
behavior attribute: scroll alternate slide
: The text content can be displayed on the page as it appears in the code area . </p><h2>3. Classification of tags</h2><p class="sycode"><br/></p><pre class="brush:html;toolbar:false;"> 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> 2 <html> 3 <head> 4 <meta http-equiv="Content-Type" content="text/html; charset=GBK"> 5 <title>Untitled Document</title> 6 </head> 7 <body> 8 <p>这是一个p区域1</p> 9 <p>这是一个p区域2</p> 10 <span>span区域1</span> 11 <span>span区域2</span> 12 <p>这是一个段落1</p> 13 <p>这是一个段落2</p> 14 15 <!-- 16 标签分为两大类。 17 1,块级标签(元素):标签结束后都有换行。p p dl table title ol ul 18 2,行内标签(元素):标签结束后没有换行。 font span img input select a 19 --> 20 <dl> 21 <dt>ddddd</dt> 22 <dd>eeeee</dd> 23 </dl> 24 hahahahh 25 </body> 26 </html>
p has no direct meaning, it just encapsulates the data, and you can use other languages defined by us. operate. Usually p+css.
sapn is also such a tag, except that the span tag is an inline tag and p is a block-level tag.
p is a paragraph tag, not only line breaks, but also blank lines before and after.
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.
Each server and framework uses XML as a configuration file.
The above is the detailed content of Sharing about other common tags in html. For more information, please follow other related articles on the PHP Chinese website!