On 2014-08-13 00:46, Shiyuan wrote:
Rick, Do you mean that <table border="2"> and <table style="border:2px"> don't mean the same thing? Their names suggest they do the same things. That's a terrible naming. Changing the former to the latter does fix the problem though. Why is that?
Please read the HTML specifications for an explaination. By my reading border="2" is in fact invalid in html5: The border attribute may be specified on a table element to explicitly indicate that the table element is not being used for layout purposes. If specified, the attribute's value must either be the empty string or the value "1". The attribute is used by certain user agents as an indication that borders should be drawn around cells of the table. In html4 it does seem to do the same thing: border = pixels [CN] This attributes specifies the width (in pixels only) of the frame around a table (see the Note below for more information about this attribute).
Using the #+HTML_HEAD_EXTRA options as you suggest can also fix the problem. But could you explain why using the HTML_HEAD_EXTRA is more advisable than setting the <table style="border:2px"> directly as table attributes? What would you suggest if we want some tables have orders and others don't have borders in the same html webpage?
Use css selectors. If you want to set the style attribute directly on the table element in a post-processor you may, but is is not considered best practice.