Summary of CSS Knowledge points

Source: Internet
Author: User
Tags html form

In the layout of a Web page, such as the title of the article List, no matter how much text does not want to wrap the display, you need to force on the line to display the content. This can be achieved by nobr tags.

First, nobr grammar

<nobr> content </nobr>

The non-wrapping content is placed between <nobr> and </nobr>.

This tag is the same as the CSS White-space feature.

HTML form <label> tag basic syntax structure and use case tutorial

The use of label labels is encountered in the form layout, and the label does not have any style effects and has the ability to trigger the corresponding form control.
For example, we can click on the radio button or the text corresponding to the selection box options to be selected, this is the text plus <label> tag implementation.

HTML superscript:<sup> floating content </sup>
HTML subscript:<sub> Float content </sub>

Usually a pair of spans that do not have any style set, aspect is the adaptive content, how much more, how much space this label occupies.

The layout labels commonly used in the pan in HTML differ from the div tags in that span takes up aspect space with content (close to the content), while a pair of div tags occupies one line.

First of all, the same thing is that BR and P are both properties and meanings that have line breaks.
Second, the difference between <br/> is just a single use, while <p> and </p> are a pair of use
Again, the BR tag is a small newline bhakta, and the P tag is a big line break (segment) for each row.

P and BR all have a newline effect, the P tag is a paragraph label, and BR is a forced newline label.

HTML Strikethrough application Syntax:

<s>www.divcss5.com</s>

The HTML HR horizontal line feature is a 100%-width horizontal divider, and an exclusive line, the HR level will be a certain distance from the top and bottom content.

H1 is best used only once in a Web page, such as a unique title for a Web page.
H2, H3, H4 tags can appear multiple times in a Web page, but it is necessary to add or add too much.

After using submit, the page supports keyboard enter operations, while many web software designers may not notice the submit unification.

The page does not support the ENTER key after the button is used. Therefore, you need to support the ENTER key, you must set a submit, the default enter key to the first submit to the page operation.

Normally using left, right, top, bottom are not valid, and you need to use the absolute position CSS position style to take effect.

Generally left and right in a style can only be used in one, can not be set to left, and you do not have to use leave, or you use it to leave with right, or if you are using it, the compatibility problem will occur. An object is set to the left side of how much distance, natural right distance is naturally there is no need to set the left.

. divcss5{text-indent:25px}
Here, the first line of the paragraph in the Divcss5 object is indented 25 pixels in the beginning text.

CSS text-indent text indent style attribute words, text-indent values are indented with numbers + units.

CSS code: *{padding:0; margin:0; font-family: "Blackbody"}

The CSS code in the above DIV+CSS means: Set the CSS style for all the tag members in the page HTML to padding to 0,margin to 0 and the font to bold.
This eliminates the need to set up CSS stylesheets for different tag elements of the page as before, so that CSS styles for HTML tag elements are fully set and initialized.

Use the CSS style attribute word text-indent header distance, letter-spacing word and word spacing.

If you want the div layout to be centered in the browser, adding margin:0 Auto cannot join float floating style, avoid logic errors and cause the layout to be centered incompatible.

Regardless of the height of the large div box, the small div box is positioned close to the bottom of the large div under the large div box. Generally, this is an indeterminate layout requirement, which is usually achieved using CSS absolute positioning layouts. Absolute positioning commonly used methods, the parent div set position:relative, the child div set Position:absolute, you can then set the child div left or right, top or bottom can be located in the parent of any position.

The main CSS code needed is two, one is text-align:center (content Center), the other is margin:0 auto, and its two styles need to be used in order to achieve the center display layout of Div box.

Many browsers have bugs when displaying a float element that does not have a width specified. So regardless of the contents of the float element, be sure to specify the width property for it. When specifying an element, use EM instead of PX as a unit.

IE has a bug when displaying float elements that specify margin and padding. Therefore, do not specify the margin and padding properties on the float element (you can nest a div inside a float element to set margin and padding). You can also use the Hack method to specify special values for IE.

DIV CSS inheritance refers to the CSS style that we set the ancestor (parent) to, and the parent and child (subordinate) with this property. Generally only text text has inherited characteristics, such as text size, text bold, text color, font and so on.

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.