Hyper Text Markup Language (HTML) Question:

Download Job Interview Questions and Answers PDF

How do I align a table to the right (or left)?

HTML Interview Question
HTML Interview Question

Answer:

You can use <TABLE ALIGN="right"> to float a table to the right. (Use ALIGN="left" to float it to the left.) Any content that follows the closing </TABLE> tag will flow around the table. Use <BR CLEAR="right"> or <BR CLEAR="all"> to mark the end of the text that is to flow around the table, as shown in this example:

The table in this example will float to the right.
<table align="right">...</table>
This text will wrap to fill the available space to the left of (and if the text is long enough, below) the table.
<br clear="right">
This text will appear below the table, even if there is additional room to its left.

Download HTML Interview Questions And Answers PDF

Previous QuestionNext Question
What is a DOCTYPE? Which one do I use?How do I center a table?