Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Table: HTML align attribute is unsupported in HTML5 #158

Closed
nadirs opened this issue May 18, 2013 · 4 comments
Closed

Table: HTML align attribute is unsupported in HTML5 #158

nadirs opened this issue May 18, 2013 · 4 comments

Comments

@nadirs
Copy link

nadirs commented May 18, 2013

In a table like the following:

    alpha | beta    | gamma
     ---: | :-----: | ----:
    delta | epsilon | zeta

a cell is translated into:

    <td align="right"> ...</td>

Alignment is accomplished through the use of HTML align attribute which is considered obsolete for HTML5 tables.
CSS is recommended by the W3C.

@scottgonzalez
Copy link
Contributor

This should be an easy fix. @chjj Do you want a PR for this?

@adam-p
Copy link

adam-p commented Jun 5, 2013

A workaround for this is to create a rule in your own CSS, using the attribute. For example:

td[align="right"] {
  text-align: right;
}

(I bet chjj doesn't want to add style attribute output to Marked...)

@nadirs
Copy link
Author

nadirs commented Jun 13, 2013

@adam-p Completely agree about leaving CSS out of the markdown engine. Your workaround is nice, thanks for sharing!

@nadirs nadirs closed this as completed Jun 13, 2013
@julkue
Copy link

julkue commented Jan 15, 2015

This will not work with images inside tables

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants