A summary of XHTML applications for XHTML+CSS layouts

Source: Internet
Author: User
Css|xhtml, the "standard Web page" file organization 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:It is mainly used for the logical partition of the content of the page, such as the head, navigation, sidebar, content and copyright. 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:It was originally a unordered list, and it is commonly used in XHTML+CSS applications 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 (language Small Yi: The basic application of XHTML code)。 In fact, Div is a block-level element, and span is an inline element (see about inline (in-line) elements, block-level elements, a fragment element in a section or set of elements can be defined separately through span.

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 is suggested that H1-h6 be decremented according to importance, H1 as the most important title (see greengnn:div+css naming 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.