Programming Club IIT Kanpur. Work environment Before you begin coding,always set up your work environment to your needs IDE Notepad++ Sublime Text 2.

Slides:



Advertisements
Similar presentations
Introduction to Web Design Lecture number:. Todays Aim: Introduction to Web-designing and how its done. Modelling websites in HTML.
Advertisements

HTML Basics Customizing your site using the basics of HTML.
Intro to HTML. HTML HTML = HyperText Markup Language Used to define the content of a webpage HTML is made up of tags and attributes Content.
HTML and CSS. HTML Hyper Text Markup Language Tells browser how to display text and images.
HIGH LEVEL OVERVIEW: CSS CSS SYNTAX CONSISTS OF A SET OF RULES THAT HAVE 3 PARTS: A SELECTOR, A PROPERTY, AND A VALUE. IT’S NOT NECESSARY TO REMEMBER THIS.
The jQuery library. What is jQuery ? A javascript lightweight library Is very easy to use Is powerful Is cross-browser compatible Downloadable from jQuery.com,
CSS Cascading Style Sheets. Objectives Using Inline Styles Working with Selectors Using Embedded Styles Using an External Style Sheet Applying a Style.
Web Pages Week 10 This week: CSS Next week: CSS – Part 2.
CSS. CSS stands for Cascading Style Sheets Styles define how to display HTML elements Styles were added to HTML 4.0 to solve a problem External Style.
CSCI 3100 Tutorial 6 Web Development Tools 1 Cuiyun GAO 1.
1 Cascading Style Sheets Continued Different kinds of selectors in a style sheet –Simple- Pseudo-Class –Contextual- Pseudo-Element –Class Image Styles.
CSS Internet Engineering Spring 2014 Bahador Bakhshi CE & IT Department, Amirkabir University of Technology.
Cascading Style Sheets
/k/k 1212 Cascading Style Sheets Part one Marko Boon
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 6 Key Concepts 1 Copyright © Terry Felke-Morris.
Layout using CSS. Using multiple classes In the head:.important{font-style:italic;}.title{color:red;} In the body: Here's a type of paragraph that is.
Today CSS HTML A project.
Presenter: James Huang Date: Sept. 26,  Introduction  Basics  Lists  Links  Forms  CSS 2.
HTML / CSS – Basics Why the heck are we doing this?
CSS. Intro to CSS Cascading Style Sheets – styles and enhances appearance of webpage.css extension.
Making Things Look Nice: Visual Appearance and CSS CMPT 281.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 6 Key Concepts 1 Copyright © Terry Felke-Morris.
Very quick intro HTML and CSS. Sample html A Web Title.
Part 5 Introduction to CSS. CSS Display - Block and Inline Elements A block element is an element that takes up the full width available, and has a line.
JQuery A Javascript Library Hard things made eas(ier) Norman White.
Cascading Style Sheets. CSS stands for Cascading Style Sheets and is a simple styling language which allows attaching style to HTML elements. CSS is a.
Cascading Style Sheets By: Valerie Kuna. What are Cascading Style Sheets? Cascading Style Sheets (CSS) are a standard for specifying the presentation.
Web Development & Design Foundations with XHTML Chapter 7 Key Concepts.
1 Web Developer & Design Foundations with XHTML Chapter 9 Key Concepts.
Building a Website: Cascading Style Sheets (CSS) Fall 2013.
CIS 1310 – HTML & CSS 6 Layout. CIS 1310 – HTML & CSS Learning Outcomes  Describe & Apply the CSS Box Model  Configure Float with CSS  Designate Positioning.
CSW131 Steven Battilana 1 CSW 131 – Chapter 5 (More) Advanced CSS Prepared by Prof. B. for use with Teach Yourself Visually Web Design by Ron Huddleston,
Web Pages and Style Sheets Bert Wachsmuth. HTML versus XHTML XHTML is a stricter version of HTML: HTML + stricter rules = XHTML. XHTML Rule violations:
กระบวนวิชา CSS. What is CSS? CSS stands for Cascading Style Sheets Styles define how to display HTML elements Styles were added to HTML 4.0 to.
CSS normally control the html elements. Three Ways to Insert CSS There are three ways of inserting a style sheet: External style sheet Internal style.
CSS Cascading Style Sheets Brief Introduction
Web Design with Cascading Style Sheet Lan Vu. Overview Introduction to CSS Designing CSS Using Visual Studio to create CSS Using template for web design.
4.01 Cascading Style Sheets
CSS (Cascading Style Sheets): How the web is styled Create Rules that specify how the content of an HTML Element should appear. CSS controls how your web.
TUTORIAL 8: Enhancing a Web Site with Advanced CSS
HTML. Goals How to use the Komodo editor HTML coding and testing – List and Images – Tables and Links – At least 2 pages and navigation –
SEG3210 DHTML Tutorial. DHTML DHTML is a combination of technologies used to create dynamic and interactive Web sites. –HTML - For creating text and image.
Learning HTML. HTML Attributes HTML elements can have attributes Attributes provide additional information about an element Class – specifies a class.
18 People Surveyed HTML (HyperText Markup Language) HTML “tags” Describes structure Building blocks Headings, paragraphs, lists, links, images, quotes,
Basic HTML Workshop By: Preeda Chunjongkolkul (Pete) Systems Librarian/Webmaster
 This presentation introduces the following: › 3 types of CSS › CSS syntax › CSS comments › CSS and color › The box model.
