Home  >  Article  >  Web Front-end  >  Organizing common tags in XHTML_HTML/Xhtml_Web page production

Organizing common tags in XHTML_HTML/Xhtml_Web page production

WBOY
WBOYOriginal
2016-05-16 16:36:151174browse

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
.
Close XHTML tags
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 browsers can recognize unclosed tags, closing tags is necessary from a regulatory and long-term perspective.

Commonly used XHTML tags
tag
This tag indicates that this is an hmtl (xhtml) document. Except for the XHTML file type declaration, everything else All XHTML tag elements must be embedded within this tag.

XML/HTML CodeCopy content to clipboard
  1. <html>
  2. <head> ... head>
  3. <body>
  4. <p>Text paragraphs and other text contentsp> 
  5. body>
  6. html>

tag
indicates the header information of the XHTML document. This information is usually required by the browser and for XHTML Additional description of the document, such as CSS styles or other script information loaded by the document.

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 nested in < ;head>.

XML/HTML CodeCopy content to clipboard
  1. <head>
  2. <title>XHTML Tag - XHTML Tutorialtitle>
  3. head>
  4. <body>body> Tags

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

-

respectively.

XML/HTML CodeCopy content to clipboard
  1. <h1>Level 1 title h1>
  2. <h1>Level 2 title h1>
  3. <h1>Third-level heading h1>

