Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Before start

1,594 views

Published on

before start learning any web scripting language you must know HTML, CSS, JavaScript

Published in: Education
  • Very well explained basics of HTML, CSS and JavaScript!
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here

Before start

  1. 1. PHP Course [Before Start]<br />Medhat Dawoud<br />
  2. 2. Outlines<br />WWW<br />How web works?<br />Static Vs Dynamic WebPages<br />What is HTML?<br />What is CSS?<br />What is JavaScript?<br />
  3. 3. WWW<br />The World Wide Web, abbreviated as WWW and commonly known as The Web<br />WWW is a system of interlinked hypertext documents contained on the Internet. <br />With a web browser, one can view web pages that may contain text, images, videos, and other multimedia and navigate between them by using hyperlinks.<br />
  4. 4. WWW continue<br />The Worldwide Web consists of many clients and servers connected over the internet<br />
  5. 5. How the web works<br />Computers communicate to each other using hyper text transfer protocol (HTTP).<br />A client sends a request in http format for a web resource.<br />Webpage.<br />Image file.<br />JavaScript or CSS file.<br />Server return response.<br />
  6. 6. The pieces of the PUZZLE<br />Each client has a web browser:<br />Personal Computers(IE, Firefox, Safari, Opera).<br />Cell Phones.<br />Other Devices.<br />Each server runs a software called an HTTP Server:<br />Internet information services(for windows only).<br />Apache server(All operating systems).<br />
  7. 7. Dynamic WP Vs Static WP<br />There are two types of WebPages:<br />Static WebPages: that is used only for giving information about some thing without any interaction with the used of the page, written in HTML or XHTML.<br />Dynamic WebPages: which has a server side codes and has an interactional way to make sense to the user with the webpage, written usually in ASP, PHP, JSP, or python or any other server side lang.<br />
  8. 8. Static WebPages<br />
  9. 9. Dynamic WebPages<br />
  10. 10. Dynamic server solutions<br />Microsoft Active server Pages.<br />PHP.<br />Java-based server(J2EE)<br />IBM web sphere<br />Oracle Web Logic<br />JBoss.<br />Microsoft ASP.NET .<br />
  11. 11. Let’s add some basics<br />Intro to HTML.<br />Intro to CSS.<br />Intro to JavaScript.<br />
  12. 12. What is HTML?<br />HTML stands for Hypertext Markup Language.<br />Not programming language but it is markup lung.<br />HTML depends on elements like <html> element.<br />Note that HTML tags are case insensitive. <br />
  13. 13. HTML continue<br />The HTML file is using one of the two extensions .html or .htm<br />HTML makes a static Webpage. <br />HTML documents are also called web pages. <br />Web browser doesn't display HTML tags. It uses HTML tags to display HTML document as a web page. <br />
  14. 14. General structure of the HTML file<br />
  15. 15. HTML continue<br /><html></html>: define the web page <br /><head></head>: define the header of the page (info about the page) <br /><body></body>: here you write the content of the page <br />
  16. 16. HTML continue – some rules<br />It is preferred to write HTML tags in lowercase. <br />HTML ignores spaces in source code, you can make spaces using this &nbsp; ( Non breakable Space ) <br />HTML elements can be nested ( can contain another elements ) <br />First opened Last Closed (<b><u><i>Text</i></u></b>) <br />
  17. 17. HTML Continue – special characters<br />For more visit: http://www.degraeve.com/reference/specialcharacters.php<br />
  18. 18. HTML Continue<br /><marquee> is used to make some data in the webpage move with some characteristics with three types of behavior property:<br />Scroll.<br />Slide.<br />Alternate.<br /><br /> stands for the break line similar to pressing enter in any text editor.<br /><hr /> stands for horizontal row which is used to draw a horizontal row inside the webpage.<br />
  19. 19. HTML Continue<br />Links: to make a hyper link in your website you can use the tag:<br /><a href=“http://www.google.com”>Google</a><br />The a tag has a property named href stand for the hyper reference of the link and inside the element you put the word you want to appear as a link “Google”.<br />Images: is used in HTML with tag:<br /><imgsrc="www.jpg"/><br />This tag has a property called src stands for the source of the image on your PC or on the server.<br />
  20. 20. HTML Continue<br />Lists: you can make two types of lists:<br />Ordered list: with the tag <ol><br />Unordered list: with the tag <ul><br />In both types each contain some items using the tag <li> and you should close it in the end.<br />Code<br />Result<br />
  21. 21. HTML Continue<br />Tables: the tables are used to represent data not for design as many designers do.<br />Use the tag <table> to create table and make new table row using <tr> and fill them with data using <td> as follow.<br />Code<br />Result<br />
  22. 22. HTML Continue - Forms<br />Used to take input from user.<br />It can contain many elements like (text field, textarea, radio, checkbox, dropdown menu, submit button, upload file, reset button, ..etc).<br />We use the tag: <form></form> that contains 3 other tags: <input />, <textarea />, and <select />.<br />To design a login form you write the following code<br /><br />See the next slide view the form in a browser..,<br />
  23. 23. HTML Continue - Forms<br />
  24. 24. HTML Last<br />Demo<br />Try To Make a simple HTML page<br />
  25. 25. What is CSS?<br />Stands for Cascading Style Sheets.<br />CSS is in the presentation layer of web page <br />CSS define how HTML elements are displayed <br />CSS Solve HTML problems <br />CSS save time <br />
  26. 26. CSS styles<br />There is three ways to use the CSS:<br />Inline style sheet.<br />Internal style sheet.<br />External style sheet.<br /><ul><li>Each of them has the same way to make the style of HTML tags, but they are only different in the way we use the style sheet.</li></li></ul><li>inline style sheet<br />This style is from it’s name inline with any tag you need using a property in the tag called style as in figure:<br />Inline CSS control the style sheet of the inline element.<br />Note that the syntax of CSS is written as:<br />property-name : value of property<br />Between each property and the next one there is a semicolon “;” .<br />
  27. 27. Internal style sheet<br />It’s more generalized than the inline.<br />It might include the style of a whole webpage.<br />A tag called <style> is added to the header section as in figure:<br />In this example we change<br />The back ground color of the <br />body of the page to yellow.<br />
  28. 28. External style sheet<br />This type is the preferred to be used because it help in styling the whole site at a time.<br />We make a new file with extension .css and write all the styles we want inside that file.<br />Then we connect this file to the pages we want to take this style in the website.<br />To connect it to the web page we write a simple tag:<br /><link rel="stylesheet"type="text/css"href="styles.css" /><br />
  29. 29. External CSS<br />HTML file<br />CSS file<br />Result<br />
  30. 30. CSS Last<br />Demo<br />Try To control the style of a simple HTML page<br />
  31. 31. What is Scripting?<br />Client Side Scripting <br />Excuted @ Client browser <br />He can simply view the source code <br />Examples: JavaScript, VbScript<br />Server Side Scripting <br />Excuted @ the server <br />Return Back Client Side like ( HTML, CSS, JS) that browser understand <br />User can’t see the Source code <br />Use only can view the output ( HTML, CSS, JS ) <br />Examples: PHP, ASP, JSP <br />
  32. 32. What is JavaScript?<br /><ul><li>Most popular Scripting Language
  33. 33. Work in major browsers like Firefox, Opera, Safari, IE.
  34. 34. You should have basics of HTML/XHTML .
  35. 35. It is designed to add interactivity to HTML Page.
  36. 36. It is interpreted language ( there is no compilation )
  37. 37. It free  and client side ;) .</li></li></ul><li>JavaScript Continue<br />You can write JavaScript in head or body, using the tag <script> with some properties as in the following figure:<br />The result will be printing Hello world! In the webpage<br />
  38. 38. JavaScript Continue<br />You can also write JavaScript in an external file and refer to it like the external CSS file but with the tag <script> as follow:<br />The JavaScript file has the extension .js<br />The scriptfile.js has the JavaScript codes.<br />
  39. 39. Some JavaScript Rules<br />Comments: is most like in C#.<br />// for the single row comment.<br />/* for the multiline comments<br />…………………………………………………..<br />…………………………………….. */<br />Variables: <br />Case sensitive.<br />Defined using varkeyword.<br />Example : var name = “mohamed”;<br />
  40. 40. Some JavaScript Rules<br />Conditional operator:<br />Syntax<br />variablename=(condition)?value1:value2<br />Used to test a condition and make action.<br />Switch case: is most likely in C#.<br />If .. Else: is the same as in C#.<br />For loop and while loop are also the same as in C#.<br />There are break and continue statements like C#.<br />Foreach in C# is here for(var variable in collection).<br />
  41. 41. Some JavaScript Rules<br />Example of the for loop usage:<br />Code<br />Result <br />
  42. 42. Some JavaScript Rules<br />Functions: to make a function you should use the following syntax:<br />function functionname(var1,var2,...,varX) <br />{<br /> //some code <br />} <br />Then we can make functions that can be used more times.<br />
  43. 43. Some JavaScript Rules<br />There are more than one way for the popup boxes:<br />Alert: make sure that the information comes from the user .<br />Confirm: if we want user to verify or accept something .<br />Prompt : when we want user to input some thing before entering the page .<br /><ul><li>Some examples for each .</li></li></ul><li>JavaScript Last<br />Demo<br />Try To Make some JS scripts<br />
  44. 44. What’s now ??<br />Now we get the standards of web development or design in general, you can study then in more details from some resources such as:<br />http://www.w3schools.com<br />http://html.net/<br />http://www.dynamicdrive.com/style/<br />http://www.google.com<br />http://www.eng-mmf.com<br />http://www.MedhatDawoud.com<br />
  45. 45. Thanks<br />

×