Wikibooks:Sandbox
From Wikibooks, the open-content textbooks collection
[edit] The Line-height Problem
Because paragraph tags are implied for all page paragraphs, the default paragraph line-height will be applied for each paragraph unless each and every paragraph's line height is separately specified.
Applying styles for outer elements will not modify the property.
Within tables, typed cell text has no paragraph implied, so cell styles supersede table styles and table styles supersede outer styles beyond that. If a template containing text is placed in a cell the paragraph tags are assumed by default as if they had been typed, and the default paragraph line-height results. Clearly, if the paragraph tags are typed, the default paragraph line-height results, unless the line-height property is specified within them to be different.
Applying line-height to a page is therefore laborious.
[edit] Scope of the Line-height Property
The line height property applies only to block elements. The meaning of block element is decided by its adding an additional line break of its own, both before and after the visible contents or structure. They include HTML elements, and extend to the Wikitext equivalents since they are translated to HTML before download to the browsers: They include:
- <blockquote>
- <div>
- <h1, <h2>, <h3>, <h4>, <h5>, and <h6>
- <hr>
- <ol>
- <p>
- <pre>
- <table>
- <td> works but not really a block element
- <th> works but not really a block element
- <ul>

