Category: Courses

Learn, Practice, Share..

  • HTML Elements

    HTML Elements

    In HTML documents all elements are in the form of tags. HTML elements always starts and ends with the same tags the only difference is the forward slash </end tag>in the ending tag.

    Example 

    <h1>………….</h1>

    <p>………….</p>

    In between tags (elements) contents are inserted.

    Nested HTML Elements

    HTML elements can be in the nested form (One element can contain many elements ).

    Example

    <html>
    <body>
    
    <h1>Main Heading</h1>
    <p>Paragraph.</p>
    
    </body>
    <html>
    

    Empty HTML Element 

    An empty HTML element does not contain anything. They do not have end tags, they are self closed

    Example 

    <br>, <hr>, <img>,<input>, <meta>, <link>

  • HTML Introduction

    HTML Introduction

    Introduction 

    HTML stands for Hypertext Markup Language. HTML is the basis of any webpage, it can be written in the most basic text editor like “notepad” in Windows to most advanc word editors.

    HTML documents are made of texts enclosed in between different types of “tags” these tags are called HTML elements.

    These elements are used for embedding and formatting different information like image, text, links, audio video etc to a web page further CSS (Cascading Style Sheet) is used for page layout and designing purpose.

    A Brief History Of HTML

    HTML 2.0 (1995)

    HTML 2.0 was the first complete version released in 1995 

    HTML 3.0 (January 1997)

    HTML 4.0 (December 1997)

    HTML 5.0 (October 2014)

    Example HTML document

    <!DOCTYPE html>
    <html>
    <body>
    
    <h1>Main Heading</h1>
    <p>Paragraph.</p>
    
    </body>
    <html>
    

    In the above example

    <!DOCTYPE html> is the html5 declaration.

    The whole html document is always enclosed in between html tags

    <html>

    ————————————————————-

    ————————————————————-

    </html>

    <body>—-</body> tag encloses the visible part of the document.

    Heading

    There are total six heading elements in HTML 

    <h1>First Heading</h1>

    <h2> Second Heading</h2>

    <h3>Third Heading</h3>

    <h4>Fourth Heading</h4>

    <h5>Fifth Heading</h5>

    <h6>Sixth Heading</h1>

    Heading size decreases from <h1> to <h6>.

    <p> ……. </p>  element is used for paragraphs. Each element declared in the begining must be closed following a forward slash  (/), except some exceptions which we will discuss later.

  • PHP

    PHP

    PHP is a powerful server scripting language for dynamic and attractive web pages.

    PHP is free and widely used scripting language.

    Echo and print statement

    In PHP to output a data echo and print statement is used

    Echo and print both provides the same output

    echo can be used wih or without parentheses 

    echo or echo ()

    echo statement ends with semicolon  “ ; ”

    Data type

    PHP supports following data types

    Integer

    String

    Float

    Boolean

    Array

    Object

    Null

    Resources 

    PHP Operators 

    • Arithmetic 
    • Assignment 
    • Comparison
    • Increment/Decrement operators
    • Logical operator
    • String
    • Array
    • Conditional assignment 

    PHP Switch 

    Switch statement is used to select one block of many blocks of code to be executed. 

    Like there are many codes to be executed but switch statement will provide us to chose one of them if condition satisfies.

    PHP Functions 

    A function name must start with a letter or _ function names are not case sensitive

    Example

    function functionname() {

    code to be executed;

    }

    PHP Superglabals Variables 

    Superglobal variables are built in variables that are always available

    $_SERVER

    $_SERVER is a super global variables which holds information about headers, paths and script locations.

    $_REQUEST

    $_POST

    $_GET

    $_FILES

    $_ENV

    $_COOKIE

    $_SESSION

    Forms in PHP

    The form is enclosed in form tags

    <Form method=“get” action=“path/to/submit/

     page”

    >

    <!–- form contents –>

    </Form>

    Explaining Form Tags

    action= “path/to/submit/

     page”

    is the page where form data is submitted

    method= “get” is the method which is used to submit form data. There are two methods to get form data “get” and “post”