Upto HTML 4.01. block level elements and inline elements.
inline elements:
- respect l to r margins and padding. not top and bottom
- cannot have width and height set
- allow other elements to sit to their l and r
- can display things before and after it, on the same line.
- span, a, strong, em, img, input, abbr, acronym
block
- respect all of those
- force a line break after the block element
- demands its own line with whitespace around it.
- <p>, <div>, h1 to h6, ul, ol, dl, li, dt, dl, table, pre, form
From HTML5 onwards
https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories
Talking about attributes, you can use data-* attributes to store extra information on standard semantic HTML elements. (link)
s
0 comments:
Post a Comment