INTRODUCTION IN JAVASCRIPT

JavaScript is used in millions of Web pages to improve the design, validate forms, and much more. JavaScript was developed by Netscape and is the most popular scripting language on the internet.JavaScript works in all major browsers that are version 3.0 or higher.

What You Should Already Know

Before you continue you should have a basic understanding of the following:
  • WWW, HTML and the basics of building Web pages
What is JavaScript?
  • JavaScript was designed to add interactivity to HTML pages .
  • JavaScript is a scripting language - a scripting language is a lightweight programming language .
  • A JavaScript is lines of executable computer code .
  • A JavaScript is usually embedded directly in HTML pages .
  • JavaScript is an interpreted language (means that scripts execute without preliminary compilation) .
  • Everyone can use JavaScript without purchasing a license .
  • JavaScript is supported by all major browsers, like Netscape and Internet Explorer .

Are Java and JavaScript the same? NO!

Java and JavaScript are two completely different languages!
Java (developed by Sun Microsystems) is a powerful and very complex programming language - in the same category as C and C++.

What can a JavaScript Do?

  • JavaScript gives HTML designers a programming tool - HTML authors are normally not programmers, but JavaScript is a scripting language with a very simple syntax! Almost anyone can put small "snippets" of code into their HTML pages .
  • JavaScript can put dynamic text into an HTML page - A JavaScript statement like this: document.write("<h1>" + name + "</h1>") can write a variable text into an HTML page .
  • JavaScript can react to events - A JavaScript can be set to execute when something happens, like when a page has finished loading or when a user clicks on an HTML element.
  • JavaScript can read and write HTML elements - A JavaScript can read and change the content of an HTML element .
  • JavaScript can be used to validate data - A JavaScript can be used to validate form data before it is submitted to a server, this will save the server from extra processing .

JavaScript How To ...

The HTML<script> tag is used to insert a JavaScript into an HTML page.
How to Put a JavaScript Into an HTML Page.

<html>
<body>
<script type="text/JavaScript">
document write("HELLO WORLD")
</script>
</body>
</html>

The code above will produce this output on an HTML page:

CSS (Cascasding Style Sheet)

What is CSS?

CSS was first developed in 1997, as a way for Web developers to define the look and feel of their Web pages. It was intended to allow developers to separate content from design so that HTML could perform more of the function that it was originally based on - the markup of content, without worry about the design and layout.
CSS didn't gain in popularity until around 2000, when Web browsers began using more than the basic font and color aspects of CSS. And now, all modern browsers support all of
CSS Level 1, most of CSS Level 2, and some aspects of CSS Level 3.
Web Designers that don't use CSS for their design and development of Web sites are rapidly becoming a thing of the past. And it is arguably as important to understand CSS as it is to know HTML - and some would say it was more important to know CSS.

CSS is an Abbreviation


It stands for Cascading Style Sheet.

Style sheet refers to the document itself. Style sheets have been used for document design for years. They are the technical specifications for a layout, whether print or online. Print designers use style sheets to insure that their designs are printed exactly to specifications. A style sheet for a Web page serves the same purpose, but with the added functionality of also telling the viewing engine (the Web browser) how to render the document being viewed.

Have Some Choices of How to Use the CSS, either internally or externally.

Internal Stylesheet


First we will explore the internal method. This way you are simply placing the CSS code within the <head></head> tags of each (X)HTML file you want to style with the CSS. The format for this is shown in the example below.


<head>
<title>My_Css<title>
<style type="text/css">
*CSS Content Goes Here*
</style>
</head>
<body>


With this method each (X)HTML file contains the CSS code needed to style the page. Meaning that any changes you want to make to one page, will have to be made to all. This method can be good if you need to style only one page, or if you want different pages to have varying styles.

External Stylesheet


Next we will explore the external method. An external CSS file can be created with any text or HTML editor such as "Notepad" or "Dreamweaver". A CSS file contains no (X)HTML, only CSS. You simply save it with the .css file extension. You can link to the file externally by placing one of the following links in the head section of every (X)HTML file you want to style with the CSS file.


<link rel="stylesheet" type="text/css" href="Path To stylesheet.css" />


Or you can also use the @import method as shown below


<style type="text/css">@import url(Path To stylesheet.css)</style>


