ID Selector « Style Basics « HTML / CSS






1.id locator with #
2.An ID should be unique within a document. If it is not, ID will match all elements with the same IDs.
3.tagName#id: use id name plus tag name to mark a style
4.To style one paragraph with an extra-large bottom margin of 40 pixels using #paragraph3{margin-bottom:40px;}.
5.Combine the style from ID and class
6.ID Rule Example
7.Set style for DIV targeting id