Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Introduction to HTML. 2 Definitions  W W W – World Wide Web.  HTML – HyperText Markup Language – The Language of Web Pages on the World Wide Web.

Similar presentations


Presentation on theme: "1 Introduction to HTML. 2 Definitions  W W W – World Wide Web.  HTML – HyperText Markup Language – The Language of Web Pages on the World Wide Web."— Presentation transcript:

1 1 Introduction to HTML

2 2 Definitions  W W W – World Wide Web.  HTML – HyperText Markup Language – The Language of Web Pages on the World Wide Web. HTML is a text formatting language.  URL – Uniform Resource Locator.  Browser – A software program which is used to show web pages.

3 3  “Normal text” surrounded by bracketed tags that tell browsers how to display web pages  Pages end with “.htm” or “.html”  HTML Editor – A word processor that has been specialized to make the writing of HTML documents more effortless.

4 4 Tags  Codes enclosed in brackets  Usually paired My Web Page  Not case sensitive = =

5 5 Starting NotePad NotePad is the standard text editor that comes with the microsoft windows operating system. To start NotePad :  Click on the “Start” button located on your Windows task bar.  Click on “Programs” and then click on the directory menu labeled “Accessories”.  Locate the shortcut “NotePad” and click the shortcut once.

6 6 Creating a Basic Starting Document AMITY University This is what is displayed.

7 7 Creating a Basic Starting Document  The HEAD of your document point to above window part. The TITLE of your document appears in the very top line of the user’s browser. If the user chooses to “Bookmark” your page or save as a “Favorite”; it is the TITLE that is added to the list.  The text in your TITLE should be as descriptive as possible because this is what many search engines, on the internet, use for indexing your site.

8 8 Setting Document Properties  Document properties are controlled by attributes of the BODY element. For example, there are color settings for the background color of the page, the document’s text and different states of links.

9 9 Edit, Save and View Cycle  To preview Your Work, open a web browser and do the following: 1.Click on the menu labeled “File”. 2.Locate the menu option, “Open”.

10 10 Edit, Save and View Cycle 3. In the “Open” dialog box, click on the “Browse” button and locate your web document. 4.Click “OK” once you have selected your file.  The web browser will load the same document but with the new revisions. This process is the Edit, Save and View Cycle.

11 11 Headings,  Inside the BODY element, heading elements H1 through H6 are generally used for major divisions of the document. Headings are permitted to appear in any order, but you will obtain the best results when your documents are displayed in a browser if you follow these guidelines: 1.H1: should be used as the highest level of heading, H2 as the next highest, and so forth. 2.You should not skip heading levels: e.g., an H3 should not appear after an H1, unless there is an H2 between them.

12 12 Headings, Example Page Heading 1 Heading 2 Heading 3 Heading 4 Heading 5 Heading 6 Heading 1 Heading 2 Heading 3 Heading 4 Heading 5 Heading 6

13 13 Paragraphs,  Paragraphs allow you to add text to a document in such a way that it will automatically adjust the end of line to suite the window size of the browser in which it is being displayed. Each line of text will stretch the entire length of the window.

14 14 Paragraphs, Example Page Heading 1 Paragraph 1, …. Heading 2 Paragraph 2, …. Heading 3 Paragraph 3, …. Heading 4 Paragraph 4, …. Heading 5 Paragraph 5, …. Heading 6 Paragraph 6, …. Heading 1 Paragraph 1,…. Heading 2 Paragraph 2,…. Heading 3 Paragraph 3,…. Heading 4 Paragraph 4,…. Heading 5 Paragraph 5,…. Heading 6 Paragraph 6,….

15 15 Break,  Line breaks allow you to decide where the text will break on a line or continue to the end of the window.  A is an empty Element, meaning that it may contain attributes but it does not contain content.  The element does not have a closing tag.

16 16 Horizontal Rule,  The element causes the browser to display a horizontal line (rule) in your document.  does not use a closing tag,.

17 17 Horizontal Rule, AttributeDescriptionDefault Value SIZE Height of the rule in pixels 2 pixels WIDTH Width of the rule in pixels or percentage of screen width 100% NOSHADE Draw the rule with a flat look instead of a 3D look Not set (3D look) ALIGN Aligns the line (Left, Center, Right) Center COLOR Sets a color for the rule (IE 3.0 or later) Not set

18 18 Horizontal Rule, Example Page Heading 1 Paragraph 1, Line 2 Line 3 Heading 1 Paragraph 1,…. Line 2 ______________________ _____ Line 3

19 19 Character Formatting In this chapter you will learn how to enhance your page with Bold, Italics, and other character formatting options. Objectives Upon completing this section, you should be able to 1.Change the color and size of your text. 2.Use Common Character Formatting Elements. 3.Align your text. 4.Add special characters. 5.Use other character formatting elements.

20 20 Bold, Italic and other Character Formatting Elements  Two sizes bigger  The size attribute can be set as an absolute value from 1 to 7 or as a relative value using the “+” or “-” sign. Normal text size is 3 (from -2 to +4).  Bold  Italic  Underline  Color = “#RRGGBB” The COLOR attribute of the FONT element. E.g., this text has color

