• Complain

Brooks - Guide to HTML, JavaScript and PHP

Here you can read online Brooks - Guide to HTML, JavaScript and PHP full text of the book (entire story) in english for free. Download pdf and epub, get meaning, cover and reviews about this ebook. City: London, year: 2014, publisher: Springer London, genre: Computer. Description of the work, (preface) as well as reviews are available. Best literature library LitArk.com created for fans of good reading and offers a wide selection of genres:

Romance novel Science fiction Adventure Detective Science History Home and family Prose Art Politics Computer Non-fiction Religion Business Children Humor

Choose a favorite category and find really read worthwhile books. Enjoy immersion in the world of imagination, feel the emotions of the characters or learn something new for yourself, make an fascinating discovery.

Brooks Guide to HTML, JavaScript and PHP
  • Book:
    Guide to HTML, JavaScript and PHP
  • Author:
  • Publisher:
    Springer London
  • Genre:
  • Year:
    2014
  • City:
    London
  • Rating:
    3 / 5
  • Favourites:
    Add to favourites
  • Your mark:
    • 60
    • 1
    • 2
    • 3
    • 4
    • 5

Guide to HTML, JavaScript and PHP: summary, description and annotation

We offer to read an annotation, description, summary or preface (depends on what the author of the book "Guide to HTML, JavaScript and PHP" wrote himself). If you haven't found the necessary information about the book — write in the comments, we will try to find it.

Brooks: author's other books


Who wrote Guide to HTML, JavaScript and PHP? Find out the surname, the name of the author of the book and a list of all author's works by series.

Guide to HTML, JavaScript and PHP — read online for free the complete book (whole text) full work

Below is the text of the book, divided by pages. System saving the place of the last page read, allows you to conveniently read the book "Guide to HTML, JavaScript and PHP" online for free, without having to search again every time where you left off. Put a bookmark, and you can go to the page where you finished reading at any time.

Light

Font size:

Reset

Interval:

Bookmark:

