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.

Web Designing


Published on

Published in: Education, Technology
  • Intimacy has never been so much fun! Buy the clinically proven men's natural supplement that helped guys increase satisfaction by 71.43%! ♥♥♥
    Are you sure you want to  Yes  No
    Your message goes here
  • Get Your Ex Back Today Relationship expert Justin Sinclair shows you how with 3 easy steps. ◆◆◆
    Are you sure you want to  Yes  No
    Your message goes here

Web Designing

  1. 1. Meher Anand Abhinav Krishnamoorthy
  2. 2. Client Server Model Send request for webpage Receive request Receive Data Send data
  3. 3. About HTML <ul><li>Hypertext Markup Language </li></ul><ul><li>Idea proposed in 1980 </li></ul><ul><li>Continuously upgraded since then </li></ul><ul><li>Latest version HTML 5 in January 2008 </li></ul><ul><li>Case - insensitive </li></ul>
  4. 4. Code Structure <ul><li>Text is enclosed between tags – an opening tag and a closing tag </li></ul><ul><li><xyz> is an opening tag, </xyz> is a closing tag </li></ul><ul><li>Tags can be nested and they must follow stack property, i.e. Last In First Out </li></ul><ul><li><tag1><tag2>Some text here</tag2></tag1> </li></ul><ul><li><tag1><tag2>Some text here</tag1></tag2> </li></ul>
  5. 5. Tag Structure <ul><li>An opening delimiter the < symbol. This tells the browser that it is encountering a tag. </li></ul><ul><li>The tag name . </li></ul><ul><li>One or more attributes that set variables for the tag. </li></ul><ul><li>A closing delimiter, the > symbol. This marks the end of the tag. </li></ul><ul><li>Ex:- < p align=center > </li></ul>
  6. 6. Hello World Page <ul><li><html> </li></ul><ul><li><head> </li></ul><ul><li><title>Title of the page</title> </li></ul><ul><li></head> </li></ul><ul><li><body> </li></ul><ul><li><p align=center>Hello World!!!</p> </li></ul><ul><li></body> </li></ul><ul><li></html> </li></ul>
  7. 7. Standard body <ul><li>Any sort of content must be enclosed in the <html> tag, i.e. must start and end with the <html> tag </li></ul><ul><li>Information about the page such as title, file includes etc must be included in the <head> tag right after the opening html tag </li></ul><ul><li>The <body> tag is followed by the main content of the webpage. The body starts right after the head ends </li></ul>
  8. 8. Other Standard Tags <ul><li><p> - Paragraph </li></ul><ul><li><b>, <i>, <u> - Bold, italics, underline </li></ul><ul><li><h1>, <h2>, <h3> - Headings, decreasing order in terms of size </li></ul><ul><li><font> - Control how the text looks like </li></ul><ul><li>Few exceptions to the opening and closing tag rule: </li></ul><ul><ul><li><img/> - insert an image </li></ul></ul><ul><ul><li><br/> - New line </li></ul></ul>
  9. 9. Example 1
  10. 10. Dynamic HTML <ul><li>Disadvantages of using Static HTML? (Why dynamic HTML) </li></ul><ul><li>Lesser control over page, very dull and unattractive, not dynamic (Duh!  ) </li></ul><ul><li>“ Dynamic HTML , or DHTML , is a collection of technologies used together to create interactive and animated websites by using a combination of a static markup language (such as HTML), a client-side scripting language (such as JavaScript), a presentation definition language (such as CSS), and the Document Object Model.” - Wikipedia </li></ul>
  11. 11. What is CSS? <ul><li>CSS stands for C ascading S tyle S heets </li></ul><ul><li>Styles define how to display HTML elements </li></ul><ul><li>Styles are normally stored in Style Sheets </li></ul><ul><li>Styles were added to HTML 4.0 to solve a problem </li></ul><ul><li>External Style Sheets can save you a lot of work </li></ul><ul><li>External Style Sheets are stored in CSS files </li></ul><ul><li>Multiple style definitions will cascade into one </li></ul>
  12. 12. CSS – Cascading Style Sheets <ul><li>Designed primarily to separate the content of the website from the design aspects such as color, layout and styles. </li></ul><ul><li>File Extension: .css </li></ul><ul><li>File type : text/css </li></ul>
  13. 13. 1 - Syntax <ul><li>The CSS syntax is made up of three parts: a selector, a property and a value: </li></ul><ul><li>selector { property : value } </li></ul><ul><li>Ex:- body { color : black } </li></ul><ul><li>If  the value is multiple words, put quotes around the value: </li></ul><ul><li>p { font-family : “sans serif” } </li></ul>
  14. 14. 1 – Syntax … <ul><li>If you wish to specify more than one property, you must separate each property with a semicolon. The example below shows how to define a center aligned paragraph, with a red text color: </li></ul><ul><li>p { text-align : center ; color : red } </li></ul><ul><li>To make the style definitions more readable, you can describe one property on each line, like this: </li></ul><ul><li>p </li></ul><ul><li>{ </li></ul><ul><li>text-align : center ; </li></ul><ul><li> color : black ; </li></ul><ul><li>font-family : arial </li></ul><ul><li>} </li></ul>
  15. 15. 1 – Syntax … <ul><li>Grouping </li></ul><ul><li>You can group selectors. Separate each selector with a comma. In the example below we have grouped all the header elements. All header elements will be displayed in green text color: </li></ul><ul><li>h1,h2,h3,h4,h5,h6 </li></ul><ul><li>{ color : green } </li></ul>
  16. 16. 1 – Syntax … <ul><li>The class Selector </li></ul><ul><li>With the class selector you can define different styles for the same type of HTML element. </li></ul><ul><li>Say that you would like to have two types of paragraphs in your document: one right-aligned paragraph, and one center-aligned paragraph. Here is how you can do it with styles: </li></ul><ul><li>p.right </li></ul><ul><li>{text-align: right} </li></ul><ul><li> </li></ul><ul><li>{text-align: center} </li></ul>
  17. 17. 1 – Syntax … <ul><li>You have to use the class attribute in your HTML document: </li></ul><ul><li><p class=&quot;right&quot;> </li></ul><ul><li>This paragraph will be right-aligned. </li></ul><ul><li></p> </li></ul><ul><li> <p class=&quot;center&quot;> </li></ul><ul><li>This paragraph will be center-aligned. </li></ul><ul><li> </p> </li></ul>
  18. 18. 1 – Syntax … <ul><li>Note: To apply more than one class per given element, the syntax is: </li></ul><ul><li><p class=&quot;center green&quot;> This is a paragraph. </p> </li></ul><ul><li>The paragraph above will be styled by the class &quot;center&quot; AND the class “green&quot;. </li></ul><ul><li>.center {text-align: center} </li></ul><ul><li>.green{color : green} </li></ul>
  19. 19. 1 – Syntax … <ul><li>Add Styles to Elements with Particular Attributes </li></ul><ul><li>You can also apply styles to HTML elements with particular attributes. </li></ul><ul><li>The style rule below will match all input elements that have a type attribute with a value of &quot;text&quot;: </li></ul><ul><li>input[type=&quot;text&quot;] </li></ul><ul><li>{background-color: blue} </li></ul>
  20. 20. 1 – Syntax … <ul><li>The id Selector </li></ul><ul><li>You can also define styles for HTML elements with the id selector. The id selector is defined as a #. </li></ul><ul><li>The style rule below will match the element that has an id attribute with a value of &quot;green&quot;: </li></ul><ul><li>#green {color: green} The style rule below will match the p element that has an id with a value of &quot;para1&quot;: </li></ul><ul><li>p#para1 { text-align: center; color: red } </li></ul>
  21. 21. 2 – How to insert a Style Sheet <ul><li>External Style Sheet </li></ul><ul><li>An external style sheet is ideal when the style is applied to many pages. With an external style sheet, you can change the look of an entire Web site by changing one file. Each page must link to the style sheet using the <link> tag. The <link> tag goes inside the head section: </li></ul><ul><li><head> </li></ul><ul><ul><li><link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=“style.css&quot; /> </li></ul></ul><ul><ul><li></head> </li></ul></ul><ul><ul><li>Refer Example 4 </li></ul></ul>
  22. 22. 2 – How to insert a Style Sheet <ul><li>Internal Style Sheet </li></ul><ul><li>An internal style sheet should be used when a single document has a unique style. You define internal styles in the head section by using the <style> tag, like this: </li></ul><ul><li><head> <style type=&quot;text/css&quot;> hr {color: sienna} </li></ul><ul><li>p {margin-left: 20px} </li></ul><ul><li>body {background-image: url(&quot;images/image.jpg&quot;)} </li></ul><ul><li></style> </head> </li></ul>
  23. 23. 2 – How to insert a Style Sheet <ul><li>Inline Styles </li></ul><ul><li>To use inline styles you use the style attribute in the relevant tag. The style attribute can contain any CSS property. The example shows how to change the color and the left margin of a paragraph: </li></ul><ul><li><p style=&quot;color: sienna; margin-left: 20px&quot;> This is a paragraph </p> </li></ul>
  24. 24. Examples 5 & 6
  25. 25. JavaScript <ul><li>With CSS, we can control the looks of the site </li></ul><ul><li>We still lack the dynamism </li></ul><ul><li>JavaScript is a solution to it </li></ul><ul><li>Commonly confused with Java, but they are totally different except for the name </li></ul><ul><li>It is a client-side scripting language meaning all computation and interpretation is done on the client-side </li></ul><ul><li>Resembles C in many ways </li></ul>
  26. 26. Declarations and definitions <ul><li>Variable declaration done using keyword var </li></ul><ul><ul><li>Ex:- var my_number=10; </li></ul></ul><ul><li>Function declaration done using keyword function </li></ul><ul><ul><li>Ex:- function my_function(param1, param2){ </li></ul></ul><ul><ul><li>//Some code here </li></ul></ul><ul><ul><li>return something; </li></ul></ul><ul><ul><li>} </li></ul></ul>
  27. 27. Hello World Program <ul><li><html> </li></ul><ul><ul><li><head> </li></ul></ul><ul><ul><li><title>My Page</title> </li></ul></ul><ul><ul><li></head> </li></ul></ul><ul><ul><li><body> </li></ul></ul><ul><ul><li><script type=&quot;text/javascript&quot;> </li></ul></ul><ul><ul><li>document.write(‘<b>Hello World!!!</b>'); </li></ul></ul><ul><ul><ul><li></script> </li></ul></ul></ul><ul><ul><ul><li></body> </li></ul></ul></ul><ul><ul><li></html> </li></ul></ul>
  28. 28. Control Statements <ul><li>if…else </li></ul><ul><li>if… else if… else </li></ul><ul><li>for </li></ul><ul><li>while </li></ul><ul><li>do… while </li></ul><ul><li>switch… case </li></ul><ul><li>break </li></ul><ul><li>continue </li></ul>
  29. 29. Example 8
  30. 30. Document Object Model (DOM) <ul><li>Access elements of HTML and properties of CSS using DOM </li></ul><ul><li>Ex:- document.getElementsByTagName(&quot;div&quot;) </li></ul><ul><li>will get all elements with a div tag and create a list of them </li></ul><ul><li>Value of a CSS property can be obtained or modified using the DOM equivalent of the CSS property </li></ul><ul><li>Ex:“black”; </li></ul>
  31. 31. Example 9 & Example 10 <ul><li>This will be come clearer in </li></ul>
  32. 32. DOM (contd…) <ul><li>DOM can be used for really cool effects </li></ul><ul><li>A simple one is demonstrated in Example 11 </li></ul><ul><li>High amount of control on page content after combining HTML, CSS and JavaScript </li></ul><ul><li>Java Applets, Flash Videos and other plugins can be embedded in webpages but they require special capabilities on the client side </li></ul><ul><li>Javascript requires only a good modern browser </li></ul>
  33. 33. Add more power to web pages <ul><li>Have server side scripting in addition to client side scripting </li></ul><ul><li>User management, data management, session management </li></ul><ul><li>Combination of PHP and MySQL extremely popular. Each is one of the most efficient in their respective fields </li></ul><ul><li>To be covered in a future session </li></ul>
  34. 34. Thank You!