Definition And Explanation Of Html ,PHP And CSS

Discussion in 'Programming' started by RootShell, Jul 13, 2007.

  1. #1
    HTML
    Hypertext Markup Language
    HTML, short for Hypertext Markup Language, is the predominant markup language for the creation of web pages. It provides a means to describe the structure of text-based information in a document — by denoting certain text as 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 labels (known as tags), surrounded by less-than (<) and greater-than signs (>). HTML can also describe, to some degree, the appearance and semantics of a document, and can include embedded scripting language code which can affect the behavior of web browsers and other HTML processors.

    HTML is also often used to refer to content of the MIME type text/html or even more broadly as a generic term for HTML whether in its XML-descended form (such as XHTML 1.0 and later) or its form descended directly from SGML (such as HTML 4.01 and earlier).

    Basic features
    Structured text web pages, with visually nice formating of:
    chapter and section headings,
    paragraphs and text markups such as italics and bold to stress parts of text,
    unnumbered and numbered lists,
    tables;
    embedding of visible raster images into the text flow;
    links, that allows accessing other web pages on World Wide Web.

    Various variants of HTML integrated with CSS, DOM access through EcmaScript (JavaScript and similar), allows for advanced dynamical web page design, read further on.

    Definition of HTML

    HTML stands for HyperText Markup Language.
    Hypertext is ordinary text that has been dressed up with extra features, such as formatting, images, multimedia, and links to other resources.
    Markup is the process of taking ordinary text and adding extra symbols. Each of the symbols used for markup in HTML is a command that tells a browser how to display the text.

    History of HTML

    Origins
    In 1980, physicist Tim Berners-Lee, who was an independent contractor at CERN, proposed and prototyped ENQUIRE, a hypertext system for CERN researchers to use to share documents. In 1989, Berners-Lee and CERN data systems engineer Robert Cailliau each submitted separate proposals for an Internet-based hypertext system providing similar functionality. The following year, they collaborated on a joint proposal, the WorldWideWeb (W3) project, which was accepted by CERN

    At the time, HTML was not a specification, but a collection of loosely defined elements to solve an immediate problem: the communication and dissemination of ongoing research between Berners-Lee and his colleagues. Rather than reusing existing hypertext systems which were too commercial, too platform-specific, or too complicated for authors, Berners-Lee developed his own, relatively simple system. His original browsing software, a client called "WorldWideWeb", interacting with a server called "httpd", was written in November 1990 on a NeXTcube workstation, using the NEXTSTEP development environment. It tied together his inventions of a document identification system (which later evolved into the URI standard), a protocol (HTTP) for transmitting documents over a TCP/IP network, and a document annotation convention he later referred to as Hypertext Markup Language (HTML). HTML essentially grafted hypertext capability onto a homegrown SGML-like markup language, and Berners-Lee's software allowed a computer user to view and navigate between HTML documents accessed via the Internet.[3][4] His solution later combined with the emerging international and public Internet to garner worldwide attention.

    First specifications

    The first publicly available description of HTML was a document called "HTML Tags", first mentioned on the Internet by Berners-Lee in late 1991.[5][6] It describes 22 elements comprising the initial, relatively simple design of HTML. Thirteen of these elements still exist in HTML 4.[7]

    Berners-Lee considered HTML to be, at the time, an "application" of SGML,[8] but it was not formally defined as such until the mid-1993 publication, by the IETF, of the first proposal for an HTML specification: Berners-Lee and Dan Connolly's "Hypertext Markup Language (HTML)" Internet-Draft, which included an SGML Document Type Definition to define the grammar. The draft expired after six months, but was notable for its acknowledgment of the NCSA Mosaic browser's custom tag for embedding in-line images, reflecting the IETF's philosophy of basing standards on successful prototypes.[9] Similarly, Dave Raggett's competing Internet-Draft, "HTML+ (Hypertext Markup Format)", from late 1993, suggested standardizing already-implemented features like tables and fill-out forms.[10]

    After the HTML and HTML+ drafts expired in early 1994, the IETF created an HTML Working Group, which in 1995 completed "HTML 2.0", the first HTML specification intended to be treated as a standard against which future implementations should be based.[9] Published as Request for Comments 1866, HTML 2.0 included ideas from the HTML and HTML+ drafts.[11] There was no "HTML 1.0"; the 2.0 designation was intended to distinguish the new edition from previous drafts.[12]

    Further development under the auspices of the IETF was stalled by competing interests. Since 1996, the HTML specifications have been maintained, with input from commercial software vendors, by the World Wide Web Consortium (W3C).[3] However, in 2000, HTML also became an international standard (ISO/IEC 15445:2000). The last HTML specification published by the W3C is the HTML 4.01 Recommendation, published in late 1999. Its issues and errors were last acknowledged by errata published in 2001.

    Increasing strictness

    Early HTML syntax rules and processing requirements were ambiguous or, by design, lenient; when confronted with unfamiliar or poorly-authored markup, Web browsers commonly made assumptions about intent and proceeded with rendering of the document.[13] This helped speed the adoption of HTML by document authors. Over time, as the use of authoring tools increased and more consistent browser behavior was demanded, the trend in the official standards has been to create an increasingly strict language syntax, demanding more precise code. Most browsers, however, continue to forgivingly render documents that are far from valid HTML.

    Since the publication of HTML 4.0 in late 1997, the W3C's HTML Working Group focused increasingly — and from 2002 through 2006, exclusively — on the development of XHTML, an XML-based counterpart to HTML that is described on one W3C web page as HTML's "successor".[14][15][16] In 2007, the old HTML Working Group was renamed to XHTML2 Working Group and a new HTML Working Group was chartered to continue the development of HTML.

    XHTML is a reformulation of HTML as an XML vocabulary, and can be mixed with other XML vocabularies such as SVG and MathML. XHTML served using the media type for HTML, text/html, has been embraced by many web standards advocates in preference to HTML. XHTML is routinely characterized by mass-media publications for both general and technical audiences as the newest "version" of HTML, but W3C publications, as of 2007, do not make such a claim. Neither HTML 3.2 nor HTML 4.01 have been explicitly rescinded, deprecated, or superseded by any W3C publications;[17] as of 2007, they continue to be listed alongside XHTML as current Recommendations in the W3C's primary publication indices.[18][19][20]

    New development

    In November 2006, the W3C published a new draft charter indicating its intent to resume development of HTML in a manner that unifies HTML and XHTML 1.x, allowing this hybrid language to manifest in both an XML format and a "classic HTML" format that is not strictly SGML-based. Among other things, it is planned that the new specification, to be refined and released from 2007 to 2010, will include conformance and parsing requirements, DOM APIs, and new widgets and APIs. The group also intends to publish test suites and validation tools.[21][22] The new HTML working group was rechartered in March 2007[23] The old HTML working group was rechartered and renamed to XHTML2 WG[24].

    On 2007-04-10, the Mozilla Foundation, Apple Computer and Opera Software proposed[25] that the new HTML working group of the W3C adopt the WHATWG’s HTML 5 as the starting point of its work and name its future deliverable “HTML 5”. On 2007-05-09, the new HTML working group resolved to do that .


    PHP​

    Personal Home Page PHP
    PHP is a reflective programming language originally designed for producing dynamic web pages.[1] PHP is used mainly in server-side scripting, but can be used from a command line interface or in standalone graphical applications. Textual User Interfaces can also be created using ncurses.

    The main implementation is produced by The PHP Group and released under the PHP License. It is considered to be free software by the Free Software Foundation[2]. This implementation serves to define a de facto standard for PHP, as there is no formal specification.

    History

    PHP was written as a set of CGI binaries in the C programming language by the Danish/Greenlandic programmer Rasmus Lerdorf in 1994, to replace a small set of Perl scripts he had been using to maintain his personal homepage.[3] Lerdorf initially created PHP to display his résumé and to collect certain data, such as how much traffic his page was receiving. Personal Home Page Tools was publicly released on 8 June 1995 after Lerdorf combined it with his own Form Interpreter to create PHP/FI (this release is considered PHP version 2).[4]

    Zeev Suraski and Andi Gutmans, two Israeli developers at the Technion IIT, rewrote the parser in 1997 and formed the base of PHP 3, changing the language's name to the recursive initialism PHP: Hypertext Preprocessor. The development team officially released PHP/FI 2 in November 1997 after months of beta testing. Public testing of PHP 3 began and the official launch came in June 1998. Suraski and Gutmans then started a new rewrite of PHP's core, producing the Zend Engine in 1999.[5] They also founded Zend Technologies in Ramat Gan, Israel, which actively manages the development of PHP.

    In May 2000, PHP 4, powered by the Zend Engine 1.0, was released. The most recent update released by The PHP Group, is for the older PHP version 4 code branch which, as of May 2007, is up to version 4.4.7. PHP 4 is currently still supported by security updates for those applications that require it.

    On July 13, 2004, PHP 5 was released powered by the new Zend Engine II. PHP 5 included new features such as:[6]
    Support for object-oriented programming
    The PHP Data Objects extension, which defines a lightweight and consistent interface for accessing databases
    Performance enhancements
    Better support for MySQL
    Embedded support for SQLite
    Integrated SOAP support
    Data iterators
    Error handling via exceptions

    The latest stable version, PHP 5.2.3, was released on June 1, 2007.

    Usage

    PHP generally runs on a web server, taking PHP code as its input and creating Web pages as output, however it can also be used for command-line scripting and client-side GUI applications. PHP can be deployed on most web servers and on almost every operating system and platform free of charge. The PHP Group also provides the complete source code for users to build, customize and extend for their own use.

    Server-side scripting

    Originally designed to create dynamic web pages, PHP's principal focus is server-side scripting. While running the PHP parser with a web server and web browser, the PHP model can be compared to other server-side scripting languages such as Microsoft's ASP.NET system, Sun Microsystems' JavaServer Pages, mod_perl and the Ruby on Rails framework, as they all provide dynamic content to the client from a web server. To more directly compete with the "framework" approach taken by these systems, Zend is working on the Zend Framework - an emerging (as of June 2006) set of PHP building blocks and best practices; other PHP frameworks along the same lines include CakePHP, PRADO and Symfony.

    The LAMP architecture has become popular in the Web industry as a way of deploying inexpensive, reliable, scalable, secure web applications. PHP is commonly used as the P in this bundle alongside Linux, Apache and MySQL, although the P can also refer to Python or Perl. PHP can be used with a large number of relational database management systems, runs on all of the most popular web servers and is available for many different operating systems. This flexibility means that PHP has a wide installation base across the Internet; over 19 million Internet domains are currently hosted on servers with PHP installed.[7]

    Examples of popular server-side PHP applications include phpBB, WordPress, and MediaWiki.

    Command-line scripting

    PHP also provides a command line interface SAPI for developing shell and desktop applications, daemons, log parsing, or other system administration tasks. PHP is increasingly used on the command line for tasks that have traditionally been the domain of Perl, Python, awk, or shell scripting.[citation needed]

    Client-side GUI applications

    PHP provides bindings to GUI libraries such as GTK+ (with PHP-GTK), Qt (with PHP-Qt) and text mode libraries like ncurses in order to facilitate development of a broader range of cross-platform GUI applications.

    Syntax

    PHP primarily acts as a filter. The PHP program takes input from a file or stream containing text and special PHP instructions and outputs another stream of data for display. From PHP 4, the PHP parser compiles input to produce bytecode for processing by the Zend Engine, giving improved performance over its interpreter predecessor. The Zend Engine II is at the heart of PHP 5.

    The usual Hello World code example for PHP is:
    <?php 
    echo 'Hello, World!'; 
    ?> 
    PHP:
    PHP only parses code within its delimiters, such as <?php ?>. Anything outside its delimiters is sent directly to the output and not parsed by PHP. The example above is equivalent to the following text (and indeed is converted into this form):
    Hello, World!


    The primary use of this is to allow PHP statements to be embedded within HTML documents, for example:
    <?php 
    // PHP statements here 
    ?> 
    Regular HTML here 
    <?php 
    // More PHP Statements 
    ?>
    PHP:
    Variables are prefixed with a dollar symbol and a type does not need to be specified in advance. Unlike function and class names, variable names are case sensitive. Both double-quoted ("") and heredoc strings allow the ability to embed the variable's value into the string.

    PHP treats new lines as whitespace, in the manner of a free-form language (except when inside string quotes). Statements are terminated by a semicolon, except in a few special cases.

    PHP has three types of comment syntax: /* */ which serves as block comments, and // as well as # which is used for inline comments.

    Data types

    PHP stores whole numbers in a platform-dependent range. This range is typically that of 32-bit signed integers. Integer variables can be assigned using decimal (positive and negative), octal and hexadecimal notations. Real numbers are also stored in a platform-specific range. They can be specified using floating point notation, or two forms of scientific notation.

    PHP has a native Boolean type, named "boolean", similar to the native Boolean types in Java and C++. Using the Boolean type conversion rules, non-zero values can be interpreted as true and zero as false, as in Perl.

    The null data type represents a variable that has no value. The only value in the null data type is NULL.

    Variables of the "resource" type represent references to resources from external sources. These are typically created by functions from a particular extension, and can only be processed by functions from the same extension. Examples include file, image and database resources.

    Arrays support both numeric and string indices, and are heterogeneous. Arrays can contain elements of any type that PHP can handle, including resources, objects, and even other arrays. Order is preserved in lists of values and in hashes with both keys and values, and the two can be intermingled.

    Objects

    Basic Object-oriented programming functionality was added in PHP 3. Handling of objects was completely rewritten for PHP 5, allowing for better performance and more features. In previous versions of PHP, objects were handled like primitive types. The drawback of this method was that the whole object was copied when a variable was assigned, or passed as a parameter to a method. In the new approach, objects are referenced by handle, and not by value. PHP 5 introduced private and protected member variables and methods, along with abstract classes and abstract methods. It also introduced a standard way of declaring constructors and destructors similar to that of other object-oriented languages, such as C++, and an exception handling model similar to that of other programming languages.

    The static method and class variable features in Zend Engine 2 do not work the way some expect. There is no virtual table feature in the engine, so the static variables are bound with a name at compile time instead of with a reference.

    If the developer asks to create a copy of an object by using the reserved word clone, the Zend engine will check if a __clone() method has been defined or not. If not, it will call a default __clone() which will copy all of the object's properties. If a __clone() method is defined, then it will be responsible to set the necessary properties in the created object. For convenience, the engine will supply a function that imports all of the properties from the source object, so that they can start with a by-value replica of the source object, and only override properties that need to be changed.
    Support

    PHP has a formal development manual that is maintained by the free software community. In addition, answers to many questions can often be found by doing a simple internet search. PHP users assist each other through various media such as chat, forums, newsgroups and PHP developer web sites. In turn, the PHP development team actively participates in such communities, garnering assistance from them in their own development effort (PHP itself) and providing assistance to them as well. There are many help resources[8] available for the novice PHP programmer.
     
    RootShell, Jul 13, 2007 IP
  2. RootShell

    RootShell Well-Known Member

    Messages:
    855
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    130
    Digital Goods:
    1
    #2
    CSS

    Cascading Style Sheets
    In web design, Cascading Style Sheets (CSS) is a stylesheet language used to describe the presentation 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. The CSS specifications are maintained by the World Wide Web Consortium (W3C).

    CSS has various levels and profiles. Each level of CSS builds upon the last, typically adding new features and are typically denoted as CSS1, CSS2, and CSS3. Profiles are typically a subset of one or more levels of CSS built for a particular device or user interface. Currently there are profiles for mobile devices, printers, and television sets. Profiles should not be confused with media types which were added in CSS2.

    The use of CSS to position the content of a web page is sometimes referred to as CSS-P or CSS

    Overview

    CSS is used by both the authors and readers of web pages to define colors, fonts, layout, and other aspects of document presentation. 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 presentational characteristics, and reduce complexity and repetition in the structural content. CSS can also allow the same markup page to be presented in different styles for different rendering methods, such as on-screen, in print, by voice (when read out by a speech-based browser or screen reader) and on braille-based, tactile devices. Similarly, identical HTML or XML markup can be displayed in a variety of styles, liveries or color schemes by using different CSS.

    CSS information can be provided by various sources:
    Author styles (style information provided by the web page author), in the form of
    external stylesheets, i.e. a separate CSS-file referenced from the document
    embedded style, blocks of CSS information inside the HTML document itself
    inline styles, inside the HTML document, style information on a single element, specified using the "style" attribute.
    User style
    a local CSS-file specified by the user using options in the web browser, and acting as an override, to be applied to all documents.
    User agent style
    the default style sheet applied by the user agent, e.g. the browser's default presentation of elements.

    CSS specifies a priority scheme to determine which style rules apply if more than one rule matches against a particular element. In this so-called cascade, priorities or weights are calculated and assigned to rules, so that the results are predictable.

    Advantages

    Advantages of using CSS include:
    Presentation information for an entire website or collection of pages can be held in one CSS file, allowing sweeping changes to be propagated with quick changes to this one file.
    Web browser software can store a copy of the CSS file in the computers cache, so that it doesn't have to be downloaded each time the user views a web page that references it.
    Different users can have different style sheets: for example a large text alternative for visually-impaired users, or a layout optimized for small displays for mobile phones.
    The document code is reduced in size and complexity, since it does not need to contain any presentational markup.

    Syntax

    CSS has a simple syntax, and uses a number of English keywords to specify the names of various style properties.

    A style sheet consists of a list of rules. Each rule or rule-set consists of one or more selectors and a declaration block. A declaration-block consists of a list of semicolon-separated declarations in curly braces. Each declaration itself consists of a property, a colon (, a value, then a semi-colon (.[1]

    Example:
    p { 
    font-family: "Garamond", serif; 
    } 
    h2 { 
    font-size: 110%; 
    color: red; 
    background: white; 
    } 
    .note { 
    color: red; 
    background: yellow; 
    font-weight: bold; 
    } 
    p.warning { 
    background: url(warning.png) no-repeat fixed top; 
    } 
    #paragraph1 { 
    margin: 0; 
    } 
    a:hover { 
    text-decoration: none; 
    } 
    #news p { 
    color: red; 
    } 
    
    Code (markup):
    In this example are seven rules with selectors p, h2, .note, p.warning, #paragraph1, a:hover and the space-separated pair of selectors #news p. After each selector are the declarations such as color: red;, where the property color is given the value red.

    In the first two rules, the HTML elements p (paragraph) and h2 (level-two heading) are being assigned stylistic attributes. The paragraph element will be rendered in Garamond font or, if Garamond is unavailable, some other serif font. The level-two heading element will be rendered in red on a white background.

    The third rule shown matches those elements that have a class attribute containing the token 'note'. For example:
    <p class="note">This paragraph will be rendered in red and bold, with a yellow background.</p>.

    This rule, .note could also have been written as *.note.

    The fourth rule shown matches those p elements that have a class attribute containing the token 'warning'. This is in contrast to the third rule which matched all elements, not just paragraph tags, that are marked with a given class attribute.

    In fact, .class selectors involve a special kind of attribute matching, as opposed to testing for equality. Since the HTML class attribute is defined as a whitespace-separated list of tokens, a class selector is evaluated against each of them separately. For example, <p class="note warning"> would apply both the note and the warning rule.

    The fifth rule will match the one and only element in each HTML document whose id attribute is set to paragraph1: It will have no margin within its rendering 'box' as its margin width is set to zero. For example:
    <p id="paragraph1">This paragraph will have no margin within its rendering
    'box' as its margin width is set to zero. There can only be one of these paragraphs per page
    </p>

    The sixth rule defines the hover style for a (anchor) elements. By default in most browsers, a elements are underlined. This rule will remove the underline when the user "hovers" the mouse cursor over these elements.

    The last rule matches those p elements that are within the document element whose id attribute has the value news. It is an example of a descendant selector.

    Because of the cascading nature of CSS rules, these last p elements will inherit font-family: "Garamond", serif as with all p elements. Those that have the token warning in the value of their class attribute, will inherit that background image too.

    A CSS stylesheet can contain comments. Comments are placed between the delimiters /* and */. For example /* This is a comment in CSS */ Comments can run over multiple lines.

    RootShell ;)
     
    RootShell, Jul 13, 2007 IP
  3. RedruM*

    RedruM* Peon

    Messages:
    626
    Likes Received:
    24
    Best Answers:
    0
    Trophy Points:
    0
    #3
    nice post.
     
    RedruM*, Jul 13, 2007 IP
  4. RootShell

    RootShell Well-Known Member

    Messages:
    855
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    130
    Digital Goods:
    1
    #4
    Thanks Friend
     
    RootShell, Jul 13, 2007 IP
  5. Supergeek

    Supergeek Peon

    Messages:
    138
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Very nice. Should be a sticky.
     
    Supergeek, Jul 13, 2007 IP
  6. chopsticks

    chopsticks Active Member

    Messages:
    565
    Likes Received:
    20
    Best Answers:
    0
    Trophy Points:
    60
    #6
    chopsticks, Jul 13, 2007 IP
  7. ProgrammersTalk

    ProgrammersTalk Peon

    Messages:
    684
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #7
    nice post, thanx :)
     
    ProgrammersTalk, Jul 13, 2007 IP
  8. RootShell

    RootShell Well-Known Member

    Messages:
    855
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    130
    Digital Goods:
    1
    #8
    thanks friends
     
    RootShell, Jul 14, 2007 IP
  9. RootShell

    RootShell Well-Known Member

    Messages:
    855
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    130
    Digital Goods:
    1
    #9
    35 Views and 7 Replies :(
     
    RootShell, Jul 14, 2007 IP
  10. stylistics

    stylistics Peon

    Messages:
    49
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #10
    Uh cool. You should make a website with this information.
     
    stylistics, Jul 14, 2007 IP
  11. RootShell

    RootShell Well-Known Member

    Messages:
    855
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    130
    Digital Goods:
    1
    #11
    yes i have 5 web sites :D if you need someting In Pm :)
     
    RootShell, Jul 15, 2007 IP
  12. RootShell

    RootShell Well-Known Member

    Messages:
    855
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    130
    Digital Goods:
    1
    #12
    57 Views And 10 Views :(
     
    RootShell, Jul 16, 2007 IP
  13. indexu

    indexu Peon

    Messages:
    6
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #13
    thanks great post
    Should be a sticky
     
    indexu, Aug 3, 2007 IP
  14. RootShell

    RootShell Well-Known Member

    Messages:
    855
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    130
    Digital Goods:
    1
    #14
    Thanks Friend for every replies
     
    RootShell, Aug 4, 2007 IP
  15. ravi3984

    ravi3984 Banned

    Messages:
    171
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #15
    its a good one , but too theoretical , can u place some url for practicles

    thanks and regards
    webmaster
     
    ravi3984, Aug 6, 2007 IP
  16. krt

    krt Well-Known Member

    Messages:
    829
    Likes Received:
    38
    Best Answers:
    0
    Trophy Points:
    120
    #16
    Everyone else is too busy looking this same info up on wikipedia!

    I don't mind that you copy pasted, but can you at least quote your sources.

    And stop bumping this thread.
     
    krt, Aug 6, 2007 IP
  17. RootShell

    RootShell Well-Known Member

    Messages:
    855
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    130
    Digital Goods:
    1
    #17
    thanks and sorry :D
     
    RootShell, Aug 6, 2007 IP