What is HTML?
HTML, an initialism of Hyper Text Markup Language, is the
predominant markup language for Web pages. It provides a means to
describe the structure of text-based information in a document -
by denoting certain text as links, headings, paragraphs, lists,
and so on — and to supplement that text with interactive
forms, embedded images, and other objects.
HTML is written in the form of tags, surrounded by angle
brackets. HTML can also describe, to some degree, the appearance
and semantics of a document, and can include embedded scripting
language code (such as JavaScript) which can affect the behaviour
of Web browsers and other HTML processors.
Files and URLs containing HTML often have a .html or .htm
filename extension.
The purpose of a web browsers (like Internet Explorer) is to
read HTML documents and display them as web pages. The browser
does not display the HTML tags, but uses the tags to interpret
the content of the page:
An HTML editor is a software application for creating web
pages. Although the HTML markup of a web page can be written with
any text editor, specialized HTML editors can offer convenience
and added functionality. For example, many HTML editors work not
only with HTML, but also with related technologies such as CSS,
XML and JavaScript or ECMAScript.
There are various forms of HTML editors: text, object and
WYSIWYG (What You See Is What You Get) editors.
A given HTML document will have an inconsistent appearance on
various platforms and computers for several reasons. Different
browsers and applications will render the same markup
differently.
The same page may display slightly differently in Internet
Explorer and Firefox on a high-resolution screen, but it will
look very different in the perfectly valid text-only Lynx
browser. Web browsers, like all computer software, have bugs
What is CSS?
Cascading Style Sheets (CSS) is a simple mechanism for adding
style (e.g. fonts, colors, spacing) to Web documents. Its most
common application is to style web pages written in HTML and
XHTML,
It is designed primarily to enable the separation of document
content (written in HTML or a similar markup language) from
document presentation (written in CSS). This separation can
improve content accessibility, provide more flexibility and
control in the specification of presentation characteristics, and
reduce complexity and repetition in the structural content (such
as by allowing for tableless web design). The filename extension
is .css
Prior to CSS, nearly all of the presentational attributes of
HTML documents were contained within the HTML markup; all font
colors, background styles, element alignments, borders and sizes
had to be explicitly described, often repeatedly, within the
HTML. CSS allows authors to move much of that information to a
separate stylesheet resulting in considerably simpler HTML
markup.
Why use CSS?
HTML tags were originally designed to define the content of a
document. They were supposed to say "This is a header", "This is
a paragraph", "This is a table", by using tags like <h1>,
<p>, <table>, and so on. The layout of the document
was supposed to be taken care of by the browser, without using
any formatting tags.
As the two earlier major browsers - Netscape and Internet
Explorer - continued to add new HTML tags and attributes (like
the <font> tag and the color attribute) to the original
HTML specification, it became more and more difficult to create
Web sites where the content of HTML documents was clearly
separated from the document's presentation layout.
To solve this problem, the World Wide Web Consortium (W3C) -
the non profit, standard setting consortium, responsible for
standardizing HTML - created STYLES in addition to HTML 4.0. All
major browsers support Cascading Style Sheets.
Style Sheets Can Save a Lot of Work
Styles sheets define HOW HTML elements are to be displayed,
just like the font tag and the color attribute in HTML 3.2.
Styles are normally saved in external .css files. External style
sheets enable you to change the appearance and layout of all the
pages in your Web, just by editing one single CSS document!
CSS is a breakthrough in Web design because it allows
developers to control the style and layout of multiple Web pages
all at once. As a Web developer you can define a style for each
HTML element and apply it to as many Web pages as you want. To
make a global change, simply change the style, and all elements
in the Web are updated automatically.
Multiple Styles Will Cascade Into One
Style sheets allow style information to be specified in many
ways. Styles can be specified inside a single HTML element,
inside the <head> element of an HTML page, or in an
external CSS file. Even multiple external style sheets can be
referenced inside a single HTML document.
|