HTML 4.01 consists of 91 elements that tell the web browser about the webpage’s structure & appearance.
| Structure | Appearance |
|---|---|
| p | b |
| h1 | strong |
| table | em |
| ul | a |
| li | img |
Start with that idea in order to understand a key way to divide HTML elements: as either block-level or inline.
| Block-level | Inline |
|---|---|
| Describes structure | Describes appearance |
| Begins on a new line | Within a line |
| Defines large section of webpage | Defines smaller section inside another |
| Can contain block-level & inline elements | Can only contain inline elements |
| Ex’s: p, h1, ul, li, table | Ex’s: a, b, em, font, img |
As you're coding, this distinction will be important. You can't, for instance, put block-level elements inside inline elements. If you do, your code will not validate.
Contact
WorkFor work info, see WebSanity. |
All content, unless under a Creative Commons license, is © 1997-2011 Scott Granneman. (Take a look around—a lot of content is licensed under a Creative Commons license, which gives YOU a lot of freedom to reuse my work.) |
|