Generally speaking, the file organization of a standard web page is XHTML CSS. Among them, XHTML is mainly used to represent web page structure and display content, while CSS defines structure layout and modify content style.
The XHTML commonly used for layout generally includes:
DIV: It is mainly used for logical chunking of page content. For example, a web page generally includes responsible partitions such as header, navigation, sidebar, content and copyright. You can use DIV tag segmentation at this time.
At the same time, the following naming is recommended for each block:
The following is the quoted content:
Header: <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: The id is unique, that is, the ID must not appear more than twice on the same page. Otherwise use class.
ul: It was originally an unordered list, and is often used to represent equivalent elements of non-structural classes in XHTML CSS applications. It needs to be used in conjunction with UL's child element LI.
The following is the quoted content:
<div>
<ul>
<li><a href=#>Link1</a></li>
<li><a href=#>Link2</a></li>
<li><a href=#>Link3</a></li>
</ul>
</div>
span: If you compare this element with DIV, then span is a bag and div is a box (referred to as Xiaoyi: the basic application of XHTML code). In fact, div is a block-level element, while span is an inline element (see inline (inline) elements and block-level elements). Through span, a fragment element in a segment or a row element can be defined separately.
for example:
The following is the quoted content:
<ul>
<li><span>(2006-11-13)</span>XHML CSS layout summary</li>
</ul>
Defining span as left/right floating in css can enable the display of date and title on both sides. This is relatively used
The following is the quoted content:
<ul>
<li>2007-11-5VeVb.com</li>
<li>XHML CSS layout summary</li>
</ul>
It's much simpler.
=====================================================
After talking about the common XHTML tags for layout, there are also XHTML tags used to display web page content. for example:
The following is the quoted content:
<img src= alt= title= /> means image
<a href= title=></a> means a hyperlink
<hn></hn>(n=1,2,...,6) indicates the page content title
It is recommended that h1-h6 decrease in order according to its importance, and h1 is the most important title (see greengnn: div css naming reference)
Originally, the labels that represent bold and italics were used, and the labels were selected to use <strong></strong> and <em></em> instead.