Você está na página 1de 23

HTML NOTES

History Of Internet

Internet, also known as the ‘World Wide Web’,as changed our lives
significantly. The origin & history of internet date back to 1960s, when
developers saw great potential in computers, with regard to sharing
information on scientific and military research. In 1962, J.C.R Licklider
proposed a global network of computers and later that year, moved on to
Defense Advanced Research Projects to actually develop it. After sometime,
the theory of packet switching was developed by Leonard Kleinrock, which
formed the basis of internet connections.

Applications of Internet-Electronic mail

E-mail systems are based on a store-and-forward model in which e-mail


computer server systems accept, forward, deliver and store messages on
behalf of users, who only need to connect to the e-mail infrastructure,
typically an e-mail server, with a network-enabled device (e.g., a personal
computer) for the duration of message submission or retrieval. Originally, e-
mail was always transmitted directly from one user's device to another's;
nowadays this is rarely the case.
UUCP
UUCP (UNIX-to-UNIX Copy Protocol) is a set of Unix programs for copying
(sending) files between different UNIX systems and for sending commands
to be executed on another system. The main UUCP commands (each
supported by a UUCP program) are:

• uucp, which requests the copying of a specific file to another specified


system
• uux, which sends a UNIX command to another system where it is
queued for execution
• uucico, which runs on a UNIX system as the program that carries out
the copying and initiates execution of the commands that have been
sent. Typically, this program is run at various times of day; meanwhile,
the copy (uucp) and command (uux) requests are queued until the
uucico program is run.
• uuxqt, which executes the commands sent by uux, usually after being
started by the uucico program
USENET

Usenet is a world-wide distributed discussion system. It consists of a set of


"newsgroups" with names that are classified hierarchically by subject.
"Articles" or "messages" are "posted" to these newsgroups by people on
computers with the appropriate software -- these articles are then broadcast
to other interconnected computer systems via a wide variety of networks.
Some newsgroups are "moderated"; in these newsgroups, the articles are
first sent to a moderator for approval before appearing in the newsgroup.
Usenet is available on a wide variety of computer systems and networks,
but the bulk of modern Usenet traffic is transported over either the Internet
or UUCP.
FTP

File Transfer Protocol (FTP), a standard Internet protocol, is the simplest way
to exchange files between computers on the Internet. Like the Hypertext
Transfer Protocol (HTTP), which transfers displayable Web pages and related
files, and the Simple Mail Transfer Protocol (SMTP), which transfers e-mail,
FTP is an application protocol that uses the Internet's TCP/IP protocols. FTP
is commonly used to transfer Web page files from their creator to the
computer that acts as their server for everyone on the Internet. It's also
commonly used to download programs and other files to your computer
from other servers.
Telenet
A terminal emulation program for TCP/IP networks such as the Internet. The
Telnet program runs on your computer and connects your PC to a server on
the network. You can then enter commands through the Telnet program and
they will be executed as if you were entering them directly on the server
console. This enables you to control the server and communicate with other
servers on the network. To start a Telnet session, you must log in to a
server by entering a valid username and password. Telnet is a common way
to remotely control Web servers.
SEARCH ENGINES

Search engines are very different from subject directories. While humans
organize and catalog subject directories, search engines rely on computer
programs called spiders or robots to crawl the Web and log the words on
each page. With a search engine, keywords related to a topic are typed into
a search "box."
IDENTIFY KEYWORDS
When conducting a search, break down the topic into key concepts.
BOOLEAN AND
Connecting search terms with AND tells the search engine to retrieve web
pages containing ALL the keywords.
BOOLEAN OR
Linking search terms with OR tells the search engine to retrieve web pages
containing ANY and ALL keywords.
BOOLEAN AND NOT
AND NOT tells the search engine to retrieve web pages containing one
keyword but not the other.
IMPLIED BOOLEAN: PLUS & MINUS
In many search engines, the plus and minus symbols can be used as
alternatives to full Boolean AND and AND NOT. The plus sign (+) is the
equivalent of AND, and the minus sign (-) is the equivalent of AND NOT.
There is no space between the plus or minus sign and the keyword.
PHRASE SEARCHING
Surrounding a group of words with double quotes tells the search engine to
only retrieve documents in which those words appear side-by-side. Phrase
searching is a powerful search technique for significantly narrowing your
search results, and it should be used as often as possible

