XHTML Application of XHTML+CSS layout

Source: Internet
Author: User

The document organization of "Standard webpage" is xhtml+css. Where XHTML is used primarily to represent the Web page structure and display content, CSS defines the layout of the structure and modifies the content style.

XHTML, commonly used in layouts, typically has:

DIV: Mainly for the content of the logic of the page block, such as a Web page generally includes the head, navigation, sidebar, content and copyright division of responsibility. You can now use div tag segmentation.

At the same time for each block suggested that the name:

Head: <div id= "Masthead" ></div>
Navigation: <div id= "Globalnav" ></div>
Sidebar: <div id= "NavBar" ></div>
Content £ <div id= "content" ></div>
Copyright: <div id= "Copyright" ></div>

Note: ID is unique, that is, you must not repeat the ID more than two times on the same page. otherwise use class.

UL: The original is unordered list, in the application of XHTML+CSS is often used to represent the equivalent elements of unstructured classes. Need to be used with the UL element Li.

<div>
<ul>
<li><a href= "#" >Link1</a></li>
<li><a href= "#" >Link2</a></li>
<li><a href= "#" >Link3</a></li>
</ul>
</div>

Note: With the same kind of UL and OL, UL, less use, see detailed
http://www.cnbruce.com/blog/showlog.asp?cat_id=5&log_id=866

Span: If you compare this element with a div, then span is a bag and the div is a box (a little Yi: the basic application of XHTML code). In fact, a DIV is a block-level element, and span is an inline element (see About inline (in-line) elements, block-level elements), which can be defined individually by span for a fragment element in a set of one or a line of elements.

Like what:

<ul>
<li><span> (2006-11-13) </span>xhml+css layout of XHTML application Summary </li>
</ul>

Defining a span as a left/right float in a CSS enables you to display both the date and the caption. This relative use

<ul>
<li>2006-11-13</li>
<li>xhml+css Layout Summary </li>
</ul>

be much simpler.

=======================================

After saying the usual XHTML tags for layout, there are XHTML tags that show the content of the Web page. Like what:

Represents an image

<a href= "" title= "" "></a> means hyperlink

It suggests that H1-h6 is descending according to importance, H1 is the most important title (see Greengnn:div+css named Reference)

Originally used <b></b> and <i></i> to indicate bold and italic labels, choose to use <strong></strong> and <em></em> Replace.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.