[Note] highlights of HTML + CSS (occasionally updated) and summary of css

Source: Internet
Author: User

[Note] highlights of HTML + CSS (occasionally updated) and summary of css

1. When a td occupies multiple rows/columns, the trended td is not written (but the tr of the td package must be written)

2. display: Text in the td element is vertical by default, not centered (text in td in table is vertical)

3. th, although the header title is defined, does not span rows by default (colspan is required for cross rows)

4. text-indent can be inherited

5. <form> </form> is a block element.

6. <table> </table> is a block element, but the width is not the width100 % of its parent element by default.

7. When the total width of td is greater than the specified table width

8. <label for = "name"> text A </label> where the for value can be the name and id name, the name is from the <a name = "I can have a name" id = "or I can have an ID"> </a> tag, id name comes from all tags (<div> I only have id, so it is best not to give me a name </div>)

9. <body> </body> is a strange element. Its default width is adaptive, and the background color is displayed in full screen!

10. line-height is used for vertical center of a single line of text, and <span> </span> is used for vertical center of multiple lines of text, followed by vertical-align: middle;

11. text that overflows with the same level of elements will be squeezed, And the overflow images and element boxes will not squeeze the same level of elements.

12. width/height = 100% when the width of the parent element is not set, there is no width (the ancestor element will not be searched up)

13. Fixed-width/fixed-height la s will not be scaled and scaled in hours.

14. document loading and rendering are carried out from top to bottom, so the CSS selector does not select up (brother element, parent element, ancestor element)

15. The color attribute can be inherited.

16. inherit allows the child element to inherit the value of the parent element from the specified CSS attribute. If the parent element does not set a value (such as a height value ), it does not inherit the attribute value of the ancestor element (many attributes are not inherited by default, such as height, so you need to add inherit to inherit it)

17. The frame and body do not coexist. Although iframe and body coexist, some problems may occur (website ranking and style rendering problems)

18. Fill in the value in border-radius in pixels and fill in percentages to form different shapes. (50% will form a circle or an elliptic, and 1/2 height pixels will form a capsule)

19. The height of a row of cells is not set, and there is no content. If the height of the table is set, it is not distributed to it (or my socialism is good !), If you want its tr to have a row of height, write an & nbsp; in the cell;

20. td sets the width and height, and table sets the width and height. However, td padding (td does not support margin, but supports padding) will support a large table without limit (if the attribute of width and height is increased only for td, when the total width and height of td are equal to the width of the table, increasing the value will not work. In fact, when the table width is higher than the actual width of td, more parts will be allocated)

 

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.