Page 23 - DCAP202_Fundamentals of Web Programming
P. 23
Fundamentals of Web Programming
Notes Several technologies (such as CSS, JavaScript, Flash, AJAX, JSON) can be used to define the
elements of a web page. However, at the very lowest level, a web page is defined using HTML
(HyperText Markup Language). Without HTML, there is no web page.
HTML is a markup language. It tells the web browser how to display content. HTML separates
“content” (words, images, audio, video, and so on) from “presentation” (the definition of the
type of content and the instructions for how that type of content should be displayed). HTML
uses a predefined set of elements to identify content types. Elements contain one or more “tags”
that contain or express content. Tags are surrounded by angle brackets, and the “closing” tag
(the one that indicates the end of the content) is prefixed by a forward slash.
2.1 Basic of Markup Languages
A markup language is a language that annotates text so that the computer can manipulate the
text. Most markup languages are human readable because the annotations are written in a way
to distinguish them from the text.
Example: With HTML, XML, and XHTML, the markup tags are < and >.
Any text that appears within one of those characters is considered part of the markup language
and not part of the annotated text.
Example:
<p>this is a paragraph of text written in HTML</p>
When you format text to be printed (or displayed on a computer or TV), you need to distinguish
between the text itself and the instructions for printing the text.
Did u know? The markup is the instructions for displaying or printing the text.
Markup doesn’t have to be computer readable. Annotations done in print or in a book are also
markup.
Example: Many students in school will highlight certain phrases in their text books. This
indicates that the highlighted text is more important than the surrounding text. The highlight
color is markup.
Markup becomes a language when rules are codified around how to write and use the markup.
That same student could have their own “note taking markup language” if they codified rules
like “purple highlighter is for definitions, yellow highlighter is for exam details, and pencil
notes in the margins are for additional resources.” But most markup languages are defined by
an outside authority for use by many different people.
2.1.1 Types of Markup Languages
Most of the content we see on the web exists because markup languages like HTML and XML
exist. Well at least that’s what we are thought about in academics. That we know, but some of
you might not know that this class of languages in not limited to two or three. Lets look into a
few more that are used extensively:
DHTML: Dynamic Hyper Text Markup Language can be described as a combination of several
technologies like HTML client-side java script and cascading Style Sheets. Most of the pages and
multimedia content on the web are created using DHTML.
16 LOVELY PROFESSIONAL UNIVERSITY