Академический Документы
Профессиональный Документы
Культура Документы
Ganesh Katrapati
Introduction to HTML HTML stands for Hyper Text Markup Language HTML is not a programming language, it is a markup language HTML uses markup tags to describe web pages HTML user markup tags to describe web pages
The <html> tag tells the browser that this is an HTML document.The html element is the outermost element in HTML documents. The html element is also known as the root element.
The head element is a container for all the head elements. Elements inside <head> can include scripts, instruct the browser where to find style sheets, provide meta information, and more.The following tags can be added to the head section: <base>, <link>, <meta>, <script>, <style>, and <title>.
The body element contains all the contents of an HTML document, such as text, hyperlinks, images, tables, lists, etc.
A form can contain input elements like text fields, checkboxes, radio-buttons, submit buttons and more. A form can also contain select lists, textarea, fieldset, legend, and label elements.The <form> tag is used to create an HTML form(Login Pages)
HTML Lists
Ordered Lists: Ordered list starts with the <ol>
tag. Each list item starts with the <li> tag.
Unordered Lists:
Unordered list starts with the <ul> tag. Each list item starts with the <li> tag.
with a description of each item.The <dl> tag defines a definition list. The <dl> tag is used in conjunction with <dt> (defines the item in the list) and <dd> (describes the item in the list):
HTML5 .. cool things Geolocation http://html5demos.com/geo Drag & Drop Files! -http://gokercebeci.com/dev/droparea Cool Demo http://craftymind.com/factory/html5vide o/CanvasVideo.html Another http://hakim.se/experiments/html5/bre akdom/ http://hakim.se/experiments/html5/origami/ Played Angry Birds On Google Chrome & G+?
The purpose of the <embed> tag is to embed multimedia elements in HTML pages.
The purpose of the <object> tag is to embed multimedia elements in HTML pages.
The purpose of the video tag is to embed videos in the HTML pages
A Web DJ!
http://demo.marcofolio.net/jquery_dj/
Want to Create a Super Cool Website like this? HTML Just NOT Enough!
HTML was intended to define the content of a document and not for formatting a document in a beautiful way. CSS defines HOW HTML elements are to be displayed.
Apply to HTML:
External style sheet Internal style sheet Inline style
mystyle.css
show.html file
show.html
Inline Styles
<style> tag as attribute with value as css code to the html tag that is to be styled.
show.html
background-color
body {background-color: pink;}
background-image
body {background-image:url('paper.gif');}
background-position
background-position:right top;
CSS Text
CSS Font
Font Family : sets the font type to the specified element. p.{font-family: "Times New roman;}
CSS Links
Links can be styled differently depending on what state they are in.
a:link {color:#FF0000;} /* unvisited link */ a:visited {color:#00FF00;} /* visited link */ a:hover {color:#FF00FF;} /* mouse over link */ a:active {color:#0000FF;} /* selected link */
What is a Web Server? o Processes Requests ... o Apache , NGINX, IIS Server side & client Side Languages {Inspect Element Javascript} o Javascript,ECMAScript,Dart - CLI o PHP,JSP,ASP - Server Database o MySQL,Oracle,PostgreSQL,SQLite The XAMP Stack!
Start!
What can be in a php file o php syntax o HTML tags o Text
If you know "C" then you almost know PHP Hello World Program <?php echo "Hello World"; ?>
Explaining
PHP starts with the "<?php" tag ends with "?>" tag "echo" is default printing function "C" like strings Every statement ends with a ";"
PHP HTML/CSS
Just Echo It !! Example ... PHP in HTML
<html> <head><?php echo "This is Head"?><head> <body><?php echo "This is Body"?></body> </html> Example .. HTML in PHP <?php echo "<html> <head>This is Head<head> <body>This is Body</body> </html>" ?>
PHP Branches
The if statement $x = "php" if($x=="php") echo "If World"; else if($x == "php3") echo "Else If World"; else echo "Else World";
Switch ... Even Strings! switch(n) { case 1: echo "1"; case 2: echo "2"; }
PHP Loops
Scope The for statement for($i=0;$i<10;$i++){ echo "I Will Not Talk In The Class!"; }
PHP Arrays
Highly Dynamic ... Example $x = array("a","b","c","d"); echo $x[3]; $x[4] = "e"; Associative / Labeled Arrays -- Very Useful! $x = array(); $x["name"] = "Ganesh"; $x["age"] = "21"; echo $x["name"].$x["age"] print_r = prints all items of arrays reccursively list($a,$b,$c) = array(0,1,2) assigns variables
PHP Functions
Differences WRT C? o No return type is specified o arguments do not have types o add "function" key word o Declare anywhere! .. even in ifs & elses o No need to specify prototype at the top o Default values for arguments Example function myfunction($myvariable = "demo") { return $myvariable; } echo myfunction("Hello World"); Huge List Of Inbuilt functions ... o strlen,strcat,strreplace o explode , implode .. to name a few
function demo() { echo "Hello World!"; } $funname = "demo"; $funname() //Very much possible
Used if u define many functions like demo1,demo2,demo3 .. you may call them iteratively Ex: