Posts Tagged ‘XHTML’

W3C XHTML1.0验证常见错误

Friday, August 22nd, 2008

一、在 <div class=tzh>I am TZH!</div> 这段语句中有什么错误?

标点符号问题。这其实也是大家最容易忽视的问题,其实就是小小的两个引号,就造成了这个错误。虽然很多浏览器在不加引号的情况下仍然能正确识别渲染。但是这样想要通过严格的W3C XHTML国际标准是不可能的,请大家记住等号后面一定要接引号。正确写法:<div class=”tzh”>I am TZH!</div>

二、在 <SPAN class=”tzh”>TZH is me!</SPAN> 这段语句中有什么错误?

大小写注意。这和第一个问题一样,都是特别容易忽视的细节问题。在W3C标准中是绝对不允许大写的,其中我仍记得我在检测一段javascript代码的时候,由于为了让自己一目了然写出的onLoad也被判断成了错误,原因就是L不能大写。正确写法:<span class=”tzh”>TZH is me!</span> Read more»

XHTML1.0中允许使用的HTML元素

Thursday, August 7th, 2008

<!–…–> Defines a comment
<!DOCTYPE>  Defines the document type
<a> Defines an anchor
<abbr> Defines an abbreviation
<acronym> Defines an acronym
<address> Defines an address element
<applet> Deprecated. Defines an applet
<area> Defines an area inside an image map
<b> Defines bold text
<base> Defines a base URL for all the links in a page
<basefont> Deprecated. Defines a base font
<bdo> Defines the direction of text display
<big> Defines big text
<blockquote> Defines a long quotation
<body> Defines the body element
<br> Inserts a single line break
<button> Defines a push button
<caption> Defines a table caption
<center> Deprecated. Defines centered text
<cite> Defines a citation
<code> Defines computer code text
<col> Defines attributes for table columns
<colgroup> Defines groups of table columns
<dd> Defines a definition description
<del> Defines deleted text
<dir> Deprecated. Defines a directory list
<div> Defines a section in a document
<dfn> Defines a definition term 
<dl> Defines a definition list
<dt> Defines a definition term
<em> Defines emphasized text
<fieldset> Defines a fieldset 
<font> Deprecated. Defines text font, size, and color
<form> Defines a form 
<frame> Defines a sub window (a frame)
<frameset> Defines a set of frames
<h1> to <h6> Defines header 1 to header
<head> Defines information about the document
<hr> Defines a horizontal rule 
<html> Defines an html document 
<i> Defines italic text
<iframe> Defines an inline sub window (frame) 
<img> Defines an image
<input> Defines an input field
<ins> Defines inserted text
<isindex> Deprecated. Defines a single-line input field
<kbd> Defines keyboard text 
<label> Defines a label for a form control
<legend> Defines a title in a fieldset
<li> Defines a list item
<link> Defines a resource reference
<map> Defines an image map
<menu> Deprecated. Defines a menu list
<meta> Defines meta information
<noframes> Defines a noframe section 
<noscript> Defines a noscript section 
<object> Defines an embedded object
<ol> Defines an ordered list
<optgroup> Defines an option group
<option> Defines an option in a drop-down list
<p> Defines a paragraph
<param> Defines a parameter for an object
<pre> Defines preformatted text
<q> Defines a short quotation
<s> Deprecated. Defines strikethrough text
<samp> Defines sample computer code
<script> Defines a script
<select> Defines a selectable list
<small> Defines small text
<span> Defines a section in a document
<strike> Deprecated. Defines strikethrough text
<strong> Defines strong text
<style> Defines a style definition
<sub> Defines subscripted text
<sup> Defines superscripted text
<table> Defines a table
<tbody> Defines a table body 
<td> Defines a table cell
<textarea> Defines a text area 
<tfoot> Defines a table footer 
<th> Defines a table header 
<thead> Defines a table header
<title> Defines the document title
<tr> Defines a table row
<tt> Defines teletype text 
<u> Deprecated. Defines underlined text
<ul> Defines an unordered list 
<var> Defines a variable
<xmp> Deprecated. Defines preformatted text

优化了博客代码

Saturday, August 2nd, 2008

忙了一个上午,对博客进行了代码优化,修复了几个小毛病,现在基本正常了!

1、修改了网页代码中一些重复的部分,删除了几个冗杂的代码。

2、对CSS代码进行精简优化,删除了一些重复的代码。

3、修复了标题下面背景图的定位,在IE 6.0和Firefox 2.0中测试正常。

4、网页代码符合XHTML 1.0 Transitional标准,target属性和雅虎统计代码不符合XHTML 1.0 Strict标准。

5、CSS代码符合CSS 2.1和CSS3.0标准。