diff --git a/lib/markdown2.py b/lib/markdown2.py
index 4b55d11b..eb066151 100755
--- a/lib/markdown2.py
+++ b/lib/markdown2.py
@@ -1013,11 +1013,11 @@ def _table_sub(self, match):
align_from_col_idx = {}
for col_idx, col in enumerate(cols):
if col[0] == ':' and col[-1] == ':':
- align_from_col_idx[col_idx] = ' align="center"'
+ align_from_col_idx[col_idx] = ' style="text-align:center;"'
elif col[0] == ':':
- align_from_col_idx[col_idx] = ' align="left"'
+ align_from_col_idx[col_idx] = ' style="text-align:left;"'
elif col[-1] == ':':
- align_from_col_idx[col_idx] = ' align="right"'
+ align_from_col_idx[col_idx] = ' style="text-align:right;"'
# thead
hlines = ['
' % self._html_class_str_from_tag('table'), '', '']
diff --git a/test/php-markdown-extra-cases/Tables.html b/test/php-markdown-extra-cases/Tables.html
index 408693ec..95b9c2a9 100644
--- a/test/php-markdown-extra-cases/Tables.html
+++ b/test/php-markdown-extra-cases/Tables.html
@@ -133,56 +133,56 @@ One-column one-row table
-Table alignement:
+Table alignment:
Default |
- Right |
- Center |
- Left |
+ Left |
+ Center |
+ Right |
Long Cell |
- Long Cell |
- Long Cell |
- Long Cell |
+ Long Cell |
+ Long Cell |
+ Long Cell |
Cell |
- Cell |
- Cell |
- Cell |
+ Cell |
+ Cell |
+ Cell |
-Table alignement (alternate spacing):
+Table alignment (alternate spacing):
Default |
- Right |
- Center |
- Left |
+ Left |
+ Center |
+ Right |
Long Cell |
- Long Cell |
- Long Cell |
- Long Cell |
+ Long Cell |
+ Long Cell |
+ Long Cell |
Cell |
- Cell |
- Cell |
- Cell |
+ Cell |
+ Cell |
+ Cell |
diff --git a/test/php-markdown-extra-cases/Tables.text b/test/php-markdown-extra-cases/Tables.text
index 3deb3a69..b761ad91 100644
--- a/test/php-markdown-extra-cases/Tables.text
+++ b/test/php-markdown-extra-cases/Tables.text
@@ -50,19 +50,19 @@ With leading and tailing pipes:
* * *
-Table alignement:
+Table alignment:
-| Default | Right | Center | Left |
+| Default | Left | Center | Right |
| --------- |:--------- |:---------:| ---------:|
| Long Cell | Long Cell | Long Cell | Long Cell |
-| Cell | Cell | Cell | Cell |
+| Cell | Cell | Cell | Cell |
-Table alignement (alternate spacing):
+Table alignment (alternate spacing):
-| Default | Right | Center | Left |
+| Default | Left | Center | Right |
| --------- | :-------- | :-------: | --------: |
| Long Cell | Long Cell | Long Cell | Long Cell |
-| Cell | Cell | Cell | Cell |
+| Cell | Cell | Cell | Cell |
* * *