1 Introduction to HTML II กนกวรรธน์ เซี่ยงเจ็น สำนักวิชาเทคโนโลยีสารสนเทศ และการสื่อสาร มหาวิทยาลัยนเรศวร พะเยา.

Slides:



Advertisements
Similar presentations
1 A B C
Advertisements

Variations of the Turing Machine
Introduction to Web Design Lecture number:. Todays Aim: Introduction to Web-designing and how its done. Modelling websites in HTML.
Farhan Nisar University of Peshawar
Project 2: Adding a New Web Page to a Web Site Presentation by: Joseph H. Schuessler, B.B.A., M.B.A., M.S., Ph.D. (ABD) Agenda Video Last Class Front Page.
AP STUDY SESSION 2.
1 WORKING WITH 2007 WORD Part 1 Developed October 2007 with lots of help from.
1
Copyright © 2003 Pearson Education, Inc. Slide 3-1 Created by Cheryl M. Hughes The Web Wizards Guide to XML by Cheryl M. Hughes.
1 Copyright © 2002 Pearson Education, Inc.. 2 Chapter 4 Working with the Web.
Copyright © 2003 Pearson Education, Inc. Slide 7-1 Created by Cheryl M. Hughes The Web Wizards Guide to XML by Cheryl M. Hughes.
Manuscript Central Training Author Center Module 2.
David Burdett May 11, 2004 Package Binding for WS CDL.
Microsoft Access 2007 Advanced Level. © Cheltenham Courseware Pty. Ltd. Slide No 2 Forms Customisation.
Local Customization Chapter 2. Local Customization 2-2 Objectives Customization Considerations Types of Data Elements Location for Locally Defined Data.
CALENDAR.
1 Advanced Tools for Account Searches and Portfolios Dawn Gamache Cindy Bylander.
1 Click here to End Presentation Software: Installation and Updates Internet Download CD release NACIS Updates.
Creating a Dreamweaver Web Page and Local Site
Photo Slideshow Instructions (delete before presenting or this page will show when slideshow loops) 1.Set PowerPoint to work in Outline. View/Normal click.
Break Time Remaining 10:00.
Turing Machines.
PP Test Review Sections 6-1 to 6-6
1 IMDS Tutorial Integrated Microarray Database System.
XP Tutorial 4New Perspectives on Creating Web Pages with HTML, XHTML, and XML 1 Designing a Web Page with Tables Tutorial 4 Creating a News Page.
Svetlin Nakov Telerik Corporation
Microsoft Office 2007 Integration Integrating Office 2007 Applications and the World Wide Web.
INTRODUCTION Lesson 1 – Microsoft Word Word Basics
Office 2003 Introductory Concepts and Techniques M i c r o s o f t Office 2003 Integration Integrating Office 2003 Applications and the World Wide Web.
Operating Systems Operating Systems - Winter 2010 Chapter 3 – Input/Output Vrije Universiteit Amsterdam.
23-Aug-14 HTML/XHTML Forms. 2 What are forms? is just another kind of XHTML/HTML tag Forms are used to create (rather primitive) GUIs on Web pages Usually.
Copyright © 2012, Elsevier Inc. All rights Reserved. 1 Chapter 7 Modeling Structure with Blocks.
Adding Up In Chunks.
FAFSA on the Web Preview Presentation December 2013.
MaK_Full ahead loaded 1 Alarm Page Directory (F11)
Facebook Pages 101: Your Organization’s Foothold on the Social Web A Volunteer Leader Webinar Sponsored by CACO December 1, 2010 Andrew Gossen, Senior.
Creating a Dreamweaver Web Page and Local Site
Macromedia Dreamweaver MX 2004 – Design Professional Dreamweaver GETTING STARTED WITH.
Dr. Alexandra I. Cristea HTML Dr. Alexandra I. Cristea
: 3 00.
5 minutes.
1 hi at no doifpi me be go we of at be do go hi if me no of pi we Inorder Traversal Inorder traversal. n Visit the left subtree. n Visit the node. n Visit.
Types of selection structures
1 Titre de la diapositive SDMO Industries – Training Département MICS KERYS 09- MICS KERYS – WEBSITE.
Chapter 12 Working with Forms Principles of Web Design, 4 th Edition.
Converting a Fraction to %
Clock will move after 1 minute
Chapter 11 Creating Framed Layouts Principles of Web Design, 4 th Edition.
Chapter 13 Web Page Design Studio
Physics for Scientists & Engineers, 3rd Edition
Select a time to count down from the clock above
Copyright Tim Morris/St Stephen's School
1.step PMIT start + initial project data input Concept Concept.
Outlook 2013 Web App (OWA) User Guide Durham Technical Community College.
CSS Cascading Style Sheets. Objectives Using Inline Styles Working with Selectors Using Embedded Styles Using an External Style Sheet Applying a Style.
Presenter: James Huang Date: Sept. 26,  Introduction  Basics  Lists  Links  Forms  CSS 2.
1 Introduction to HTML II อุทัย เซี่ยงเจ็น สำนักวิชาเทคโนโลยีสารสนเทศ และการสื่อสาร มหาวิทยาลัยนเรศวร พะเยา.
HTML Web Programming.
HTML. What is HTML? HTML is a language for describing web pages. HTML stands for Hyper Text Markup Language HTML is a markup language A markup language.
DAT602 Database Application Development Lecture 14 HTML.
1 HTML محمد احمدی نیا 2 Of 43 What is HTML?  HTML stands for Hyper Text Markup Language  HTML is not a programming language, it.
LOGO FORMs in HTML CHAPTER 5 Eastern Mediterranean University School of Computing and Technology Department of Information Technology ITEC229 Client-Side.
IDK0040 Võrgurakendused I harjutus 05: Forms Deniss Kumlander.
HTML and FORMS.  A form is an area that can contain form elements.  Form elements are elements that allow the user to enter information (like text fields,
WEEK -1 ACM 262 ACM 262 Course Notes. HTML What is HTML? HTML is a language for describing web pages. HTML stands for Hyper Text Markup Language HTML.
HTML Tutorial. What is HTML HTML is a markup language for describing web documents (web pages) HTML documents are described by HTML tags Each HTML tag.
HTML for web designing short course. What is an HTML File? HTML stands for Hyper Text Markup Language An HTML file must have an htm or html file extension.
HTML FORM. Form HTML Forms are used to select different kinds of user input. HTML forms are used to pass data to a server. A form can contain input elements.
Presentation transcript:

1 Introduction to HTML II กนกวรรธน์ เซี่ยงเจ็น สำนักวิชาเทคโนโลยีสารสนเทศ และการสื่อสาร มหาวิทยาลัยนเรศวร พะเยา

2 Content  HTML Forms and Input  HTML Images  HTML Backgrounds  HTML Fonts  HTML Styles  HTML Head

3 Content  HTML Meta  HTML Uniform Resource Locators  HTML Scripts  HTML Web Server

4 HTML Forms and Input  A form is an area that can contain form elements.  Form elements are elements that allow the user to enter information (like text fields, textarea fields, drop-down menus, radio buttons, checkboxes, etc.) in a form.  A form is defined with the tag. <form> </form>

5 HTML Forms and Input Form Tags Tag Description Defines a form for user input Defines a form for user input Defines an input field Defines an input field Defines a text-area (a multi-line text input control) Defines a text-area (a multi-line text input control) Defines a selectable list (a drop-down box) Defines a selectable list (a drop-down box) Defines an option in the drop- down box Defines an option in the drop- down box Defines a push button Defines a push button Defines a caption for a fieldset Defines a caption for a fieldset Defines a fieldset Defines a fieldset

6 Input  The most used form tag is the tag. The type of input is specified with the type attribute.  The most commonly used input types are explained below.

7 Text Fields  Text fields are used when you want the user to type letters, numbers, etc. in a form. First name: First name: <br> Last name: Last name: </form>

8 Text Password <form> Username: Username: <br> Password: Password: <p> Note that when you type characters in a password field, the browser displays asterisks or bullets instead of the characters. </p>

9 Text Area <html><body><form> The cat was playing in the garden. </textarea></form></body></html>

10 Radio Buttons  Radio Buttons are used when you want the user to select one of a limited number of choices. <form> Male Male<br> Female Female</form>

11 Radio Buttons  Radio Buttons are used when you want the user to select one of a limited number of choices. <form> Male Male<br> Female Female</form>

12 Checkboxes  Checkboxes are used when you want the user to select one or more options of a limited number of choices. <form> I have a bike I have a bike<br> I have a car I have a car</form>

13 Checkboxes  Checkboxes are used when you want the user to select one or more options of a limited number of choices. <form> I have a bike I have a bike<br> I have a car I have a car</form>

14 Drop-Down Box <form> Volvo Volvo Saab Saab Fiat Fiat Audi Audi </select></form>

15 Drop-Down Box <form> Volvo Volvo Saab Saab Fiat Fiat Audi Audi </select></form>

16 List Box <form> Volvo Volvo Saab Saab Fiat Fiat Audi Audi </select></form>

17 List Box <form> Volvo Volvo Saab Saab Fiat Fiat Audi Audi </select></form>

18 Legend and FieldSet <fieldset> Health information: Health information: <form> Height Height Weight Weight </form></fieldset> If there is no border around the input form, your browser is too old. If there is no border around the input form, your browser is too old.

19 The Form's Action Attribute and the Submit Button  When the user clicks on the "Submit" button, the content of the form is sent to another file.  The form's action attribute defines the name of the file to send the content to.  The file defined in the action attribute usually does something with the received input.

20 The Form's Action Attribute and the Submit Button Username: Save: send.php

21 Action  action เป็นการกำหนดว่าจะส่งค่าจาก form ปัจจุบันไปให้กับ form อื่นๆ เพื่อทำ การประมวลผลต่อไป  action=“receive.php” ชื่อ receive.php คือชื่อเว็บ เพจที่เราต้องการส่งข้อมูลที่ได้รับการบันทึกจาก form ปัจจุบัน send.php receive.php action ฟอร์มปัจจุบัน ส่งข้อมูล ฟอร์มที่รับค่าจาก action

22 Method  method คือวิธีในการส่งค่าระหว่าง form ประกอบด้วย  GET  POST

23 Method:GET  method=“get” เป็นการส่งค่าไปยัง เว็บ เพจเป้าหมายที่กำหนดไว้ โดยจะแสดง รายละเอียดของข้อมูลที่ส่งไปผ่านทาง Address Bar ของ Web Browser

24 send_GET.php Username:

25 receive_GET.php <?php $user_name = $_GET['user']; echo "Receive user name is $user_name"; ?>

26 Method: POST  method=“post” เป็นการส่งค่าไปยัง เว็บเพจเป้าหมายที่กำหนดไว้ โดยจะ ไม่แสดงรายละเอียดของข้อมูล

27 send_POST.php Username:

28 receive_POST.php <?php $user_name = $_POST['user']; echo "Receive user name is $user_name"; ?>

29 HTML Images Tag Description Tag Description Defines an image Defines an image Defines an image map Defines an image map Defines an area inside an image map Defines an area inside an image map

30 The Image Tag and the Src Attribute <html><body> An image:

31 The Image Tag and the Src Attribute An image from another folder: An image from

32 Alternate Text <html><body> <p> Text-only browsers will only display the text in the "alt" attribute, which is "Go Left". Note that if you hold the mouse pointer over the image it will display the text. </p></body></html>

33 Link by Image <html><body><p> You can also use an image as a link: </a></p></body></html>

34 HTML Backgrounds  The tag has two attributes where you can specify backgrounds. The background can be a color or an image.

35 Backgrounds and bgcolor The bgcolor attribute sets the background to a color. The value of this attribute can be a hexadecimal number, an RGB value, or a color name.

36 Backgrounds and bgcolor  The background attribute sets the background to an image. The value of this attribute is the URL of the image you want to use. If the image is smaller than the browser window, the image will repeat itself until it fills the entire browser window.

37 Background <html> Look: A background image! Look: A background image! Both gif and jpg files can be used as HTML backgrounds. Both gif and jpg files can be used as HTML backgrounds. If the image is smaller than the page, the image will repeat itself. If the image is smaller than the page, the image will repeat itself. </body></html>

38 HTML Fonts Attributes Attribute Example Purpose size="number" size="2" Defines the font size size="+number" size="+1" Increases the font size size="-number" size="-1" Decreases the font size face="face-name" face= "Arial" Defines the font-name color="color-value" color="#eeff00" Defines the font color color="color-name" color="red" Defines the font color

39 HTML Fonts With HTML code like this, you can specify both the size and the type of the browser output : <p> This is a paragraph. </font></p><p> This is another paragraph. </font></p>

40 HTML Styles Tag Description Defines a style definition Defines a style definition Defines a resource reference Defines a resource reference Defines a section in a document Defines a section in a document

41 HTML Styles  When a browser reads a style sheet, it will format the document according to it. There are three ways of inserting a style sheet:  External Style Sheet  Internal Style Sheet  Inline Styles

42 External Style Sheet  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 tag. The tag goes inside the head section. <head> </head>

43 Internal Style Sheet  An internal style sheet should be used when a single document has a unique style. You define internal styles in the head section with the tag. <head> body {background-color: red} p {margin-left: 20px} </style></head>

44 Inline Styles  An inline style should be used when a unique style is to be applied to a single occurrence of an element.  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: This is a paragraph </p>

45 HTML Head  The head element contains general information, also called meta-information, about a document. Meta means "information about".  You can say that meta-data means information about data, or meta-information means information about information.

46 The elements inside the head element  The elements inside the head element should not be displayed by a browser.  According to the HTML standard, only a few tags are legal inside the head section. These are:,,,,, and.  Look at the following illegal construct: <head> This is some text This is some text </head>

47 HTML Meta  Some search engines on the WWW will use the name and content attributes of the meta tag to index your pages.  This meta element defines a description of your page:  This meta element defines keywords for your page:

48 HTML Uniform Resource Locators  Uniform Resource Locators  Something called a Uniform Resource Locator (URL) is used to address a document (or other data) on the World Wide Web. A full Web address like this: follows these syntax rules:  scheme://host.domain:port/path/filename

49 URL Schemes  Some examples of the most common schemes can be found below: Schemes Access file a file on your local PC ftp a file on an FTP server http a file on a World Wide Web Server gopher a file on a Gopher server news a Usenet newsgroup telnet a Telnet connection WAIS a file on a WAIS server

50 HTML Uniform Resource Locators  The scheme is defining the type of Internet service. The most common type is http.  The domain is defining the Internet domain name like mysite.com.  The host is defining the domain host. If omitted, the default host for http is www.  The :port is defining the port number at the host. The port number is normally omitted. The default port number for http is 80.

51 HTML Uniform Resource Locators  The path is defining a path (a sub directory) at the server. If the path is omitted, the resource (the document) must be located at the root directory of the Web site.  The filename is defining the name of a document. The default filename might be index.php, or index.html or something else depending on the settings of the Web server.

52 Accessing a Newsgroup  The following HTML code: Newsgroup Newsgroup

53 Downloading with FTP  The following HTML code: Download Game Download Game</a>  (The link doesn't work. Don't try it. It is just an example. mysite doesn't really have an ftp directory.)

54 Link to your Mail system  The following HTML code:  creates a link to your own mail system like this:

55 HTML Scripts  A script in HTML is defined with the tag. Note that you will have to use the type attribute to specify the scripting language. <html><head></head><body> document.write("Hello World!") document.write("Hello World!")</script></body></html>

56 HTML Scripts Tag Description Defines a script Defines a script Defines an alternate text if the script is not executed Defines an alternate text if the script is not executed Defines an embedded object Defines an embedded object Defines run-time settings (parameters) for an object Defines run-time settings (parameters) for an object Deprecated. Use instead Deprecated. Use instead

57 HTML Scripts JavaScript: <!-- document.write("Hello World!") //--> VBScript: <!-- document.write("Hello World!") '-->

58 <noscript> JavaScript: <!-- document.write("Hello World!") //--> <noscript> Your browser does not support JavaScript!

59 <noscript> VBScript: <!-- document.write("Hello World!") '--> Your browser does not support VBScript! Your browser does not support VBScript!

60 HTML Web Server  Personal Web Server (PWS)  Internet Information Server (IIS)  Apache (Linux)  Etc.