Properties and applications of HTML+CSS tags

Source: Internet
Author: User

Structured standard language (HTMLhtmlhtml and xmlxmlxmlxmlxmlxmlXML)

Performance standard language (CSS)C

Block-level Tags:div div, ulul, LiLili, dtDL, DL DT ...

Inline Tags: spanspan, inputinput, imgspanimg ...

Behavior Standard language (DOMDom and ECMAScriptecmascripte)

Box model == Cornerstone of Web page layout

Margin (margin) Border (Border Border ) inner margin (padding padding ) Left , Left Right , right, bottom Bottom

If you set the margin (set in a clockwise direction): Give 44 values (top, right, bottom, left), given three values (top, left, and bottom), given a value of two (up, down, around), given a number ( 4 The margin is the same in all directions)

Auto sets the margin width:100%;margin:0 auto on both sides according to the width of the browser; width:100%;margin:0 Auto; If Auto centering is set, the floatfloatfloatfffffloat (floating) or position:absolute; Position:absolute; When the element does not have a width value set, and the Float property is set, the width of the element changes depending on the content.

To clear floating methods:

1.clear -- common clear clear :both ;clear Span style= "Font-family:times New Roman;" >clear :left left clear Span style= "font-family: the song Body;" >:right rightright ;

2. Set widthwidthwidthat the same time: 100%100%width(or fixed width) +overflow+overflow : Hidden;

Horizontal two-column layout

Main application skills: floatfloat Property----------- the block-level elements arranged vertically, horizontally

Absolute positioning layout: implemented by setting the positionposition Property

able to achieve horizontal layout and more complex positioning, there are three types of positioning:1. Static positioning 2. relative positioning 3. Absolute Positioning

You can set 4 property values:

Static (statically positioned)

Relative(relative positioning): Offset relative to its original position, still in the standard document flow, with offset and z-indexz-indexz Properties

Absolute(absolute positioning): establishes a location that is based on the containing block, completely out of the standard document flow, with the offset attribute and the z-index property, and when an element sets an absolute position, the fast read of the element changes as the content changes.

There are no positioned ancestor elements, with as the offset parameter datum, and there are positioned ancestor elements to offset the reference datum from its nearest positioned ancestor element.

fixed (stationary positioning)

Properties and applications of HTML+CSS tags

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.