HTML Academy
Text Direction
Text Formatting22/26
Back to the list of tasks
  • 1. Unicode Characters
  • 2. The text-shadow Property
  • 3. Horizontal Text Shadow Offset
  • 4. Vertical Text Shadow Offset
  • 5. Text Shadow Feathering
  • 6. The Text Shadow Color
  • 7. Embedded Effect for Text
  • 8. Decorative Retro Shadow
  • 9. Challenge: Psychedelic Shadows
  • 10. Logo: Custom Font
  • 11. Logo: Icon Font
  • 12. Logo: Size Alignment
  • 13. Applying Decorative Styling to the Line, Step 1
  • 14. Applying Decorative Styling to the Line, Step 2
  • 15. The text-indent Property
  • 16. The: first-letter Pseudo Element
  • 17. : first-line Pseudo Element
  • 18. Column Markup: The column-count Property
  • 19. Column Markup: The column-width Property
  • 20. Column Markup: The column-gap Property
  • 21. Text Direction
  • 22. Text Direction and Tables
  • 23. Overflowing Text
  • 24. Spacing Between Words
  • 25. Challenge: Why So Serious?
  • 26. Challenge: Play With Fonts
Overflowing Text
  • Sign up
  • Log in

Loading…
Everything will be ready in few seconds

  • Theory
  • Theory
  • Comments

Text Direction and Tables

In addition, the direction property affects the order of columns in the table, changing it to the appropriate value.

Comments

  • index.html
  • style.css
HTML
<!DOCTYPE html> <html lang="en"> <head> <title>Text Direction and Tables</title> <meta charset="utf-8"> <link rel="stylesheet" href="style.css"> </head> <body> <article> <h1>Browser Usage Statistics</h1> <table> <tr> <td>Year</td> <td>2008</td> <td>2010</td> <td>2012</td> <td>2014</td> </tr> <tr> <td>Chrome</td> <td>3%</td> <td>22%</td> <td>47%</td> <td>59%</td> </tr> <tr> <td>Firefox</td> <td>42%</td> <td>43%</td> <td>31%</td> <td>25%</td> </tr> <tr> <td>IE</td> <td>50%</td> <td>27%</td> <td>15%</td> <td>9%</td> </tr> </table> </article> </body> </html>
CSS
body { padding: 10px; background: url("bokeh.jpg") no-repeat 50% 0; color: #333333; font-size: 14px; font-family: "Georgia", sans; } article { padding: 20px; background-color: rgba(240, 240, 240, 0.85); } table { border-collapse: collapse; } tr:nth-child(odd) { background-color: rgba(255, 255, 255, 0.75); } td { padding: 10px 15px; border-right: 1px dashed #cccccc; } td:first-child { text-align: right; font-style: italic; } td:last-child { border-right: none; }

What didn’t you like in this task?

Thanks! We’ll fix everything at once!

The code has changed, click “Refresh” or turn autorun on.

You’ve gone to a different page

Click inside the mini-browser to shift the focus onto this window.

100%
Goalscompleted
0
    1. Set the text direction in the table to from right to left.

    Cookies ∙ Privacy ∙ License Agreement ∙ About ∙ Contacts ∙ © HTML Academy OÜ, 2019−2025

    VISAMastercard

    Log in

    or

    Forgot your password?

    Sign up

    Sign up

    or
    Log in

    Restore access

    Have you forgotten your password or lost access to your profile? Enter your email connected to your profile and we will send you a link to restore access.

    Forgot to connect your email to the profile? Email us and we’ll help.