CHAPTER 1 HTML & HTML5 I อ. ยืนยง กันทะเนตร คณะเทคโนโลยีสารสนเทศและการสื่อสาร มหาวิทยาลัยพะเยา 1.
Introduction to CSS. What is CSS?  Cascading Style Sheets  Used for styling HTML  Also important in javascript and jquery for selectors  External.
Introduction to Programming the WWW I CMSC Winter 2003 Lecture 7.
Lecture 2 - HTML and CSS Review SFDV3011 – Advanced Web Development 1.
CPSC 203 Introduction to Computers Lab 33 By Jie Gao.
 Use the think diagram … ISP Server.
HTML GUIDE Press F5 and then Click on the links on the left to get to the section you want Section 1: Getting Started Section 2: Moving Banner Section.
Basic HTML Programming Technology Education Ellsworth Community Middle School Communication Systems.
BEGINNER WEB DESIGN. INTRODUCTION Vocabulary Design Tools of the Trade HTML CSS.
Cheryl Wolfe Web Services Administrator Tampa-Hillsborough County Public Library James Day Electronic Services Librarian Embry-Riddle Aeronautical University.
Chapter 1: Intro to HTML Section 1: HTML Structure Presentation Section 2: Layout of an HTML File Section 3: Working with Lists & Tables Section 4: HTML.
CSCI 3100 Tutorial 5 JavaScript & Ajax Jichuan Zeng Department of Computer Science and Engineering The Chinese University of Hong.
Creating Web Documents CSS examples (do more later) Lab/Homework: Read chapters 15 & 16. Work on Project 3, do postings.
WebD Introduction to CSS By Manik Rastogi.
4.01 Cascading Style Sheets
Introduction to Web programming
IS333: MULTI-TIER APPLICATION DEVELOPMENT
Software Engineering for Internet Applications
DynamicHTML Cascading Style Sheet Internet Technology.
DynamicHTML Cascading Style Sheet Internet Technology.
Understand basic HTML and CSS terminology, concepts, and basic operations. Objective 3.01.
4.01 Cascading Style Sheets
Web Programming and Design
Presentation transcript:

Programming Club IIT Kanpur

Work environment Before you begin coding,always set up your work environment to your needs IDE Notepad++ Sublime Text 2

Introduction HTML (HyperTextMarkupLanguage) Displays server response to the client “markup”=>No logical evaluations, just structuring Browser reads it and displays the content Open your favorite text editor and start coding 3

HTML Tags HTML Program - Bold - now use Italic - now use Head - Body - Paragraph - 4

How it looks like <html> My First HTML Page My First HTML Page This is some text... This is some text... </html> 5 HTML body

Some More Tags Image tag <img src=“image-url” alt=“message” width=“12” height=“13”/> Hyperlink tag Click Me Click Me 6

Some More Tags Heading tag Heading 1 Heading 1 Sub heading 2 Sub heading 2 Sub heading 3 Sub heading 3 div tag Content</div> 7

