Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Kickstarting Web Development - 1

Kickstarting Web Development - 1

WebDev Labs

January 22, 2015
Tweet

More Decks by WebDev Labs

Other Decks in Programming

Transcript

  1. the home analogy HTML-the walls of your home.This decides your

    kitchen , the living room, the bedroom etc. CSS- Adds style to your home. Like the paint on your walls, interior design, the lighting etc. JavaScript- Adds functionality to your website. Like the furniture in your house. While your website may be functional without it , it’s always beneficial to have it.
  2. Html tags All code between < & > also called

    angular brackets. All HTML commands are called tags. They tell the browser what is to be displayed and in which format. Please open the first.html file in your notepad or other text editor.
  3. html tags 2 Please open second.html(both in your text editor

    and browser). <img src>…</img> Attributes provide additional information about an element. Attributes are always specified in the start tag. Attributes come in name/value pairs like: name="value". Experiment by changing the height and width of the image in your file.
  4. html tags 2 Unordered List <ul>…</ul> Ordered List <ol>…</ol> List

    item <li>…</li> Link <a href="…">…</a>
  5. <table border="1" > <tr> <td>Jill</td> <td>Smith</td> <td>50</td> </tr> <tr> <td>Eve</td>

    <td>Jackson</td> <td>94</td> </tr> </table> Jill Smith 50 Eve Jackson 94 John Doe 80
  6. HTML tags 4 <form>…</form> <input type="radio" name="gender">…</input> <select> for dropdown

    menu <input type="submit" value="register">…</input> for submit button.
  7. css

  8. CSS CSS stands for Cascading Style Sheets. CSS defines how

    HTML elements are to be displayed External Style Sheets are stored in CSS files
  9. CSS Syntax The selector points to the HTML element you

    want to style. The declaration block contains one or more declarations separated by semicolons. Each declaration includes a property name and a value, separated by a colon.
  10. CSS Example A CSS declaration always ends with a semicolon,

    and declaration groups are surrounded by curly braces: p  {color:red;text-­‐align:center;}
  11. CSS Demo1 Please open the folder CSS. Please open the

    file first_CSS.html in your text editor. Note the <link rel="stylesheet" href="first.css" type="text/css"></link>. This sets the file first.css as the stylesheet for this webpage. Now open first.css file and modify to enjoy.
  12. CSS Demo2 CSS Selectors are of three types Grouping Selectors

    : h1{ property: val; } Id selector : #para1{ property : val;} Class selector : .container{ property: val;}
  13. CSS Demo 2 Please open second_css.html in the CSS folder.

    Open second.css . Notice the use of different type of selectors. Notice the a:active selector. It represents a particular state of the html element that you want to style.
  14. CSS Demo 3 td  {          padding:

     15px;   } Table Padding To control the space between the border and content in a table, use the padding property on <td> and <th> elements To specify table borders in CSS, use the border property. The example below specifies a black border for <table>, <th>, and <td> elements