Better way to right align text in HTML Table

前端 未结 11 2079
无人及你
无人及你 2021-02-04 23:40

I have an HTML table with large number of rows, and I need to right align one column.

I know the following ways,

..

        
11条回答
  •  星月不相逢
    2021-02-05 00:02

    A number of years ago (in the IE only days) I was using the tag, but I just tested it and and it seems to be an IE only feature:

    
    
    
        Test
    
    
        
    ISBN Title Price
    3476896 My first HTML $53

    The snippet is taken from www.w3schools.com. Of course, it should not be used (unless for some reason you really target the IE rendering engine only), but I thought it would be interesting to mention it.

    Edit:

    • IE still supports it.
    • Firefox has dropped support in 3.5.
    • Safari does not seem to support it, but the documentation indicates otherwise.

    Overall, I don't understand the reasoning behing abandoning this tag. It would appear to be very useful (at least for manual HTML publishing).

提交回复
热议问题