Another important aspect of separating structure and presentation is the use of semantic markup to structure document content. The presence of an XHTML element means that the portion of the marked content has a corresponding structural meaning, and there is no reason to use other markup. In other words, don't let CSS make one HTML element look like another HTML element, such as using a
tag heading.
First of all, it’s about the difference between semantics and default styles. The default style is the expression of some commonly used tags set by the browser. I personally think its main purpose is to let everyone intuitively understand tags (markup). And the purpose and function of attributes, it is obvious that the Hx series looks a lot like titles, because it has bold fonts and larger font sizes. , are used to distinguish them from other words and play a role in emphasis. Lists and tables clearly tell you what they do.
Secondly, the most important benefit of semantic web pages is that they are friendly to search engines. With good structure and semantics, your web page content will naturally be easily crawled by search engines, and you can save money on the promotion of your website. Put in a lot of effort.
The specific semantics and uses have been explained in the XHTML1.0 TAG reference. Some TAGS and attributes that are easily forgotten or confused are supplemented here. ,
,
,
,
,
is the highest level.
For example:
<font face="NSimsun"><h1>Document Title</h1><code><font face="NSimsun"><h1>文档标题</h1><br><h2>次级标题</h2></font>
as a paragraph, you will no longer use
to break lines. And there is no need for
to distinguish paragraphs from paragraphs. The text in
<font face="NSimsun"><p>Blue Idea www.blueidea.com was born in October 1999. From the beginning of its establishment, Blue Ideal has been aiming to build a home for website designers and developers, with the main content of introducing network development technology and website creation and design exchanges. The content of its website is well-produced. Tutorials carefully crafted by members are released every day, selflessly helping netizens. It has also held many design competitions and developed many related programs that are still used by many websites. The published works and reviews have attracted the attention of many media and praised by experts, and at the same time established their social status. As a result, batch after batch of Internet colleagues have joined Blue Ideal, becoming the largest design site in China. one. <code><font face="NSimsun"><p>蓝色理想 www.blueidea.com 诞生于1999年的10月。从成立之初,蓝色理想就以建设网站设计与开发人员之家为宗旨,以介绍网络开发技术与网站创作设计交流为主要内容。其网站内容制作精良,每天都会有会员精心制作的教程发布,无私地对网友进行帮助,而且还举办过不少设计比赛并开发了很多目前仍被许多网站应用的相关程序。而所发布的作品与点评受到了多家媒体关注及行家的好评,同时也从中确立了自己的社会地位,于是一批又一批的网络同仁加盟了蓝色理想,成为国内最大的设计类站点之一。 <br></p><br><p>多年来,蓝色理想的内容不断充实,先后被国内一些知名网站、传统媒体重点推介过,并陆续被Google、百度、雅虎、搜狐、新浪、Excite等各大搜索站点收藏,并在Google、百度、Yahoo三大搜索引擎中以简体汉字关键词"网站设计与开发”搜索排名均为第一,现在蓝色理想已发展成为国内影响最大的网站设计、开发的专业网站之一。</p></font>
Over the years, the content of Blue Ideal has been continuously enriched, and has been promoted by some well-known domestic websites and traditional media, and has been successively promoted by Google, Baidu, Yahoo, Sohu, It has been collected by major search sites such as Sina and Excite, and ranked first in the search rankings for the keyword "website design and development" in simplified Chinese in the three major search engines of Google, Baidu, and Yahoo. Now Blue Ideal has developed into one of the most influential in the country. One of the professional websites for website design and development.
<font face="NSimsun"><ul><br><li>项目一</li><br><li>项目二</li><br><li>项目三</li><br></ul></font>
<font face="NSimsun"><ul></font>
<font face="NSimsun"><ol><br><li>第一章</li><br><li>第二章</li><br><li>第三章</li><br></ol></font>
<font face="NSimsun"><dl><code><font face="NSimsun"><dl><br><dt>Dog</dt><br><dd>A carnivorous mammal of the family Canidae.</dd><br></dl> </font>
<font face="NSimsun"><dl><br><dt>上海滩</dt><br><dd>这部拍摄于1980年的《上海滩》堪称是香港电视史上最成功、最经典的剧集。<br>当年在香港播出以后,产生了巨大的轰动效应。</dd><br><dt>周润发</dt><br><dd>和所有伟大的影星一样,周润发印证了一个时代,一个香港电影的黄金时代。<br>风衣墨镜、冷血双枪、阳光微笑,都封存胶片之中,当我们回首寻望的时候,发哥已被刻为一个时代的坐标。</dd><br></dl></font>
Code:<font face="NSimsun"><dl><strong><dt>Shanghai Beach</dt></strong><dd>This "Shanghai Beach" filmed in 1980 can be called The most successful and classic drama series in the history of Hong Kong television. <br>After it was broadcast in Hong Kong, it created a huge sensation. </dd><br><dt>Chow Yun-fat</dt><br><dd>Like all great movie stars, Chow Yun-fat confirmed an era, a golden age of Hong Kong movies. <br>The windbreaker and sunglasses, the cold-blooded guns, and the sunny smile are all sealed in the film. When we look back, Fa Ge has been engraved as the coordinate of an era. </dd><br></dl></font>
,Forums and blogs often use quotations from others, and use
to mark short single-line quotes. . Web browsers will automatically recognize content between. Unfortunately, IE doesn't recognize it, and sometimes,can cause some accessibility issues. Because of this, some people recommend that you avoid usingand manually insert citation tags. By adding a single line of reference content within a containing the appropriate class, you can style the reference with CSS, but this has no semantic meaning. You can read The Q tag (http://diveintomark.org/archives/2002/05/04/the_q_tag) written by Mark Pilgrim for his views on dealing withrelated issues.<font face="NSimsun"><cite>Designing with Web Standards</cite> is an excellent book by Jeffrey Zeldman.</font>
For long quotes of one or more paragraphs, use. CSS can be used to define styles for references. Note that a paragraph of article cannot be placed directly in, the quoted content must also be included in an element, usually. The cite attribute can be used with both
andto provide the source address of the quoted content. It should be noted that if you use instead ofto mark reference content, then you cannot use the cite attribute.
<font face="NSimsun"><p> <cite>孔子</cite>曰:<q>学而不思则罔,思而不学则殆</q>.</p></font>
<font face="NSimsun"><p>The W3C says that <q cite="http://www.w3.org/TR/REC-html40/<br />struct/text.html#h-9.2.1">The presentation of phrase elements<br>depends on the user agent.</q>.</p></font>
<font face="NSimsun"><p>The W3C says that <q cite="http://www.w3.org/TR/REC-html40/<🎜>struct/text.html# h-9.2.1">The presentation of phrase elementsdepends on the user agent.</q>.</p></font>
<font face="NSimsun"><blockquote cite="http://www.w3cn.org/"><br><p>“我们大部分人都有深刻体验,每当主流浏览器版本的升级,我们刚建立的网站就可能变得过时,<br> 我们就需要升级或者重新建造一遍网站。例如1996-1999年典型的"浏览器大战",<br> 为了兼容 Netscape 和 IE,网站不得不为这两种浏览器写不同的代码。同样的,<br> 每当新的网络技术和交互设备的出现,我们也需要制作一个新版本来支持这种新技术或新设备,<br> 例如支持手机上网的 WAP 技术。类似的问题举不胜举:网站代码臃肿、繁杂浪费了我们大量的带宽;<br> 针对某种浏览器的 DHTML 特效,屏蔽了部分潜在的客户;不易用的代码,残障人士无法浏览网站等等。<br> 这是一种恶性循环,是一种巨大的浪费。”</p><br></blockquote></font>
<font face="NSimsun"><p><em>Text that emphasizes</em> is usually italicized,<code><font face="NSimsun"><p><em>强调</em> 的文本通常用斜体显示,<br>然而, <strong>特别强调</strong> 的文本通常以粗体显示。</p></font>
However, text that emphasizes Usually shown in bold.
, | , Tables in XHTML should not be used for layout. However, if you are labeling list data, you should use tables. is the title of the table, the attribute summar is the summary, the | | tag is the main content of the table, and the tag is the tail of the table. . |
---|---|---|---|
Configurations | Dual 1.8GHz | Dual 2GHz | < th scope="col" abbr="Dual 2.5">Dual 2.5GHz|
Model | M9454LL/A | M9455LL/A | M9457LL /A |
G5 Processor | Dual 1.8GHz PowerPC G5 | Dual 2GHz PowerPC G5 | Dual 2.5GHz PowerPC G5 |
Frontside bus | 900MHz per processor | 1GHz per processor | 1.25GHz per processor< ;/td> |
Level2 Cache | 512K per processor | 512K per processor | 512K per processor |
</strong><br><br> means computer code. The default style is typeface. Often encountered in technical forums and blogs. <br>For example:
<div class="blockcode">
<em>Copy content to clipboard</em>
<h5>Code:</h5>
<code><font face="NSimsun"><code>p{margin:2px 0;}
<font face="NSimsun"><abbr title="Cascading Style Sheets">CSS</abbr></font>
<font face="NSimsun"><acronym title="Cascading Style Sheets">CSS</acronym ></font>
<font face="NSimsun"><img src="/img/common/logo.gif" width="90" height="27" alt="bluediea.com"></font>
<font face="NSimsun"><a href="http://www.jluvip.com/blog/article.asp?id=260" title="js获取单选按钮的数据">js获取单选按钮的数据</a></font>