Table Tag <tr><th>Name</th><th>Age</th></tr><tr> Tom 12 Tom 12 </tr><tr> Dick 12 Dick 12 </tr></table> 8

List Tag <ul><li>Item1</li><li>Item2</li><li>Item3</li></ul> 9

Name: Name: Password: Password: Gender: Male Gender: Male Female Female Agree to terms: Yes Agree to terms: Yes Date: Date: </form> Forms 10

Rest of the Tags Complete Specs : 11

But looks ugly CSS(Cascading Style Sheet) Separation of Style and Structure Cleaner code Better designing Define in or as a separate file 12

Style tag <style>body{ background-color: red; }p{ text-align: center; font-size: 14px; }</style> 13

Selecting HTML elements by id#name{padding:10px;} by class.pets{margin:10px;} 14

Type of Positions Relative The element is positioned relative to its normal position, so "left:20" adds 20 pixels to the element's LEFT position Fixed The element is positioned relative to the browser window Absolute The element is positioned relative to its first positioned (not static) ancestor element. 15

Shorthand For margins/paddings margin-right/margin-top etc or margin: ; Top-Right-Bottom-Left 16

Some more useful attributes border div { border:2px solid; border-radius:25px; } z-index div div { z-index:10; z-index:10; } 17

Some more useful attributes float div { float: left; } transform(rotate) div { transform:rotate(7deg); } div { transform:rotate(7deg); } 18

Useful Links Frameworks Bootstrap Foundation Skeleton 19

Bootstrap CSS framework by Twitter Sleek, intuitive, and powerful front-end framework for faster and easier web development. Responsive layouts Great-looking typography 20

How do you add logic to your page? How do make your page respond to user actions We need a programmable interface JavaScript Its NOT Java Introduced first by Netscape in

Syntax similar to C and JAVA include within tags var for variables of ALL data types for(var i=1;i<10;i++){ if(i%2==1) alert(“I is odd”); else console.log(“I is even”); } 22

Syntax Functions function sum(num1,num2){ return num1+num2; }; Functions are variables in JavaScript var sum=function(num1,num2){ return num1+num2; }; 23

Syntax Objects and arrays var obj={name:”Tom”, age:17, friends:[“Dick”,“Harry”]} getElementByIdgetElementById(“name”).onclick(function(){alert(‘clicked!’);}); 24

DOM Document Object Model Structured way to represent HTML Helps Javascript to change all HTML elements change all HTML attributes change all CSS styles react to all events 25

Events in JavaScript ondblclick onmousedown onmouseup onmouseover onmouseout onkeyup onkeypress onload onresize onscroll onfocus 26

Example <html><head><script> function displayDate() {document.getElementById("demo").innerHTML=Date();}</script></head><body> My First JavaScript My First JavaScript This is a paragraph. This is a paragraph. Display Date Display Date </body></html> 27

Example <head><script> function FormValidate() alert(' invalid'); event.preventDefault(); return false; }if(document.getElementById("passwd").value!=document.getElementById("cpasswd").value){ alert('passwords dont match'); event.preventDefault(); return false; } return true; }</script></head> 28

Example(contd) <body> My First JavaScript My First JavaScript password: password: Confirm password: Confirm password: </form></body> 29

AJAX Asynchronous requests to server Asynchronous => Works in background Example: Google Instant Search search.junta.iitk.ac.in 30

JQuery Easier to manipulate DOM Less effort More work Example getElementById(“abc”) reduces to $(‘#abc’) AJAX queries $.ajax({url:’your-url’,data:{param1:”dummy”,param2:”dummy”} }) }).success(function(response){.success(function(response){ alert(‘got data’+response) alert(‘got data’+response) }); }); 31

Jquery Selectors #id$(‘#your-id’).class$(‘.your-class’) element$(‘p’)//all p elements :first-child$(‘p:first-child’) :parent$(‘#abc:parent’) [attribute=value]$(‘[href=“abc.php”]’) :even$(‘tr:even’) :odd$(‘tr:odd’) 32

Useful functions of Jquery.css().addclass().animate().append() /.prepend().data().click().setInterval().ajax() 33