Unit 2.2 Part 1


Published on

Published in: Technology
  • Be the first to comment

  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Unit 2.2 Part 1

  1. 1. Unit 2 – HTML Basics Presentation 1 Web Programming
  2. 2. Revision… <ul><li>Define the term Internet. </li></ul><ul><li>List the requirements to get Internet connection. </li></ul><ul><li>Define the term E-commerce. </li></ul><ul><li>State the use of Forward button in IE. </li></ul><ul><li>Expand WWW and URL. </li></ul>
  3. 3. Objectives <ul><li>At the end of this presentation, you will be able to </li></ul><ul><li>Outline the structure of HTML document </li></ul><ul><li>Create HTML document </li></ul><ul><li>Execute HTML document in a Web browser </li></ul><ul><li>Correct the errors in HTML document </li></ul>
  4. 4. Introduction - HTML <ul><li>Web Browser reads the instructions from a file. </li></ul><ul><li>It displays the document in the browser window according to the instructions given in the file. </li></ul><ul><li>Instructions are given in a language called HTML. </li></ul><ul><li>File is HTML file. </li></ul>
  5. 5. Introduction (Contd...) <html><head> <script language=javascript> var now=new Date,t1=0,t2=0,t3=0,t4=0,t5=0,t6=0,ie5=0,hp=0,ao=0,cc='';t1=now.getTime(); function err(a,b,c) { var img=new Image; img.src='http://srd.yahoo.com/hp5-err/'+escape(a)+','+escape(b) B R O W S E R HTML File Web Page
  6. 6. Structure of HTML <HTML> <HEAD> <TITLE> ---------- </TITLE> </HEAD> <BODY> --------------- --------------- --------------- </BODY> </HTML> Contains some fundamental information about the Web page. Title of the Web page is given here. Contains the tags that specify how the content should be displayed. Specifies to the browser that the code enclosed is a HTML code. Head Section Body Section
  7. 7. Creating a HTML document <ul><li>Open Notepad </li></ul><ul><li>Type the HTML code </li></ul><ul><li>Save the file with extension .html in a folder (C:HTML Misc folder) </li></ul><HTML> <HEAD> <TITLE> The Mind </TITLE> </HEAD> <BODY> <FONT SIZE=5> <CENTER> <H1 ALIGN=CENTER> The Mind </H1> Great minds think about ideas <BR> Medium minds speak about happenings <BR> Small minds gossip about others. </FONT></CENTER> </BODY> </HTML>
  8. 8. Creating a virtual directory <ul><li>To store HTML documents in IIS, you have to create a directory known as Virtual Directory . </li></ul><ul><li>Click Start  Control Panel . </li></ul><ul><li>Select Performance and Maintenance </li></ul><ul><li>Select Administrative tools </li></ul>
  9. 9. Creating a virtual directory (Contd..) <ul><li>Select IIS . Internet Information Services dialog box is displayed. </li></ul><ul><li>In the left pane, right click Default Web site in the Web sites folder and select New  Virtual Directory . Virtual Directory Creation Wizard is displayed. </li></ul><ul><li>5. Click the Next button. </li></ul><ul><li>In the Alias text box, type the Virtual Directory name, say HTML and click the Next button. </li></ul>
  10. 10. <ul><li>In the Web site content directory page, browse and select the path of the directory that contains the HTML files, say C:HTML . </li></ul><ul><li>With the default settings in the Access Permissions page, click the Next button. </li></ul><ul><li>Click Finish to complete the Virtual Directory Creation wizard. </li></ul>Creating a virtual directory (Contd..)
  11. 11. Opening the HTML document <ul><li>To view the Web page, open Internet Explorer . </li></ul><ul><li>Type the URL of the Web page created, in the address bar http://localhost/HTML/Misc/Structure.HTML </li></ul><ul><li>Press the Enter key. </li></ul><ul><li>The browser interprets the instructions given in the HTML file. </li></ul>
  12. 12. Opening the HTML document <ul><li>The Web page is displayed in the browser window. </li></ul>
  13. 13. Lab Exercise <ul><li>1. Open D2_1.html in Internet Explorer. The following code will be present in D2_1.html . </li></ul><ul><li>F ind out the tag which is used to display First Web Page in the title bar. </li></ul><ul><li>Which tag is used to display Welcome in the source code of D2_1.html ? </li></ul><ul><li>Which tag is used to display the contents of the Web page? </li></ul><ul><li>What is the name of the Web page? </li></ul>
  14. 14. Correcting the mistakes <ul><li>1. Click the View  Source option. The source code (HTML code) of the Web page is displayed in the Notepad file . </li></ul><ul><li>Make the necessary corrections. </li></ul><ul><li>Save and close the file. </li></ul><ul><li>Click the Refresh button in Internet Explorer . </li></ul>
  15. 15. Tags <ul><li>Instructions given to a Web browser. </li></ul><ul><li>Enclosed within angled brackets (< >). </li></ul><ul><li>Starting tag - Indicates the starting point of an effect. For example, <HEAD> . </li></ul><ul><li>Ending tag - Indicates the ending point of an effect. The ending tag is enclosed within angled brackets and is preceded by a slash (/). For example, </HEAD>. </li></ul><ul><li>The effect of the tag is applied to the content which is placed inside the starting and ending tags. </li></ul>
  16. 16. Lab Exercise <ul><li>Open D2_1.html in Notepad. </li></ul><ul><li>Change title as Welcome to My First Web Page. Display the output in Internet Explorer. </li></ul><ul><li>Remove the <Title> tag from D2_1.html and save the file. Display the output in Internet Explorer and observe the difference. </li></ul>
  17. 17. Lab Exercise (Contd..) <ul><li>Change the head tag to Welcome to HTML page. Display the output in Internet Explorer and observe the difference. </li></ul><ul><li>Change the body text to This is my First HTML page. Display the output in Internet Explorer and observe the difference. </li></ul>
  18. 18. Lab Exercise <ul><li>3. Write a HTML code to display the output as given in the following figure. </li></ul>
  19. 19. Lab Exercise <ul><li>Write a HTML code to display the output as given in the following figure and save the file as Welcome.html . </li></ul>
  20. 20. Summary <ul><li>In this presentation, you learnt the following: </li></ul><ul><li>A Web page is an electronic document that contains information in the form of text, pictures, audio or video. </li></ul><ul><li>HTML is a language that instructs the browser how to display the contents of a Web page in the browser window. </li></ul><ul><li>The source code of a Web page can be viewed by selecting View  Source in the Internet Explorer. </li></ul>
  21. 21. Summary <ul><li>The instructions given to a Web browser are called Tags. </li></ul><ul><li>The text given in the TITLE section will appear in the title bar of the browser window. </li></ul>
  22. 22. Assignment <ul><li>Give the expansion of HTML. </li></ul><ul><li>List the steps to be followed while correcting the errors in a HTML document. </li></ul><ul><li>List the steps to be followed in creating a virtual directory. </li></ul><ul><li>Define the term Tag. </li></ul>