WWW is synonymous with HTTP


The World Wide Web (WWW) is a popular term used to denote the hypertext
transfer protocol (HTTP). Based on the concept of "hypertext" put forth by
Vannevar Bush in 1945 and coined by Ted Nelson, the purpose of HTTP is to
share and distribute information. Other applications have tried to implement
the concept of hypertext (like HyperCard of Apple Computer), but HTTP
seems to be the best implementation to date.

USES OF INTERNET
Communication:
The foremost target of internet has always been the communication. And
internet has excelled beyond the expectations .Still; innovations are going
on to make it faster, more reliable. By the advent of computer’s Internet,
our earth has reduced and has attained the form of a global village.

Information
Information is probably the biggest advantage internet is offering. The
Internet is a virtual treasure trove of information. Any kind of information on
any topic under the sun is available on the Internet. The search engines like
Google, yahoo is at your service on the Internet. You can almost find any
type of data on almost any kind of subject that you are looking for. There is
a huge amount of information available on the internet for just about every
subject known to man, ranging from government law and services, trade
fairs and conferences, market information, new ideas and technical support,
the list is end less.

Entertainment
Entertainment is another popular raison d'être why many people prefer to
surf the Internet. In fact, media of internet has become quite successful in
trapping multifaceted entertainment factor. Downloading games, visiting
chat rooms or just surfing the Web are some of the uses people have
discovered. There are numerous games that may be downloaded from the
Internet for free. The industry of online gaming has tasted dramatic and
phenomenal attention by game lovers. Chat rooms are popular because
users can meet new and interesting people. In fact, the Internet has been
successfully used by people to find life long partners. When people surf the
Web, there are numerous things that can be found. Music, hobbies, news
and more can be found and shared on the Internet.

Services
Many services are now provided on the internet such as online banking, job
seeking, purchasing tickets for your favorite movies, guidance services on
array of topics engulfing the every aspect of life, and hotel reservations.
Often these services are not available off-line and can cost you more.

HTML
HTML, which stands for HyperText Markup Language, is the
predominant markup language for web pages. It provides a means to create
structured documents by denoting structural semantics for text such as
headings, paragraphs, lists etc as well as for links, quotes, and other items.
It allows images and objects to be embedded and can be used to create
interactive forms. It is written in the form of HTML elements consisting of
"tags" surrounded by angle brackets within the web page content. It can
include or can load scripts in languages such as JavaScript which affect the
behavior of HTML processors like Web browsers; and Cascading Style
Sheets (CSS) to define the appearance and layout of text and other
material. The W3C, maintainer of both HTML and CSS standards,
encourages the use of CSS over explicit presentational markup.

URL
Uniform Resource Locator, the global address of documents and other
resources on the World Wide Web.
The first part of the address is called a protocol identifier and it indicates
what protocol to use, and the second part is called a resource name and it
specifies the IP address or the domain name where the resource is located.
The protocol identifier and the resource name are separated by a colon and
two forward slashes.
For example, the two URLs below point to two different files at the domain
pcwebopedia.com. The first specifies an executable file that should be
fetched using the FTP protocol; the second specifies a Web page that should
be fetched using the HTTP protocol:

MIME
Multipurpose Internet Mail Extensions (MIME) is an Internet standard
that extends the format of e-mail to support:
• Text in character sets other than ASCII
• Non-text attachments
• Message bodies with multiple parts
• Header information in non-ASCII character sets
MIME's use, however, has grown beyond describing the content of e-mail to
describing content type in general, including for the web (see Internet
media type).
Virtually all human-written Internet e-mail and a fairly large proportion of
automated e-mail is transmitted via SMTP in MIME format. Internet e-mail is
so closely associated with the SMTP and MIME standards that it is
sometimes called SMTP/MIME e-mail.

WEB BROWSER & PLUGIN


