What is the difference between width=”100” and width=”100%”?

Showing Answers 1 - 49 of 49 Answers

psuresh1982

  • Oct 24th, 2007
 


width=100 means the size of the particular td or table is 100 pixels. 
width=100% means the size of the particular td or table is eqaul to the length of the td or table which is have this td or table.

Both of declarations are eqaul in firefox. It consider both of them have a size of 100 pixels.

Ambaresh

  • Jun 19th, 2008
 

Copy this code and make it html page
(see the difference between width=”100” and width=”100%”)




<html>
<head>
<title>Untitled Document</title>
</head>
<body>
<table width="100%" border="2" cellspacing="0" cellpadding="0">
  <tr>
    <td>width=&quot;100%&quot;</td>
  </tr>
</table>
<br />
<table width="100" border="2" cellspacing="0" cellpadding="0">
  <tr>
    <td>width=&quot;100&quot;</td>
  </tr>
</table>
</body>
</html>

  Was this answer useful?  Yes

There is lot of difference between width="100" and width="100%". Suppose we have create a table. if width 100 will be 100 its a fixed width. while loading it will take default table width as 100 but in 100% it wont take like that

first of all it has to load fully and then it will take the browser window width and then 100% table will display in its full view and it could be changed according the resolution and browser.

but fixed width cant be changed if the resolution and browser changed

Suppose we are giving width="100" in an image tag then the width of the image is 100
pixel which too small and if we give width="100%" then the width of the image is 100% of the window.  Just try this

<img src="Location of Image" width="100" height="100">


and


<img src="Location of Image" width="100%" height="100%">

  Was this answer useful?  Yes

Ravi Maggon

  • May 22nd, 2011
 

take an example as div width="100" refers to a division in html with fixed width of 100 px. While 100% refers to dynamic width i.e. division tag will take all the available width provided by the browser to that window in which this html page loads. it is mainly used in variable width web templates of when something relative is to be done in some tag. while 100px might be used to have fixed size of tags.

  Was this answer useful?  Yes

dinesh

  • Aug 12th, 2011
 

width=100 means the width is 100pixels and width=100% means cover the full width it can exist

  Was this answer useful?  Yes

ashish

  • Apr 15th, 2012
 

-2

  Was this answer useful?  Yes

Kumar

  • Jun 27th, 2013
 

100 defines absolute and 100% defines the relative

  Was this answer useful?  Yes

Ambaresh.KS

  • Jul 2nd, 2013
 

Width="100" -- Browser consider this as 100px and the object uses only 100px space.

Width="100%" -- Browser consider this as 100% and the object uses available space completely.

  Was this answer useful?  Yes

dileep

  • Jun 9th, 2014
 

"100"takes only 100px,"100%"takes entry available space.

  Was this answer useful?  Yes

RAHAT

  • Apr 9th, 2015
 

100px----it is fixed whatever is the resolution of your monitor screen.

100%----it occupy all the available space on the screen and also adjust according to the resolution of your monitor settings.
100px is very very small as compared to 100%.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions