检视 HTML 代码应具备那些知识?
当检视代码时,你可以会看到以下内容: 基本元素 内容结构 内容格式 链接与图片 分隔元素 清单 背景与色彩 表格 基本元素 Document Type <HTML></HTML> (beginning and end of file) Title <TITLE></TITLE> (must be in header) Header <HEAD></HEAD> (descriptive info, such as title) Body <BODY></BODY> (bulk of the page) 内容结构 Heading <H?></H?> (the spec. defines 6 levels) Align Heading <H? ALIGN=LEFT|CENTER|RIGHT></H?> Division <DIV></DIV> Align Division <DIV ALIGN=LEFT|RIGHT|CENTER|JUSTIFY></DIV> Defined Content <SPAN></SPAN> Block Quote <BLOCKQUOTE></BLOCKQUOTE> (usually indented) Emphasis <EM></EM> (usually displayed as italic) Strong Emphasis <STRONG></STRONG> (usually displayed as bold) Citation <CITE></CITE> (usually italics) Code <CODE></CODE> (for source code listings) Variable <VAR></VAR> Definition <DFN></DFN> (not widely implemented) Author's Address <ADDRESS></ADDRESS> Large Font Size <BIG></BIG> Large Font Size <SMALL></SMALL> 内容格式 Bold <B></B> Italic <I></I> Underline <U></U> (not widely implemented) Strikeout <STRIKE></STRIKE> (not widely implemented) Strikeout <S></S> (not widely implemented) Subscript <SUB></SUB> Superscript <SUP></SUP> Preformatted <PRE></PRE> (display text spacing as-is) Center <CENTER></CENTER> (for both text and images) Font Size <FONT SIZE=?></FONT> (ranges from 1-7) Font Color <FONT COLOR="#$$$$$$"></FONT> Select Font <FONT FACE="***"></FONT> Weight <FONT WEIGHT=?></FONT> Marquee <MARQUEE></MARQUEE> 链接与图片 Link Something <A HREF="URL"></A> Link to Location <A HREF="URL#***"></A> (if in another document) <A HREF="#***"></A> (if in current document) Target Window <A HREF="URL" TARGET="***"></A> Link to Email <A HREF="mailto:@"></A> Specify Subject <A HREF="mailto:@?SUBJECT=***"></A> (use a real question mark) Define Location <A NAME="***"></A> Display Image <IMG SRC="URL"> Alignment <IMG SRC="URL" ALIGN=TOP|BOTTOM|MIDDLE|LEFT|RIGHT> Alignment <IMG SRC="URL" ALIGN=TEXTTOP|ABSMIDDLE|BASELINE|ABSBOTTOM> Alternate <IMG SRC="URL" ALT="***"> (if image not displayed) Dimensions <IMG SRC="URL" WIDTH=? HEIGHT=?> (in pixels) <IMG SRC="URL" WIDTH=% HEIGHT=%> (as percentage of page width/height) Border <IMG SRC="URL" BORDER=?> (in pixels) Runaround Space <IMG SRC="URL" HSPACE=? VSPACE=?> (in pixels) Imagemap <IMG SRC="URL" USEMAP="URL"> Client-Side Map <MAP NAME="***"></MAP> (describes the map) Map Section <AREA SHAPE="DEFAULT|RECT|CIRCLE|POLY" COORDS=",,," HREF="URL"|NOHREF> 分隔元素 Paragraph <P></P> (closing tag often unnecessary) Align Text <P ALIGN=LEFT|CENTER|RIGHT></P> Justify Text <P ALIGN=JUSTIFY></P> Line Break <BR> (a single carriage return) Clear Textwrap <BR CLEAR=LEFT|RIGHT|ALL> Horizontal Rule <HR> Alignment <HR ALIGN=LEFT|RIGHT|CENTER> Thickness <HR SIZE=?> (in pixels) Width <HR WIDTH=?> (in pixels) Width Percent <HR WIDTH="%"> (as a percentage of page width) 清单 Unordered List <UL><LI></UL> (<LI> goes before each list item) Compact <UL COMPACT></UL> Bullet Type <UL TYPE=DISC|CIRCLE|SQUARE> (for the whole list) Bullet Type <LI TYPE=DISC|CIRCLE|SQUARE> (this & subsequent) Ordered List <OL><LI></OL> (<LI> goes before each list item) Numbering Type <OL TYPE=A|a|I|i|1> (for the whole list) Numbering Type <LI TYPE=A|a|I|i|1> (this & subsequent) Starting Number <OL START=?> (for the whole list) Starting Number <LI VALUE=?> (this & subsequent) Definition List <DL><DT
General Questions 八月 9, 2018