Web browsers use plug-ins to play video and presentation formats (Flash,
QuickTime, Microsoft Silverlight, 3DMLW). consists of a computer program
that interacts with a host application (a web browser or an email client, for
example) to provide a certain, usually very specific, function "on demand".
Add-on is often considered the general term comprising plug-ins,
extensions, and themes as subcategories.[1]
Applications support plug-ins for many reasons. Some of the main reasons
include:
• to enable third-party developers to create capabilities to extend an
application
• to support features yet unforeseen
• to reduce the size of an application
• to separate source code from an application because of incompatible
software licenses.
NETMEETING
Microsoft NetMeeting was a VoIP and multi-point videoconferencing
client included in many versions of Microsoft Windows (from Windows 95
OSR2 to Windows XP). It uses the H.323 protocol for video and audio
conferencing, and is interoperable with OpenH323-based clients such as
Ekiga, and Internet Locator Service (ILS) as reflector. It also uses a slightly
modified version of the ITU T.120 Protocol for whiteboarding, application
sharing, desktop sharing, remote desktop sharing (RDS) and file transfers.
The secondary Whiteboard in NetMeeting 2.1 and later utilizes the H.324
protocol.

HTML
What is HTML?
HTML is a language for describing web pages.
• HTML stands for Hyper Text Markup Language
• HTML is not a programming language, it is a markup language
• A markup language is a set of markup tags
• HTML uses markup tags to describe web pages

HTML Tags
HTML markup tags are usually called HTML tags
• HTML tags are keywords surrounded by angle brackets like <html>
• HTML tags normally come in pairs like <b> and </b>
• The first tag in a pair is the start tag, the second tag is the end tag
• Start and end tags are also called opening tags and closing tags
HTML Headings
HTML headings are defined with the <h1> to <h6> tags.

Example
<h1>This is a
heading</h1>
<h2>This is a
heading</h2>
<h3>This is a
heading</h3>
HTML Paragraphs
HTML paragraphs are defined with the <p> tag.

Example
<p>This is a paragraph</p>
<p>This is another paragraph</p>

HTML Links
HTML links are defined with the <a> tag.

Example
<a
href="http://www.w3schools.com">Thi
s is a link</a>

Note: The link address is provided as an attribute.


(You will learn about attributes in a later chapter of this tutorial)

HTML Images
HTML images are defined with the <img> tag.

Example
<img src="w3schools.jpg" width="104" height="142" />

Text Formatting Tags


Tag Description

<b> Defines bold text

<big> Defines big text

<em> Defines emphasized text

<i> Defines italic text

<small> Defines small text

<strong> Defines strong text


<sub> Defines subscripted text

<sup> Defines superscripted text

<ins> Defines inserted text

<del> Defines deleted text

<s> Deprecated. Use <del> instead

<strike> Deprecated. Use <del> instead

<u> Deprecated. Use styles instead

"Computer Output" Tags


Tag Description

<code> Defines computer code text

<kbd> Defines keyboard text

<samp> Defines sample computer code

<tt> Defines teletype text

<var> Defines a variable

<pre> Defines preformatted text

<listing> Deprecated. Use <pre> instead

<plaintext> Deprecated. Use <pre> instead

<xmp> Deprecated. Use <pre> instead

Citations, Quotations, and Definition Tags


Tag Description

<abbr> Defines an abbreviation

<acronym> Defines an acronym

<address> Defines an address element

<bdo> Defines the text direction

<blockquote> Defines a long quotation


<q> Defines a short quotation

<cite> Defines a citation

<dfn> Defines a definition term

Cascading Style Sheets


Cascading Style Sheets (CSS) is a style sheet language used to describe
the presentation semantics (that is, the look and formatting) of a document
written in a markup language. Its most common application is to style web
pages written in HTML and XHTML, but the language can be applied to any
kind of XML document, including SVG and XUL.
CSS is designed primarily to enable the separation of document content
(written in HTML or a similar markup language) from document
presentation, including elements such as the layout, colors, and fonts. This
separation can improve content accessibility, provide more flexibility and
control in the specification of presentation characteristics, enable multiple
pages to share formatting, and reduce complexity and repetition in the
structural content (such as by allowing for tableless web design).

