MY VS always prompt below messages.
Validation (XHTML 1.0 Transitional): Attribute 'border' is considered outdated. A newer construct is recommended.
Validation (XHTML 1.0 Transitional): Attribute 'link' is considered outdated. A newer construct is recommended.
What is the remedy for this?
Stylesheets.
The CSS border property and the CSS :link peusdo-class. Both were standardised almost 20 years ago.
FYI: I'm getting just that error message in Microsoft Expression Web 4. But the www.w3schools.com website has no complaints about using the border property. It just gives many examples of how to use it.
Probably the property was expected to be deprecated, but it never got there.
Related
I have a site that uses the Twitter Bootstrap framework which renders without errors in all browsers. However, when I plug the main URL of our site into the W3C validator it spits out 1,465 errors, most of which are parsing errors.
A few examples:
Parse Error {*zoom:1; Value Error : background-color Too many values
or values are not recognized : #3f6998 \000009
I understand the * and \000009 are IE specific, so it is important that these are failing validation?
Is there a validator that takes these into consideration?
You will always get css validation error while using CSS3. Most of the styles(css3) are not valid under w3 rules as of now.. You can simply ignore these errors and move ahead.. Just make sure you do not have any other validation issues other than those with css3 styles. If so you are perfectly fine..
Update :
You can try something like this :
http://jigsaw.w3.org/css-validator/validator?profile=css3&uri=PATH_TO_YOUR_WEBSITE
For eg :
http://jigsaw.w3.org/css-validator/validator?profile=css3&uri=http://stackoverflow.com
Still it will show lot of errors. There are no CSS3 validators yet implemented which is accepted.
[Updated]
URL : https://validator.w3.org/
Please use the official validator.
Here is Bootstrap’s explanation for their validation errors:
https://getbootstrap.com/docs/getting-started/#support-validators
In order to provide the best possible experience to old and buggy browsers, Bootstrap uses CSS browser hacks in several places to target special CSS to certain browser versions in order to work around bugs in the browsers themselves. These hacks understandably cause CSS validators to complain that they are invalid. In a couple places, we also use bleeding-edge CSS features that aren't yet fully standardized, but these are used purely for progressive enhancement.
These validation warnings don't matter in practice since the non-hacky portion of our CSS does fully validate and the hacky portions don't interfere with the proper functioning of the non-hacky portion, hence why we deliberately ignore these particular warnings.
I recently decided to run the Resharper 6.0 "Analyze Errors In Solution" option on our web application. After several valid problems it picked up on, it has me stumped on some CSS 'errors':
(disclaimer: I am not a CSS person in the slightest, only understand the principles, so may use the wrong terminology - please bear with me!)
In our web application, we have some CSS selectors which follow this general pattern:
.someselector{
property:inherit
}
This 'inherit' value has been used against the properties of:
padding
border-width
overflow
I realise that the 'inherit' value is not necessarily cross browser compatible, but I'm not worried about that (for now). What I don't understand is why ReSharper is throwing its toys over its use as from what my research shows it is a valid CSS value (albeit not widely supported)?
http://reference.sitepoint.com/css/inheritvalue and http://www.w3.org/TR/CSS2/cascade.html#value-def-inherit
I'm assuming there's something I don't know about the inherit value and its use and would appreciate any enlightenment someone can provide. I am equally happy if an experienced CSS developer can tell me the CSS is valid and ReSharper is wrong. Just looking for clarity of which is right!
Thanks in advance!
JetBrains have already identified this as an issue (and linked to this question!), and have targetted version 6.1 for a fix.
This has been confirmed as a bug (outside of Stack Overflow) and I have lodged a bug report with JetBrains to fix it. The CSS listed above is indeed valid.
What type of XHTML and CSS validations errors can be avoided? which would not harmful today and tomorrow (if we do not touch xhtml, css )?
I mean errors which will not create any problem on future upgrade of browser, css and html version? they just show as an error today?
I think one thing I know is Vendor extensions. Are there any other errors/warnings which will not create any bad effect for user and developer?
If I'm making a site and i get many errors should i try to give time to solve every error? if i will try to solve all error then i will have to use javascript on some instances in place of css
The XHTML and CSS validators will validate against the corresponding specifications of the W3C standards. Ignoring these mean that your page(s) are deviating from those standards.
Web browsers aim to implement these standards, so ignoring a warning is likely to cause issues on at least some browsers. Therefore, you cannot ignore any warning that the validators give.
Also, having XHTML and CSS conformant web pages is not guaranteed to work on all browsers and be compatible with them as the browsers may implement something differently or incorrectly.
Having conformant pages is still a good thing, as most browsers are (for the most part) conformant and having more conformant pages helps put the ownership on the browser implementers. That is, you (as a web page author) need only concern yourself with being standard compliant. If a browser can't handle that, the issue is with the browser, not the web page author.
If you want to be compatible with a large number of browsers, start with the valid conformant page and then add the minimum needed to get it working on other non-conformant browsers. Doing it this way is a lot easier than starting with a non-conformant page and trying to make that work on most browsers.
You should try to avoid all parse errors. If in doubt, try the validator.w3.org and use the html tidy function to clean up the code.
Each browser will render and parse XHTML and css differently. Even if it works now it might not work tomorrow.
The only safe answer is "none". The best guarantee you have for future compatibility wth all browsers is stick to the standard and have fully validated xhtml and css.
If I use XHTML 1.0 Strict currently, then should I not use those XHTML elements/tags and attributes which will not be in the HTML5 spec? E.g. <acronym> and <big>
If you want to be safe yes (and you should want to be safe, it's the....well, safest, route), use the tags appropriate to the DOCTYPE you're using of course.
In practice will it matter using deprecated tags? no, probably not for years to come. I'm not saying do it, just that browsers won't call you on it, at least not at the moment.
HTML isn't final yet, so it's not included, but you can view an updated "which tags are in my DTD?" here: http://www.w3schools.com/tags/ref_html_dtd.asp
Note that strictly, HTML5 never uses the term "Deprecated". "Absent" or "Obsolete" are used instead. I believe the reason is that "deprecated" implies that support for them may be removed in the future, whereas that is not currently considered likely by the browser manufacturers, because too many existing pages would break.
Also in at least one case, that of the profile attribute, the reason for making it obsolete is that it is useless, and therefore effort adding it is effort wasted. But if you already have it in your page, effort removing it is effort wasted, so you might as well leave it.
There again, HTML5 is becoming fragmented, and there is a proposal to add the profile attribute back in to HTML as a separate document from the main spec, as is the intention for RDFa and microdata.
In the same way, there are still proposals to remove or change the names of HTML5 elements and attributes which may or may not make it into the final spec.
For all these reasons, I'd say it's far too early to be putting in work to remove HTML5 "Absent" elements and attributes from your HTML documents.
Even if you leave them in there, it's a piece of cake to search and replace them with tags that are accepted in HTML 5.
There's no need to go searching through reams of code to change those tags, but yes, it's a good idea to phase them out. Use <abbr> instead of <acronym> and some form of CSS instead of <big>. The <strong> tag might be more appropriate in some cases if you style it to change the font size, or use one of the heading tags if that's more appropriate.
i want to migrate our website to Xhtml 5 or css 3.0 how to i migrate our site
do you really need to do that right now? keep in mind that broswers like Internet expplorer 6, 7 and Opera don't support CSS3 at the moment and even moere, if you care about valid CSS code, the current validator will not approve your code.
However, if you still want to do that, be aware to keep the most important parts of your code still compatible with mentioned broswers, and user CSS3 features (they are just awesome!) wisely. You could start learning here:
http://www.smashingmagazine.com/2009/06/15/take-your-design-to-the-next-level-with-css3/
There is also a good tutorial on nettuts, be sure to check it out (sorry, I cannot post more than one link here)
Once you have done, you could use CSS3, or CSS2.1 style sheets for different browser using conditional statements. Do some google research on it.
Hope this helps
Using HTML5 is one thing (most browsers won't support much of HTML5's APIs) get a book or find a site that outlines HTML5 and what it has to offer.
But if you want your site to validate as HTML5/CSS3, run your pages through W3C's HTML validator
use validate by URL > more options and choose your document type, in your case HTML 5.
Fix errors, repeat.
Keep in mind that there is no XHTML 5, only HTML 5. That's probably what you want.
While there are 3 different doctypes in HTML 4.01, there is only one in HTML 5:
<!DOCTYPE HTML>
Use that as your doctype when you migrate.
For CSS use W3C's CSS validator. Be sure to choose CSS3 in the options
Fix errors, repeat
i want to migrate our website to Xhtml 5 or css 3.0
For what reason?
HTML 5 has not yet reached Recommendation status and is still subject to change. Most of the significant changes in the spec aren't widely supported yet by browsers, either.
Same thing for CSS 3 - it has not been finalized, nor are many of its new attributes supported by all major browsers. You can start using CSS 3 stuff in your existing stylesheets, but be prepared for them to not work for many users yet.