June 8, 201016 yr Hi! about webstandards... if a site validates CSS and XHTML than its ok for standards? what parts they consist of? ( syntax, nesting ... or cross browser compatibilite also? ) additionally if i'm learning css and xhtml from quality sites, i'm learning it STANDARD? --- thanks
June 9, 201016 yr Hi! about webstandards... if a site validates CSS and XHTML than its ok for standards? what parts they consist of? ( syntax, nesting ... or cross browser compatibilite also? ) additionally if i'm learning css and xhtml from quality sites, i'm learning it STANDARD? --- thanks Badly coded sites can still validate. (ramble coming, sorry it's late , i always ramble when it's late) It's not uncommon to see things like this in websites. <div> <div> <div> <div> <div> <div> <h1> Some text<br /> Some more </h1> </div> </div> </div> </div> </div> </div> It will still validate, but it's poorly written (known as divitis). Creating good quality websites involves multiple things, you need to learn how to represent the content correctly with the available html tags. Their are so many tags that are so often overlooked. For example, the <samp> tag is rarely spotted, even amongst websites that display samples of code. Thus they're not representing the code with the most relevant tags. Definition lists are another i rarely see in use. Valid code won't necessarily work cross browser, however when things go wrong, having valid code rules out a whole range of suspects, and when you come to post for help on a forum like this. We can help solve the problem far quicker. Gist of what i'm saying is validity matters, but it's only small part.
June 9, 201016 yr To the last question: that is not entirely true, there are many quality sites out there that don't have valid code, CSS almost doesn't because of the use of CSS 3 techniques that has not been standardised yet, an example of CSS3 would be: -moz-border-radius: 5px Another reason for CSS that is not standardised is when some hacks are used to fix style bugs in the infamous browser Internet Explorer 6, this can be made "valid" to an extent though if they properly use the IE only conditional comments, which prevents the W3C validator from reading it. As for XHTML, many sites are starting to implement HTML 5 techniques without changing the doctype (reason they don't is because older browsers simply don't support it), a common example would be using the custom "data" prefixed attributes that HTML 5 allows but XHTML 1.0 or HTML 4.0 doesn't, example: <button title="This is a Button" data-tool-tip="This is a Button"> Click me </button> As the person above said, validity is important, but at the same time, if you want the code to work, valid code is not always possible.
Create an account or sign in to comment