Set the Width of an HTML Table to Fit the Screen

HTML tables can be puzzling for an HTML newbie. HTML alignment tricks are very simple once you get the hang of them.

This article will show the code needed to make an HTML table fit the screen by setting the width.

How To Make an HTML Table Fit the Screen

Set the width to 100%, so that your code will look like this:

<table width="100%" border="0" cellspacing="0" cellpadding="0">  
<td>My html table is set to fit the screen</td>

This little block of code will set the width to fit the screen. If you want to align your content, you should use a nested table.

Image: © Signs and Symbols -
Published by aakai1056. Latest update on November 26, 2017 at 06:13 PM by owilson.
This document, titled "Set the Width of an HTML Table to Fit the Screen," is available under the Creative Commons license. Any copy, reuse, or modification of the content should be sufficiently credited to CCM (
HTML – Link a picture to another page
Online Forms - The Input fields