Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 7

CASE STUDY: MARKUP VALIDATION

Executive summary

The role of the validator has been likened to that of a "spell-checker"


for Web page structure. A validator alone will not make your page
better a page that passes validation can still look or behave terribly, and
a page with hundreds or even thousands of errors can still produce a
reasonable user experience in most browsers.

A validator simply catches errors. We all make mistakes, even the


experts. The worst mistakes are often the typos or unintentional gaffes;
a validator can make easy work of catching these. Authors should
validate-it's an easy process. This is not a conundrum; validate your
code and do it often.
What is markup validation?

The W3C validator is a tool that authors can use to ensure that their
markup conforms to a standard. This tool began life over 10 years ago
as a Web wrapper around an SGML parser, but it has expanded its
reach over time to include validation capability for documents of many
flavors. The tool checks a page of markup against a set of rules defined
by the document's Doctype, and delivers either a cheerful passing
grade, or a failure message with a list of any warnings and errors that
need to be addressed.

With these concepts in mind, we can define "markup validation" as the


process of checking a Web document against the grammar (generally a
DTD) it claims to be using.

What does markup validator do?


Most Web documents are written using markup languages, such as
HTML or XHTML. These languages are defined by technical
specifications, which usually include a machine-readable formal
grammar (and vocabulary). The act of checking a document against
these constraints is called validation, and this is what the Markup
Validator does.

Validating Web documents is an important step which can dramatically


help improving and ensuring their quality, and it can save a lot of time
and money (read more on why validating matters). Validation is,
however, neither a full quality check, nor is it strictly equivalent to
checking for conformance to the specification.
How do you validate your code?

Validation is comparing your code to W3C standards the best way to


validate your code is using the W3C validation tools.

1. HTML validator
2. CSS validator

1.HTML Validator:

This validator checks the markup validity of web documents in HTML,


XHTML, SMIL, MathML, etc

2.CSS Validator:

This validator checks the CSS validity of web documents in HTML,


XHTML etc.

There are plenty of browser extensions that will test the page you’re
viewing against the W3C validators. HTML Tidy is another option for
validating pages, though it may not offer the exact same results as the
W3C validator. One advantage of HTML Tidy is using an extension you
can check your pages directly in the browser without having to visit one
of the validators sites.
Why do you need to validate your web page or website?

There are many reason to valid web pages or website here are some of
them:

1. SEARCH ENGINES: If you want your website listed on search engines


(and who doesn't?) then make sure that it doesn't contain broken
links, broken redirects, bad grammar, or misspelled words.Broken
links (404 errors), broken redirects, misspelled words, or bad
grammar can reduce a website's quality score and thus its search
engine ranking.

2. ACCESSIBILITY: Validating with CSS HTML Validator helps you make


your website more accessible, especially if you turn on accessibility
checking. Compliance with accessibility standards (like WCAG 2.1)
and accessibility requirements is more important than ever,
especially for government websites and many businesses.

3. BETTER, FASTER RENDERING.: Properly written HTML will render


better, on more browsers, and faster than HTML with errors. It's also
more easily adapted to print and alternative browsing devices like
tablets, mobile phones and other handheld computer devices.
4. TESTING IN BROWSERS: IS NOT ENOUGH. Simply testing web pages
in browsers is not enough. Browsers can hide problems because they
can be very forgiving, but what one browser forgives, another
browser may not. Furthermore, while an error may be "forgiven" in
one version of one browser, what about future versions of the
browser, or older versions? You can never be sure that HTML & CSS
errors will always be forgiven in all versions of all browsers and in a
stable, reliable, and consistent way.

5. SAVE HOURS OF YOUR TIME: The more HTML & CSS you write, the
more time you will save. Don't waste time manually looking for
problems, figuring out why your HTML doesn't display like it should,
or using online checkers. Get CSS HTML Validator and check HTML,
XHTML, and CSS fast.

6. FUTURE-PROOF: Properly written HTML is more likely to be future-


proof (backward compatible with future standards and future web
browsers).
7. IT WON'T BE YOUR FAULT: If you build your site based on standards
and good HTML & CSS, then it won't be your fault if your site doesn't
work with a particular browser.

8. PROTECT YOUR REPUTATION: If anyone looks at or validates your


HTML or CSS, then you'll have more confidence in what they see.
They'll know that you know what you're doing and that you care
about giving a good impression with your website.

You might also like