Either of these methods are achieved by placing one or the other in the head section as shown in example below.


<head>
<title>MY Css<title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>,
<body>

or

<head>
<title>My Css<title>
<style type="text/css"> @import url(Path To stylesheet.css)
</style>
</head>
<body>


By using an external style sheet, all of your (X)HTML files link to one CSS file in order to style the pages. This means, that if you need to alter the design of all your pages, you only need to edit one .css file to make global changes to your entire website.


Here are a few reasons this is better.
  • Easier Maintenance
  • Reduced File Size
  • Reduced Bandwidth
  • Improved Flexibility

Cascading Order

In the previous paragraphs, I have explained how to link to a css file either internally or externally. If you understood, than I am doing a good job. If not don't fret, there is a long way to go before we are finished. Assuming you have caught on already, you are probably asking, well can I do both? The answer is yes. You can have both internal, external, and now wait a minute a third way? Yes inline styles also.

Inline Styles

Is not mentioned them until now because in a way they defeat the purpose of using CSS in the first place. Inline styles are defined right in the (X)HTML file along side the element you want to style. See example below.

&lt;p style="color: #ff0000;">Some red text</p>

[result]
Some red text

Inline styles will NOT allow the user to change styles of elements or text formatted this way

All the various methods will cascade into a new "pseudo" stylesheet in the following order:

  1. Inline Style (inside (X)HTML element)
  2. Internal Style Sheet (inside the <head> tag)
  3. External Style Sheet
As far as which way is better, it depends on what you want to do. If you have only one file to style then placing it within the <head></head> tags (internal) will work fine. Though if you are planning on styling multiple files then the external file method is the way to go.

Choosing between the <link related=> & the @import methods are completely up to you. I will mention that the @import method may take a second longer to read the CSS file in Internet Explorer than the <link related=> option.

Users with Disabilities

The use of external style sheets also can benefit users that suffer from disabilities. For instance, a user can turn off your stylesheet or substitute one of there own to increase text size, change colors and so on. For more information on making your website accessible to all users please read Dive into accessibility

Power Users

Swapping stylesheets is beneficial not only for users with disabilities, but also power users who are particular about how they read Web documents.


Browser Issues


You will discover as you delve farther into the world of CSS that all browsers are not created equally, to say the least. CSS can and will render differently in various browsers causing numerous headaches.

HTML ELEMENTS

**not yet available***

Introduction to HTML

What is an HTML File?

  • HTML stands for Hyper Text Markup Language.
  • An HTML file is a text file containing small markup tags.
  • The markup tags tell the Web browser how to display the page.
  • An HTML file must have an htm or html file extension.
  • An HTML file can be created using a simple text editor.


Do You Want to Try It?

you are running Windows, start Notepad (or start SimpleText if you are on a Mac) and type in the following text:

<html>
<head>
<title>Title of page</title>
</head>
<body>
This is my first homepage. <b>This text is bold</b>
</body>
</html>


Save the file as "mypage.htm".
Start your Internet browser. Select "Open" (or "Open Page") in the File menu of your browser. A dialog box will appear. Select "Browse" (or "Choose File") and locate the HTML file you just created - "mypage.htm" - select it and click "Open". Now you should see an address in the dialog box, for example "C:\MyDocuments\mypage.htm". Click OK, and the browser will display the page.


Example Explained

The first tag in your HTML document is <html> . This tag tells your browser that this is the start of an HTML document. The last tag in your document is </html>. This tag tells your browser that this is the end of the HTML document.
The text between the <head> tag and the </head> tag is header information. Header information is not displayed in the browser window.
The text between the <title> tags is the title of your document. The title is displayed in your browser's caption.
The text between the <body> tags is the text that will be displayed in your browser.
The text between the <b> and </b> tags will be displayed in a bold font.


HTM or HTML Extension?

When you save an HTML file, you can use either the .htm or the .html extension. We have used .htm in our examples. It might be a bad habit inherited from the past when some of the commonly used software only allowed three letter extensions.
With newer software we think it will be perfectly safe to use .html.


Note on HTML Editors:

You can easily edit HTML files using a WYSIWYG (what you see is what you get) editor like FrontPage, Claris Home Page, or Adobe PageMill instead of writing your markup tags in a plain text file.
But if you want to be a skillful Web developer, we strongly recommend that you use a plain text editor to learn your primer HTML.


