Html and css div element.

The difference between block-level and inline elements is important. (X) HTML markup element to the block level or inline depending on the case, it can not or will not include any other element. For example, you need an inline element will not be able to insert a block-level element. Cascading Style Sheets also apply in the case of the block-level and inline elements behave differently.

Div element: ID and class attribute.

  1. Each element div id attribute is used to add a special identifier. In the pages of a material can be used to refer to it only once.
  2. div blocks while applying CSS style rules that are commonly used in the id attribute. It can be used by JavaScript when working with div elements.
  3. id attribute of the class attribute of the element is used to give the group. The class attribute that you can create any number of groups.

Note: Any element with the same id and class attributes may be.

Examples:

Leave a Reply

Your email address will not be published. Required fields are marked *