What's The Point of Valid CSS/HTML

What's the point of valid CSS/HTML?

  • Google prefers it so it is good for SEO.
  • It makes your web page more likely to work in browsers you haven't tested.
  • It allows you to generate or use your page as an XML document.
  • It makes you look more professional (to some developers at least)
  • Compliant browsers can render XHTML faster than HTML in quirks mode.
  • It points out a bunch of obscure bugs you've probably missed that affect things you probably haven't tested e.g. the codepage or language set of the page.

What is the practical benefit to keep CSS 100% validated?

Practical....hmm, I suppose that you can say to the client "it's 100% validated"? In practice if you're doing anything complex (e,g, opacity) it's extremely difficult to maintain 100% valid CSS, conditional stylesheets it a way to eliminate most of these cases, but not everything.

Do what works in this case, not what the validator tells you. That being said, don't ignore validation errors that are legitimate errors not there for a specific reason.

How important are HTML/CSS validation errors like <span>s inside <p>s?

I do it for Peace of Mind.

When code is valid, it's more likely to work with a compliant browser. In theory, just because I test it and it works in various browsers today, does not mean it will work in newer browsers tomorrow. Standards Compliance solves that issue because if it follows the "Standard" today, it will follow the "Standard" tomorrow... of course, assuming that new browsers continue to support the Doctype you've selected to standardize against.

Why Validate - W3C

Why does CSS work with fake elements?

Why does CSS work with fake elements?

(Most) browsers are designed to be (to some degree) forward compatible with future additions to HTML. Unrecognised elements are parsed into the DOM, but have no semantics or specialised default rendering associated with them.

When a new element is added to the specification, sometimes CSS, JavaScript and ARIA can be used to provide the same functionality in older browsers (and the elements have to appear in the DOM for those languages to be able to manipulate them to add that functionality).

(There is a specification for custom elements, but they have specific naming requirements and require registering using JavaScript.)

Why doesn't my professor want me to use made-up elements?

  • They are not allowed by the HTML specification
  • They might conflict with future standard elements with the same name
  • There is probably an existing HTML element that is better suited to the task

Also; why didn't he know that made-up elements existed and worked with CSS. Are they uncommon?

Yes. People don't use them because they have the above problems.

Is a keyframed transition possible in Core Animation?

The answer seems to be no. If you want to do this sort of thing, you have to add the CAAnimation yourself rather than depending on transitions. The transitions probably depend on some deep workings of CoreAnimation, because they don't work the same way normal animations do (they don't move the object in question, they control how the new content of the object replaces the old).

What does the '>' symbol in css mean?

There is no valid symbol as < in CSS. If you use it, you will invalidate your css.

However, you may want to use > - the child selector.

CSS4 will introduce a subject selector. At the moment it is marked with $.

so

$#parent a:hover{
/* styles */
}

so these rules will not apply to the a in hoverstate, but it's parent with the parent-ID. CSS4 spec

What is the point of using W3C valid badges?

It's not a selling point like the "Be Safe With " type tags.

Including the w3c badges are a way to show that you know that there are standards that should be followed for web page construction. It's a way of showing that you want to be courteous to all users no matter the browser and to help promote the idea that browsers should implement, at least, the standards.

It's also a way to educate your readers. Not everyone knows that these standards exist or why they exist. Educating your readers will hopefully empower them to find a browser that fits their browsing expectations and to raise those expectations above "show me some images from 4chan."

Though, at the end of the day, it usually turns out to be another way to put things on a website because you lack the artistic savvy to make things look good without putting 'stickers' all over something.

How much time should I put into validating my HTML and CSS?

You should validate your code frequently during development.
E.G after each part/chunk revalidate it, and fix errors immediately.
that approach speeds up your learning curve, since you instantly learn from small mistakes and avoid a bunch of debugging afterwards, that will only confuse you even more.

A valid page guarantees you that you don't have to struggle with invalid code AND cross-browser issues at the same time ;)

use:

  • Markup Validation Service for HTML
  • CSS Validation Service for CSS
  • JSlint for Javascript
  • jQuery Lint for jQuery

Avoid writing new code until all other code is debugged and fixed

if you have a schedule with a lot of bugs remaining to be fixed, the schedule is unreliable. But if you've fixed all the known bugs, and all that's left is new code, then your schedule will be stunningly more accurate.(Joel test rule number 5)



Related Topics



Leave a reply



Submit