Jump to content

html 4.01, table background not supported


bbr
 Share

Recommended Posts

example listed here : http://www.w3schools.com/html/tryit.asp?fi...able_backgroundbut not here :http://www.w3schools.com/tags/tag_table.aspalso,, the w3 validator lists it as being unaccepble for a html 4.01 encoded page.Are there alternatives for writing using a table background, or should a different encoding be used?backgrounds appear to work fine,, so... what's the big "reason" (as ive yet to see it being listed) to making sure the page is 4.01 transitional.btw. looks like the forums are pretty new :>

Link to comment
Share on other sites

Hi,bgcolor is depecrated as styles should be reserved to CSS.Enter this code into the head of your document:

   <style type="text/css">   table {   background-color: red;   }   </style>

That's CSS. =)Browsers display it fine because they accept code from different HTML versions, including the older ones. The reason why it is invalid is because using it, no matter how it works in browsers, means you're not actually using the HTML version you're telling in the DOCTYPE, and as the web advances and deprecated attributes start being unsupported by browsers, you'll be left behind. :)And yes, the forums are new. I'm glad to be one of the first members! =)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...