Frequently Asked Questions

Q: After I have edited an HTML file, I cannot view the result in my browser. Why?
A: Make sure that you have saved the file with a proper name and extension like "c:\mypage.htm". Also make sure that you use the same name when you open the file in your browser.

Q: I have tried to edit an HTML file but the changes don't show in the browser. Why?
A: The browser caches your pages so it doesn't have to read the same page twice. When you have changed a page, the browser doesn't know that. Use the browser's refresh/reload button to force the browser to read the edited page.

Q: Can I use both Internet Explorer and Netscape Navigator?
A: Yes, you can do all your training with both Netscape 3.0 or higher, and Internet Explorer 3.0 or higher. However, a few of the examples in our advanced classes assume you are running Internet Explorer 4.0 or 5.0, or Netscape 6.0.

Q: Does my computer have to run Windows? What about a Mac?
A: You can do all your training on a non Windows computer like a Mac. However, a few of the examples in our higher classes assume that you are running a newer version of Windows, like Windows 98 or Windows 2000.

WEB PROGRAMMING : INTRODUCTION TO WEB PROGRAMMING

The Internet and The Web

  • Greatest milestone in the development of computer technology is the Internet.
  • The Internet or Interconnection of Networks or Interconnected Networks is composed of various resources: ftp, telner, usenet groups, e-mail, chat and instant messaging, and world wide web.
  • Internet provides an infrastructure by which the computers it connects (called hosts) can communicate.
  • Internet cannot store info or provide services. Thus, for info and services to be accessible via the Internet, they must be stored or implemented on, or accessed via, the "hosts" or "SERVERS".
  • The idea that computers request resources and others provide them is referred to as "Client/Server Architecture".
  • Internet supports various types of servers: FTP servers, mail servers, gopher servers, and web servers.
  • The Internet has developed a subculture dedicated to the idea that the Internet is not owned or controlled by any one person, company, group, or organization.
  • Ray Tomlinson created in 1971 what was to become the standard Internet e-mail address format using the ‘@’ sign to separate user names from host names.

The Web Technology

  • Web uses the Internet to provide facilities for storing information, finding and retrieving information, storing and executing computer programs, inputting and manipulating information.
  • Anyone with access to web can add any document and link it to any other existing document enabling the web to form a global, inter-linked information source.
  • Web is used for publicity and commercial and non-commercial purposes.
  • Web servers are computers that provide information and services that can be access on the Web (i.e. Apache, Microsoft’s Internet Information Services or IIS, Zeus, Sambar, iPlanet, Roxen, Jigsaw, etc.)

The World Wide WebWhat is the World Wide Web?

  • The World Wide Web (WWW) is most often called the Web.
  • The Web is a network of computers all over the world.
  • All the computers in the Web can communicate with each other.
  • All the computers use a communication standard called HTTP (hyper text transfer protocol).

How does the WWW work?

  • Web information is stored in documents called Web pages.
  • Web pages are files stored on computers called Web servers.
  • Computers reading the Web pages are called Web clients.
  • Web clients view the pages with a program called a Web browser.
  • Popular browsers are Internet Explorer and Netscape Navigator.

How does the browser fetch the pages?

  1. A browser fetches a Web page from a server by a request.
  2. A request is a standard HTTP request containing a page address.
  3. A page address looks like this: http://www.someone.com/page.htm.

How does the browser display the pages?

  1. All Web pages contain instructions for display.
  2. The browser displays the page by reading these instructions.
  3. The most common display instructions are called HTML tags.
  4. HTML tags look like this <p> This is a paragraph</p>

Who is making the Web standards?

  • The Web standards are not made up by Netscape or Microsoft.
  • The rule-making body of the Web is the W3C.
  • W3C stands for the World Wide Web Consortium.
  • W3C puts together specifications for Web standards.
  • The most essential Web standards are HTML, CSS and XML.
  • The latest HTML standard is XHTML 1.0.

Internet JokeCustomer:

"I don't have a computer. Is the internet available in book form?"


MOYMOY PALABOY and ROADFILL VIDEO CLIPZS

           

Erika



SPARTANZAFFIA

_My CLAn_

_My FamIly_
MMB67

~DarkrOomBoYZ~ IT XPLORE INTERNET CAFE