0

I'm working on a legacy application created with HTML 4, The application is working correctly on Internet Explorer, I want to run the application on Edge chromium and chrome, but I get many style problems. There is some css styles, but to align elements we use tables and HTML attributes like align.

I tried to check if the HTML and CSS are valid using google chrome extension called Validity but I get those errors

the "align" attribute on the "td" element is obsolete. use css instead

the "bgcolor" attribute on the "td" element is obsolete. use css instead

the "width" attribute on the "table" element is obsolete. use css instead

but those attributes are working correctly with HTML 4 in the application, so why those errors ? Is there any tools to check if all the HTML 4 attributes and css are valid/correct or not ?

user3093583
  • 101
  • 1
  • 2
  • 7
  • obsolete attributes will continue working until which date ? – user3093583 Jul 04 '22 at 08:19
  • These attributes are just deprecated, but still working. I suggest modifying your code according to HTML5 standards for better user experience, such as replacing those obsolete attributes with CSS. – Yu Zhou Jul 04 '22 at 09:01
  • we are using HTML 4, for now we will continue use it, my question obsolete attribute will cause a style problem ? they will continue working until which date ? – user3093583 Jul 04 '22 at 09:06

1 Answers1

2

They are marked as errors and obsolete because they are obsolete and have been for many years.

That they still work is because browsers tend not to break the web and support such things for many years afterwards. However, one should not rely on this as support can disappear at any time without notice.

The way you check for such things is to use the W3C tools that have been around for decades:

W3C HTML Validator

W3C CSS Validator

Rob
  • 14,746
  • 28
  • 47
  • 65
  • I'm not using a public website so this is not a solution for me – user3093583 Jul 03 '22 at 09:43
  • @user3093583 Both validators allow textual input and file uploads – Rob Jul 03 '22 at 09:44
  • the big question obsolete attributes will continue working until which date ? – user3093583 Jul 04 '22 at 08:02
  • @user3093583 There is no known date and browsers will decide on their own when it will be removed. More likely there will be an announcement but the link I posted is already a warning that it can happen at any time. Do not use obsolete or deprecated elements. – Rob Jul 04 '22 at 09:28
  • I'm working on a legacy application created since 20 years, so shoul I change the code ? The problem it takes a little time – user3093583 Jul 04 '22 at 09:39
  • @user3093583 I would only change it if it's convenient to do so. – Rob Jul 04 '22 at 09:56