<style type="text/css">
body {
font-family: Georgia, "Times New Roman",
Times, serif;
color: purple;
background-color: #d8da3d }
h1 {
font-family: Helvetica, Geneva, Arial,
SunSans-Regular, sans-serif }
</style>

TABLES
Using tables to divide the page into different sections is an extremely
powerful tool.
Almost all major sites on the web are using invisible tables to layout the
pages.

The most important layout aspects that can be done with tables are:
• Dividing the page into separate sections.
An invisible table is excellent for this purpose.
• Creating menus.
Typically with one color for the header and another for the links
following in the next lines.
• Adding interactive form fields.
Typically a gray area containing a search option.
• Creating fast loading headers for the page.
A colored table with a text on it loads like a bullet compared to even a
small banner.
• Easy alignment of images that have been cut into smaller pieces.
• A simple way to allow text to be written in two or more columns next to
each other.
• Tables are defined with the <table> tag.

To insert a table on your page you simply add these tags where you
want the table to occur:
<table>
</table>

The above table would be of no use since it has no rows and no


columns.

ROWS:

To add rows to your table use the <tr> and </tr> tags.

Example:
<table>
<tr></tr>
<tr></tr>
</table>

It doesn't make sense to write the above lines in itself, cause you can't
write content outside of table cells.

If you do write things outside of cells it will appear right above the
table.

COLUMNS:

You can divide rows into columns with <td> and </td> tags:

Example:
<table>
<tr> <td>This is row one, left side.</td>
<td>This is row one, right side.</td> </tr>
<tr> <td>This is row two, left side.</td>
<td>This is row two, right side.</td> </tr>
</table>

Result:
This is row one, left This is row one, right
side. side.
This is row two, left This is row two, right
side. side.
These settings can be added to both <tr> and <td> tags.

PROPERTY DESCRIPTION

aligns content to the left


align=
of cells
left
aligns content to the
right
right of cells
center
aligns content to the
center of the cells
sets a background
background=filename
image for the cells
sets a background color
bgcolor=#rrggbb
for the cells
sets color for the border
bordercolor=#rrggbb
of cells
bordercolordark=#rrg sets color for the border
gbb shadow of cells
valign=
top aligns to the top of cells
aligns to the middle of
middle the cells
bottom aligns to the bottom of
cells

specify a minimum
width for the cells in
width=
pixels
n
specify a minimum
n%
width for the cells in
percent of the table
width

minimum height of cells


height=
in pixels
n
minimum height of cells
n%
in percentage of table
height

These settings are only valid for <td> tags.

PROPERT
DESCRIPTION
Y
colspan= number of columns a cell should
n span
protects agains linebreaks, even
though the content
nowrap
of a cell might be wider than the
browser window
rowspan
number of rows a cell should span
=n

Frames

Frames can divide the screen into separate windows.


Each of these windows can contain an HTML document.

A file that specifies how the screen is divided into frames is called a
frameset.

If you want to make a homepage that uses frames you should:


• make an HTML document with the frameset

• make the normal HTML documents that should be loaded into each of
these frames.

When a frameset page is loaded, the browser automatically loads each of


the pages associated with the frames.
The HTML for the above
frameset:

FORMS
An HTML form is a section of a document containing normal content,
markup, special elements called controls (checkboxes, radio buttons,
menus, etc.), and labels on those controls. Users generally "complete" a
form by modifying its controls (entering text, selecting menu items, etc.),
before submitting the form to an agent for processing (e.g., to a Web
server, to a mail server, etc.)
Here's a simple form that includes labels, radio buttons, and push buttons
(reset the form or submit it):
<FORM action="http://somesite.com/prog/adduser" method="post">
<P>
<LABEL for="firstname">First name: </LABEL>
<INPUT type="text" id="firstname"><BR>
<LABEL for="lastname">Last name: </LABEL>
<INPUT type="text" id="lastname"><BR>
<LABEL for="email">email: </LABEL>
<INPUT type="text" id="email"><BR>
<INPUT type="radio" name="sex" value="Male"> Male<BR>
<INPUT type="radio" name="sex" value="Female"> Female<BR>
<INPUT type="submit" value="Send"> <INPUT type="reset">
</P>
</FORM>
HTML defines the following control types:
buttons
Authors may create three types of buttons:
• submit buttons: When activated, a submit button submits a form. A
form may contain more than one submit button.
• reset buttons: When activated, a reset button resets all controls to
their initial values.
• push buttons: Push buttons have no default behavior. Each push
button may have client-side scripts associated with the element's
event attributes. When an event occurs (e.g., the user presses the
button, releases it, etc.), the associated script is triggered.
Authors should specify the scripting language of a push button
script through a default script declaration (with the META
element).
Authors create buttons with the BUTTON element or the INPUT
element. Please consult the definitions of these elements for details
about specifying different button types.
Note. Authors should note that the BUTTON element offers richer
rendering capabilities than the INPUT element.
checkboxes
Checkboxes (and radio buttons) are on/off switches that may be
toggled by the user. A switch is "on" when the control element's
checked attribute is set. When a form is submitted, only "on" checkbox
controls can become successful.
Several checkboxes in a form may share the same control name. Thus,
for example, checkboxes allow users to select several values for the
same property. The INPUT element is used to create a checkbox
control.
radio buttons
Radio buttons are like checkboxes except that when several share the
same control name, they are mutually exclusive: when one is switched
"on", all others with the same name are switched "off". The INPUT
element is used to create a radio button control.
If no radio button in a set sharing the same control name is initially
"on", user agent behavior for choosing which control is initially "on" is
undefined. Note. Since existing implementations handle this case
differently, the current specification differs from RFC 1866 ([RFC1866]
section 8.1.2.4), which states:
At all times, exactly one of the radio buttons in a set is checked. If
none of the <INPUT> elements of a set of radio buttons specifies
`CHECKED', then the user agent must check the first radio button of
the set initially.
Since user agent behavior differs, authors should ensure that in each
set of radio buttons that one is initially "on".
menus
Menus offer users options from which to choose. The SELECT element
creates a menu, in combination with the OPTGROUP and OPTION
elements.
text input
Authors may create two types of controls that allow users to input text.
The INPUT element creates a single-line input control and the
TEXTAREA element creates a multi-line input control. In both cases, the
input text becomes the control's current value.
file select
This control type allows the user to select files so that their contents
may be submitted with a form. The INPUT element is used to create a
file select control.
hidden controls
Authors may create controls that are not rendered but whose values
are submitted with a form. Authors generally use this control type to
store information between client/server exchanges that would
otherwise be lost due to the stateless nature of HTTP (see [RFC2616]).
The INPUT element is used to create a hidden control.
object controls
Authors may insert generic objects in forms such that associated
values are submitted along with other controls. Authors create object
controls with the OBJECT element.
The elements used to create controls generally appear inside a FORM
element, but may also appear outside of a FORM element declaration when
they are used to build user interfaces. This is discussed in the section on
intrinsic events. Note that controls outside a form cannot be successful
controls.

JAVASCRIPT
The main benefit of Javascript is to add additional interaction between the
website and its visitors with just a little extra work by the web developer.
Javascript allows industrious web masters to get more out of their website
than HTML and CSS can provide.
By definition, JavaScript is a client-side scripting language. This means the
web surfer's browser will be running the script. The opposite of client-side is
server-side, which occurs in a language like PHP. PHP scripts are run by the
web hosting server.

JavaScript document.write
The final step of our script was to use a function called document.write,
which writes a string into our HTML document. document.write can be used
to write text, HTML, or a little of both. We passed the famous string of text
to the function to spell out "Hello World!" which it printed to the screen.
HTML & JavaScript Code:
<html>
<body>
<script type="text/JavaScript">
<!--
document.write("Hello World!")
//-->
</script>
</body>
</html>
HTML & JavaScript Code:
<html>
<head>
<script type="text/JavaScript">
<!--
function popup() {
alert("Hello World")
}
//-->
</script>
</head>
<body>
<input type="button" onclick="popup()" value="popup">
</body>
</html>
HTML & JavaScript Code:
<body>
<script type="text/JavaScript">
<!--
var two = 2
var ten = 10
var linebreak = "<br />"
document.write("two plus ten = ")
var result = two + ten
document.write(result)
document.write(linebreak)

document.write("ten * ten = ")


result = ten * ten
document.write(result)
document.write(linebreak)

document.write("ten / two = ")


result = ten / two
document.write(result)
//-->
</script>
</body>
JavaScript Code:
<script type="text/javascript">
<!--
var myNum = 10;

if(myNum == 7){
document.write("Lucky 7!");
}else{
document.write("You're not very lucky today...");
}
//-->
</script>

ARRAY
The following points should always be remembered when using arrays in
JavaScript:
• The array is a special type of variable.
• Values are stored into an array by using the array name and by stating
the location in the array you wish to store the value in brackets.
Example: myArray[2] = "Hello World";
• Values in an array are accessed by the array name and location of the
value. Example: myArray[2];
• JavaScript has built-in functions for arrays, so check out these built-in
array functions before writing the code yourself!
Creating a JavaScript Array
Creating an array is slightly different from creating a normal variable.
Because JavaScript has variables and properties associated with arrays, you
have to use a special function to create a new array. This example shows
how you would create a simple array, store values to it, and access these
values.
JavaScript Code:
<script type="text/javascript">
<!--
var myArray = new Array();

myArray[0] = "Football";
myArray[1] = "Baseball";
myArray[2] = "Cricket";

document.write(myArray[0] + myArray[1] + myArray[2]);


//-->
</script>

When to Use Popups / Alerts


JavaScript alerts are ideal for the following situations:
• If you want to be absolutely sure they see a message before doing
anything on the website.
• You would like to warn the user about something. For example "the
following page contains humor not suitable for those under the age of
14."
• An error has occurred and you want to inform the user of the problem.
• When asking users for confirmation of some action. For example, if
they have just agreed to sign over the deed to their house and you
want to ask them again if they are absolutely positive they want to go
through with this decision!

JavaScript Date Today (Current)


To warm up our JavaScript Date object skills, let's do something easy. If you
do not supply any arguments to the Date constructor (this makes the Date
object) then it will create a Date object based on the visitor's internal clock.
HTML & JavaScript Code:
<h4>It is now
<script type="text/javascript">
<!--
var currentTime = new Date()
//-->
</script>
</h4>

What's a String Function?


The string's functions are useful for finding out more about your string. For
example, the string function split lets you take a string and chop it into
pieces whenever characters that you supply, appear.
It is important to note that these functions do not actually change the string
itself. Rather, they return new strings that you can store for use elsewhere.
In our example, we stored the result of our make-believe function into
myFunctionResult.

String Functions and Properties


The following lessons will teach you how to manipulate, count, reorder,
replace, search and do just about anything else to your JavaScript strings.
These advanced topics will open up a whole new world of choices for the
dynamic webpages you have yet to build!

String Length Property


The length property returns the number of characters that are in a string,
using an integer. Below is the basic code for accessing this property.
JavaScript Code:
<script type="text/javascript">
var myString = "123456";

var length = myString.length;

document.write("The string is this long: " + length);

// Same thing, but using the property inside the write function
document.write("<br />The string is this long: " + myString.length);

</script>
String Changed? Length Might Change
If you were to reference the length property after concatenating (adding)
some characters to the string, then the length property will reflect these
changes. Think of this as a friendly reminder to only check the length of the
string after you are sure it isn't going to be changed.
JavaScript Code:
<script type="text/javascript">
var myString = "123456";
document.write("The string is this long: " + myString.length);

myString = myString + "7890";


document.write("<br />The string is now this long: " + myString.length);

</script>

String Replace Function


The string replace function has two arguments:
1. SearchFor - What word is going to be replaced. This can be a string or
a regular expression.
2. ReplaceText - What the word will be replaced with. This needs to be a
string.
replace returns the new string with the replaces, but if there weren't any
words to replace, then the original string is returned.

Replace Function: String Replace


To start off with, let's just search for a string and replace it with the visitor's
name. The first argument is what we are searching for, and the second
argument is what we are going to replace.
JavaScript Code:
<script type="text/javascript">
var visitorName = "Chuck";
var myOldString = "Hello username! I hope you enjoy your stay username.";
var myNewString = myOldString.replace("username", visitorName);

document.write("Old string = " + myOldString);


document.write("<br />New string = " + myNewString);

</script>
ECMAScript

ECMAScript is a standard script language, developed with the cooperation of


Netscape and Microsoft and mainly derived from Netscape's JavaScript, the
widely-used scripting language that is used in Web pages to affect how they
look or behave for the user. Microsoft states that its latest version of JScript
is the first implementation of the ECMAScript standard. The official
standard, ECMA-262, was developed under the auspices of the European
Computer Manufacturers Association (ECMA). Having the ECMAScript
standard will help ensure more consistency between Netscape, Microsoft,
and any other Web script implementations.

ECMAScript is object-oriented and conceived as a core language to which


can be added the objects of any specific domain or context such as the idea
of a "document." (for example, the World Wide Web Consortium's Document
Object Model). ECMAScript together with the Document Object Model
corresponds closely to the current implementations of JavaScript and
JScript. Although likely to be used mainly as a standard script language for
the World Wide Web, ECMAScript could also be used for any scripted
application.

XML
XML (Extensible Markup Language) is a set of rules for encoding
documents electronically. It is defined in the XML 1.0 Specification produced
by the W3C and several other related specifications; all are fee-free open
standards.[1]
XML’s design goals emphasize simplicity, generality, and usability over the
Internet.[2] It is a textual data format, with strong support via Unicode for the
languages of the world. Although XML’s design focuses on documents, it is
widely used for the representation of arbitrary data structures, for example
in web services.
There are a variety of programming interfaces which software developers
may use to access XML data, and several schema systems designed to aid
in the definition of XML-based languages.
DOM
DOM is the Document Object Model. It is the way forward.
It has become a standard, defined by the W3C . The current, complete
standard is DOM version 1 while version 2 has already been put forward by
the W3C as a recommendation (pending approval as a standard) and
version 3 is being drafted.
All of the major graphical browsers have implemented DOM as an integral
part (part-and-parcel) of their products. DOM was implemented in MSIE5.5
to a considerable extent. It has been implemented more-so in MSIE6 as well
as Net6 and Opera7.
Its capacity is amazing.
DOM gives access to each and every element in an electronic document (be
the document HTML, XHTML, or XML): yes, each and every element, from
top to bottom of a document.
The programmer/designer today just needs to call the element by its id or
by its position in the document ~ to change any element dynamically across
browsers.
To begin to understand this, let's look at:
• the Document Object Mode (DOM) in relation to the Browser Object
Model (BOM).
• the DOM tree structure.
DOM & BOM
Some resources differentiate between the Document Object Model (DOM)
and the Browser Object Model (BOM). While some others do not make the
distinction explicitly, the difference between DOM and BOM can be useful as
a concept.
The Browser Object Model (BOM) makes objects of elements that are proper
to the browser.
We are using the Browser Object Model (BOM) whenever we open a new
window or whenever we create an alert or create a prompt or whenever we
alter the status bar message, etc. Those objects belong to the browser.
For example, when we open a new window, we are using BOM syntax:
window.open();
The object is the window itself. The window belongs to the browser. So, it is
a browser object, and the syntax is BOM, as we may say.
The document is called through a property of the window object:
window.open("url");
The window is the object in this instance. The document is not the object in
the BOM syntax in this instance.
BOM can affect the appearance of some parts of a document sometimes.
The following BOM syntax is an example:
document.bgColor="#color"
Its fuller syntax indicates the relationship more clearly:
window.document.bgColor="#color"
The document has become window object here in the Browser Object Model
(BOM) and so has the background color.
Yes, through its own syntax, BOM can affect some parts of a document
sometimes ~ with the document as an object of the browser's window.
The Browser Object Model (BOM) is different in this way from the Document
Object Model (DOM).
In contrast, DOM concentrates on the document itself and is far more
thorough in its potential affects throughout a document.

Você também pode gostar