21 21 Bold, Italic and other Character Formatting Elements  Emphasis Browsers usually display this as italics.  STRONG Browsers display this as bold.  TELETYPE Text is displayed in a mono-spaced font. A typewriter text, e.g. fixed- width font.  Citation represents a document citation (italics). For titles of books, films, etc. Typically displayed in italics. (A Beginner's Guide to HTML)

22 22 Bold, Italic and other Character Formatting Elements One Size Larger - Normal – One Size Smaller Bold - italics - Underlined - Colored Emphasized - Strong - Tele Type One Size Larger - Normal – One Size Smaller Bold - italics - Underlined - Colored Emphasized - Strong - Tele Type

23 23 Alignment  Some elements have attributes for alignment (ALIGN) e.g. Headings, Paragraphs and Horizontal Rules.  The Three alignment values are : LEFT, RIGHT, CENTER.  Will center elements.

24 HTML Attributes (Alignments) Align Attribute Example This is left aligned This is center aligned This is right aligned 24

25 HTML Attributes Style tag The style Attribute Some text... 25

26 HTML Attributes Superscript Text Example The following word uses a superscript typeface. The following word uses a subscript typeface. The following word uses a strikethrough typeface. The following word uses a italicized typeface. The following word uses a underlined typeface.</p The following word uses a bold typeface. 26

27 HTML Tables HTML Tables Row 1, Column 1 Row 1, Column 2 Row 2, Column 1 Row 2, Column 2 27

28 Table with values HTML Table Header Name Salary Ramesh Raman 5000 Shabbir Hussein 7000 28

29 29

30 Colspan and Rowspan Attributes You will use colspan attribute if you want to merge two or more columns into a single column. Similar way you will use rowspan if you want to merge two or more rows. 30

31 Colspan and Rowspan Attributes HTML Table Colspan/Rowspan Column 1 Column 2 Column 3 Row 1 Cell 1 Row 1 Cell 2 Row 1 Cell 3 Row 2 Cell 2 Row 2 Cell 3 Row 3 Cell 1 31

32 32

33 Tables Backgrounds bgcolor attribute - You can set background color for whole table or just for one cell. bordercolor - You can also set border color also using bordercolor attribute. 33

34 Tables Backgrounds HTML Table Background Column 1 Column 2 Column 3 Row 1 Cell 1 Row 1 Cell 2 Row 1 Cell 3 Row 2 Cell 2 Row 2 Cell 3 Row 3 Cell 1 34

35 HTML Lists HTML offers web authors three ways for specifying lists of information. All lists must contain one or more list elements. Lists may contain: - An unordered list. This will list items using plain bullets. - An ordered list. This will use different schemes of numbers to list your items. - A definition list. This arranges your items in the same way as they are arranged in a dictionary. 35

36 HTML Unordered Lists An unordered list is a collection of related items that have no special order or sequence. This list is created by using HTML tag. Each item in the list is marked with a bullet. 36

37 HTML Unordered Lists HTML Unordered List Beetroot Ginger Potato Radish 37

38 The type Attribute You can use type attribute for tag to specify the type of bullet you like. By default it is a disc. Following are the possible options: 38

39 HTML Ordered Lists If you are required to put your items in a numbered list instead of bulleted then HTML ordered list will be used. This list is created by using tag. The numbering starts at one and is incremented by one for each successive ordered list element tagged with. 39

40 HTML Ordered Lists HTML Ordered List Beetroot Ginger Potato Radish 40

41 The type Attribute You can use type attribute for tag to specify the type of numbering you like. By default it is a number. Following are the possible options: - Default-Case Numerals. - Upper-Case Numerals. - Lower-Case Numerals. - Lower-Case Letters. - Upper-Case Letters. 41

42 HTML Definition Lists HTML and XHTML support a list style which is called definition listswhere entries are listed like in a dictionary or encyclopedia. The definition list is the ideal way to present a glossary, list of terms, or other name/value list. Definition List makes use of following three tags. - Defines the start of the list - A term - Term definition - Defines the end of the list 42

43 HTML Definition Lists HTML Definition List HTML This stands for Hyper Text Markup Language HTTP This stands for Hyper Text Transfer Protocol 43

44 Image Insertion Using Image in Webpage Simple Image Insert 44

45 45

46 Frames HTML frames are used to divide your browser window into multiple sections where each section can load a separate HTML document. A collection of frames in the browser window is known as a frameset. The window is divided into frames in a similar way the tables are organized: into rows and columns. 46

47 Creating Frames To use frames on a page we use tag instead of tag. The tag defines how to divide the window into frames. The rows attribute of tag defines horizontal frames and cols attribute defines vertical frames. Each frame is indicated by tag and it defines which HTML document shall open into the frame. 47

48 Frame-Row Wise HTML Frames 48

49 Frame- Column Wise HTML Frames 49

50 50

51 Linking Documents A link is specified using HTML tag. This tag is called anchor tag and anything between the opening tag and the closing tag becomes part of the link and a user can click that part to reach to the linked document. Following is the simple syntax to use tag. 51

52 Linking Documents Hyperlink Example Click following link Google 52

53 Linking Documents Hyperlink Example Click any of the following links Google Gmail facebook 53

54 54

55 Html Forms HTML Forms are required when you want to collect some data from the site visitor. For example during user registration you would like to collect information such as name, email address, credit card, etc. A form will take input from the site visitor and then will post it to a back-end application such as CGI, ASP Script or PHP script etc. The back- end application will perform required processing on the passed data based on defined business logic inside the application. 55

56 HTML Form Controls Text Input Controls Checkboxes Controls Radio Box Controls Select Box Controls Submit and Reset Button 56

57 Form Example Text Input Control First name: Last name: Password: Description : Enter description here... Select your class MBA MCA MCom Select your Subjects ITM Accounts Select your city Delhi Faridabad 57

58 58

59 Queries? 59


Download ppt "1 Introduction to HTML. 2 Definitions  W W W – World Wide Web.  HTML – HyperText Markup Language – The Language of Web Pages on the World Wide Web."

Similar presentations


Ads by Google