Note that this title is not a title, but typically <h1> is at its core equivalent to <title> </p> <p><strong>XHTML paragraph<br></strong>XHTML paragraph is defined by the <p></p> tag: <br></p> <div class="codeText"> <div class="codeHead"> <span class="lantxt">XML/HTML Code</span><span style="CURSOR: pointer" class="copyCodeText" onclick="copyIdText('code_4556')">Copy content to clipboard</span> </div> <div id="code_4556"> <ol class="dp-xml"> <li class="alt"><span><span class="tag"><</span><span class="tag-name">p</span><span class="tag">></span><span>This is a paragraph</span><span class="tag"></</span><span class="tag-name">p</span><span class="tag">></span><span> </span></span></li> </ol> </div> </div> <p><strong>XHTML hyperlink<br></strong>XHTML hyperlink is defined by the <a></a> tag: <br></p> <div class="codeText"> <div class="codeHead"> <span class="lantxt">XML/HTML Code</span><span style="CURSOR: pointer" class="copyCodeText" onclick="copyIdText('code_2790')">Copy content to clipboard</span> </div> <div id="code_2790"> <ol class="dp-xml"> <li class="alt"><span><span class="tag"><</span><span class="tag-name">a</span><span> </span><span class="attribute">href</span><span>=</span><span class="attribute-value">"http://www .jb51.net"</span><span class="tag">></span><span>5iDev Web Development Online Tutorial</span><span class="tag"></</span><span class="tag-name">a</span><span class="tag">></span><span> </span></span></li> </ol> </div> </div> <p><strong>XHTML images<br></strong>XHTML images are defined with the <img> tag: <br></p> <div class="codeText"> <div class="codeHead"> <span class="lantxt">XML/HTML Code</span><span style="CURSOR: pointer" class="copyCodeText" onclick="copyIdText('code_4498')">Copy content to clipboard</span> </div> <div id="code_4498"> <ol class="dp-xml"> <li class="alt"><span><span class="tag"><</span><span class="tag-name">img</span><span> </span><span class="attribute">src</span><span>=</span><span class="attribute-value">"flower.jpg"</span><span> </span><span class="attribute">alt</span><span>=</span><span class="attribute-value">"花"</span><span> </span><span class="tag">/></span><span> </span></span></li> </ol> </div> </div> <p>In this tag, provide the image source with the src attribute, and the tag will display the flower.jpg image in the browser. </p> <p><strong>XHTML form<br></strong>XHTML form is used to collect user input information, such as user comments, etc. The form is defined by <form></form>: <br></p> <div class="codeText"> <div class="codeHead"> <span class="lantxt">XML/HTML Code</span><span style="CURSOR: pointer" class="copyCodeText" onclick="copyIdText('code_8737')">Copy content to clipboard</span> </div> <div id="code_8737"> <ol class="dp-xml"> <li class="alt"><span><span class="tag"><</span><span class="tag-name">form</span><span class="tag">></span><span> </span></span></li> <li><span>Various form elements (text fields, drop-down lists, radio buttons, check boxes, etc.) </span></li> <li class="alt"> <span></span><span class="tag"></</span><span class="tag-name">form</span><span class="tag">></span><span> </span> </li> </ol> </div> </div></div><div class="nphpQianMsg"><div class="clear"></div></div><div class="nphpQianSheng"><span>Statement:</span><div>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</div></div></div><div class="nphpSytBox"><span>Previous article:<a class="dBlack" title="Examples to explain some usage techniques of META tags in HTML_HTML/Xhtml_Web page production" href="https://m.php.cn/faq/10898.html">Examples to explain some usage techniques of META tags in HTML_HTML/Xhtml_Web page production</a></span><span>Next article:<a class="dBlack" title="Examples to explain some usage techniques of META tags in HTML_HTML/Xhtml_Web page production" href="https://m.php.cn/faq/10902.html">Examples to explain some usage techniques of META tags in HTML_HTML/Xhtml_Web page production</a></span></div><div class="nphpSytBox2"><div class="nphpZbktTitle"><h2>Related articles</h2><em><a href="https://m.php.cn/article.html" class="bBlack"><i>See more</i><b></b></a></em><div class="clear"></div></div><ul class="nphpXgwzList"><li><b></b><a href="https://m.php.cn/faq/348757.html" title="Summary of Html knowledge" class="aBlack">Summary of Html knowledge</a><div class="clear"></div></li><li><b></b><a href="https://m.php.cn/faq/348804.html" title="How to learn HTML quickly" class="aBlack">How to learn HTML quickly</a><div class="clear"></div></li><li><b></b><a href="https://m.php.cn/faq/348873.html" title="The difference between html xhtml xml" class="aBlack">The difference between html xhtml xml</a><div class="clear"></div></li><li><b></b><a href="https://m.php.cn/faq/348884.html" title="The difference between src and href attributes" class="aBlack">The difference between src and href attributes</a><div class="clear"></div></li><li><b></b><a href="https://m.php.cn/faq/348902.html" title="About HTML5 and CSS replacement use" class="aBlack">About HTML5 and CSS replacement use</a><div class="clear"></div></li></ul></div></div><footer><div class="footer"><div class="footertop"><img src="/static/imghwm/logo.png" alt=""><p>Public welfare online PHP training,Help PHP learners grow quickly!</p></div><div class="footermid"><a href="https://m.php.cn/about/us.html">About us</a><a href="https://m.php.cn/about/disclaimer.html">Disclaimer</a><a href="https://m.php.cn/update/article_0_1.html">Sitemap</a></div><div class="footerbottom"><p> © php.cn All rights reserved </p></div></div></footer><script>isLogin = 0;</script><script type="text/javascript" src="/static/layui/layui.js"></script><script type="text/javascript" src="/static/js/global.js?4.9.47"></script></div><script src="https://vdse.bdstatic.com//search-video.v1.min.js"></script><link rel='stylesheet' id='_main-css' href='/static/css/viewer.min.css' type='text/css' media='all'/><script type='text/javascript' src='/static/js/viewer.min.js?1'></script><script type='text/javascript' src='/static/js/jquery-viewer.min.js'></script><script>jQuery.fn.wait = function (func, times, interval) { var _times = times || -1, //100次 _interval = interval || 20, //20毫秒每次 _self = this, _selector = this.selector, //选择器 _iIntervalID; //定时器id if( this.length ){ //如果已经获取到了,就直接执行函数 func && func.call(this); } else { _iIntervalID = setInterval(function() { if(!_times) { //是0就退出 clearInterval(_iIntervalID); } _times <= 0 || _times--; //如果是正数就 -- _self = $(_selector); //再次选择 if( _self.length ) { //判断是否取到 func && func.call(_self); clearInterval(_iIntervalID); } }, _interval); } return this; } $("table.syntaxhighlighter").wait(function() { $('table.syntaxhighlighter').append("<p class='cnblogs_code_footer'><span class='cnblogs_code_footer_icon'></span></p>"); }); $(document).on("click", ".cnblogs_code_footer",function(){ $(this).parents('table.syntaxhighlighter').css('display','inline-table');$(this).hide(); }); $('.nphpQianCont').viewer({navbar:true,title:false,toolbar:false,movable:false,viewed:function(){$('img').click(function(){$('.viewer-close').trigger('click');});}}); </script></body></html>