Make
David R. Brooks Guide to HTML, JavaScript and PHP For Scientists and Engineers 10.1007/978-0-85729-449-4_1 Springer-Verlag London Limited 2011
1. Introducing HTML and JavaScript
David R. Brooks 1
(1)
Institute for Earth Science Research and Education, 2686 Overhill Drive, Eagleville, PA 19403, USA
David R. Brooks
Email:
Abstract
Chapter 1 provides a very brief introduction to using HTML and JavaScript for creating simple Web pages. It presents examples of how JavaScript interfaces with an HTML document to display some printed output in a Web browser window. The chapter introduces the concept of an HTML document as an object, with certain methods and properties accessible through JavaScript to act on that object. Numerous examples show how to modify the appearance of a document by using HTML tags and their attributes, including as part of a text string passed as a calling argument to JavaScripts write() method.
1.1 Introducing the Tools
1.1.1 What Is an HTML Document?
HTML is an acronym for H yper T ext M arkup L anguage. HTML documents , the foundation of all content appearing on the World Wide Web (WWW) , consist of two essential parts: information content and a set of instructions that tells your computer how to display that content. The instructionsthe markup, in editorial jargoncomprise the HTML language. It is not a programming language in the traditional sense, but rather a set of instructions about how to display content. The computer application that translates this description is called a Web browser . Ideally, online content should look the same regardless of the operating system on which a Web browser resides or the browser used. This goal of complete platform independence is achieved only approximately in practice.
These elements define the essential parts of an HTML document: the document itself, a heading section, a title section, and a body. Each of the elements is defined by two tags a start tag and an end tag. Tags are always enclosed in angle brackets: <> . End tags start with a slash ( / ). As will be shown later, some HTML elements have only one tag. Most tags are supposed to occur in pairs, although this rule is enforced only loosely in HTML. In order to support a scripting language such as JavaScript (much more about that later!), another element must be added to the four basic elements:
As used in this book, a script element always contains JavaScript code.
These elements are organized as follows within an HTML document:
The html tag encloses all other tags and defines the boundaries of the HTML document. We will return to the other tags later. script tags often appear inside thetag, but they can appear elsewhere in a document, too. The indenting used to set off pairs of tags is optional, but it makes documents easier to create, read, and edit. This style is part of good programming practice in all languages.
Because JavaScript is so tightly bound to HTML documents, you must learn JavaScript along with at least a subset of HTML. Unfortunately for anyone trying to learn and use HTML and JavaScript, each of the several available browsers is free to implement and support JavaScript in its own way. A browser doesnt even have to support JavaScript at all, although it is hard to imagine why it wouldnt. Browsers can and do incorporate some proprietary HTML and JavaScript features that may not be supported by other browsers. Newer versions of any browser may support features that wont be recognized by earlier versions.
Fortunately, it is possible to work with what is essentially a de facto standardized subset of HTML and JavaScript. As a result, some of the descriptions of the details of HTML and JavaScript in this book will be incomplete; this is not necessarily a bad thing!
Although HTML documents are usually considered to be a way of distributing information for remote access on the Web, they are equally useful when used locally on any computer that has a browser. So, in conjunction with JavaScript (and later with PHP), you can create a self-contained problem-solving environment that can be used locally as well as (literally) globally.
Good programming technique often involves separating the input/output (I/O) interface from the underlying calculations that do the work of a program. The programming environment provided by HTML/JavaScript provides a conceptually elegant means of implementing this strategy. An HTML document provides the I/O interface and JavaScript (and/or PHP, as will be seen later in this book) handle the calculations. An advantage of HTML is that it provides a wealth of interface possibilities that far surpass those of text-based languages such as C.
1.1.2 What Is JavaScript?
JavaScript is an interpreted (rather than compiled ) object-oriented programming language that has been developed for use alongside other Web tools. JavaScript does not operate as a standalone language. It is designed to work together with HTML for creating interactive Web pages. It is not the same as Java, which is a compiled object-oriented language.
JavaScript is used to write client side applications , which means that JavaScript code is sent to a users computer when a Web page is loaded. The code is then executed, basically line by line, by a JavaScript interpreter included as part of the users (clients) Web browser. This arrangement minimizes security issues that can arise when a client computer interacts with the computer that sent the page. It also makes it easy to package an entire problem, with its own user interface and solution, self-contained within a single document. But the inability to interact dynamically with information stored on a server imposes limitations on the kinds of tasks that JavaScript can accomplish.
It is commonplace to refer to any set of written computer instructions as a program. However, this term is more rigorously applied to a separate entity that can be executed on its own. Because JavaScript is interpreted rather than compiled, a separately executable entity is never created. Instead, JavaScript code statements are interpreted and executed one at a time, essentially on the fly. Although this may seem inefficient, there is rarely any discernible time lag associated with executing JavaScript commands on modern computers.
JavaScript is one of a class of scripting languages whose purpose is to access and modify components of an existing information interface. (Microsofts VBScript is another scripting language.) In this case, the interface is an HTML document. As soon as HTML documents on the Web evolved from one-way delivery systems for displaying fixed content, something like JavaScript immediately became necessary. One of its first applications arose from the need to check values entered by users into the fields of HTML forms that can be sent back to the originator. (Forms are discussed in a later chapter.) JavaScript can be used to compare input values against an expected range or set of values and to generate appropriate messages and other actions based on those comparisons.
JavaScript has evolved into a complete programming language with extensive capabilities for manipulating text and handling mathematical operations, useful for a wide range of computing problems. Possible applications include many self-contained scientific and engineering calculations. As noted earlier, JavaScript is restricted to problems that do not need to access external data sources, regardless of whether those sources reside on a local computer or on a remote server.
As previously noted, the major challenge in learning HTML/JavaScript is that it is not a completely standardized environment. The various dialects of HTML and JavaScript pose problems even for experienced programmers. These kinds of problems can be minimized by focusing on an appropriate subset of HTML/JavaScript. This is feasible because there is little reason to use browser-specific subsets of HTML/JavaScript in the context of the topics dealt with in this book.
Next page
Light

Font size:

Reset

Interval:

Bookmark:

Make

Similar books «Guide to HTML, JavaScript and PHP»

Look at similar books to Guide to HTML, JavaScript and PHP. We have selected literature similar in name and meaning in the hope of providing readers with more options to find new, interesting, not yet read works.


Reviews about «Guide to HTML, JavaScript and PHP»

Discussion, reviews of the book Guide to HTML, JavaScript and PHP and just readers' own opinions. Leave your comments, write what you think about the work, its meaning or the main characters. Specify what exactly you liked and what you didn't like, and why you think so.