Common Tags Always include the … tags Comments placed inside tags HTML documents –HEAD section Info about the document Info in header not generally rendered.

Slides:



Advertisements
Similar presentations
/ 441 Internet Applications Ahmed M. Zeki Sem – / Chapter 4.
Advertisements

Session 2 Introduction to HyperText Markup Language 4 (HTML 4) Matakuliah: M0114/Web Based Programming Tahun: 2005 Versi: 5.
Chapter 3 – Web Design Tables & Page Layout
Session 3 Intermediate HTML Matakuliah: M0114/Web Based Programming Tahun: 2005 Versi: 5.
HTML popo.
CREATED BY : VIRAL M.KORADIYA. Anchor elements are defined by the element. The element accepts several attributes, but either the Name or HREF attribute.
Internet Services and Web Authoring (CSET 226) Lecture # 5 HyperText Markup Language (HTML) 1.
HTML popo.
INTRODUCTION TO HYPERTEXT MARKUP LANGUAGE 1. Outline  Introduction  Markup Languages  Editing HTML  Common Tags  Headers  Text Styling  Linking.
Intermediate Level Course. Text Format The text styles, bold, italics, underlining, superscript and subscript, can be easily added to selected text. Text.
Chapter 4 – Intermediate HTML 4 Outline 4.1 Unordered Lists 4.2 Nested and Ordered Lists 4.3 Basic HTML Tables 4.4 Intermediate HTML Tables and Formatting.
1 Outline 9.1Introduction 9.2Markup Languages 9.3Editing HTML 9.4Common Tags 9.5Headers 9.6Text Styling 9.7Linking 9.8Images 9.9Formatting Text With 9.10Special.
 2001 Deitel & Associates, Inc. All rights reserved. 1 Outline 9.1Introduction 9.2Markup Languages 9.3Editing HTML 9.4Common Tags 9.5Headers 9.6Text Styling.
1 HTML Markup language – coded text is converted into formatted text by a web browser. Big chart on pg. 16—39. Tags usually come in pairs like – data Some.
1 Introduction to XHTML: Part 2 Outline Introduction Basic XHTML Tables Intermediate XHTML Tables and Formatting Basic XHTML Forms More Complex XHTML Forms.
 2008 Pearson Education, Inc. All rights reserved. 1 Introduction to HTML.
Page 1 of 58 HTML Vadim Parizher Computer Science Department California State University, Northridge Slides from text Book by Deitel, Deitel & Nieto These.
 2001 Deitel & Associates, Inc. All rights reserved. 1 Chapter 10 – Intermediate HTML 4 Outline 10.1Introduction 10.2Unordered Lists 10.3Nested and Ordered.
 2003 Prentice Hall, Inc. All rights reserved. Chapter 5 - Introduction to XHTML: Part 2 Outline 5.1 Introduction 5.2 Basic XHTML Tables 5.3 Intermediate.
Outline IS400: Development of Business Applications on the Internet Fall 2004 Instructor: Dr. Boris Jukic Table, Forms, Metatags and Frames.
HTML Code. What we will cover Basic HTML Body Font Images Hyperlinks Tables Frames.
HTML. Goals How to use the Komodo editor HTML coding and testing Basic HTML tags List and Images Tables and Links At least 2 pages and navigation
HTML Tables and Forms Creating Web Pages with HTML CIS 133 Web Programming Concepts 1.
 2008 Pearson Education, Inc. All rights reserved Introduction to XHTML.
 2008 Pearson Education, Inc. All rights reserved Introduction to XHTML.
 2008 Pearson Education, Inc. All rights reserved Introduction to XHTML.
 2008 Pearson Education, Inc. All rights reserved Introduction to XHTML.
Dr. Nuha El-KhaliliInternet Programming ( ) HTML Hyper Text Markup Language The language of web pages Maintained by the W3C
Web Development University of Khartoum. Web Development Web Programming Web Design University of Khartoum.
Chapter 4: Hypertext Markup Language Primer TECH Prof. Jeff Cheng.
 2008 Pearson Education, Inc. All rights reserved Introduction to XHTML Pt. 2.
1 HTML Advanced Features Dr. Awad Khalil Computer Science Department AUC.
HTML. Basic HTML HTML document – HTML headings – to HTML paragraphs – HTML links – HTML images –
1 HTML محمد احمدی نیا 2 Of 43 What is HTML?  HTML stands for Hyper Text Markup Language  HTML is not a programming language, it.
 2004 Prentice Hall, Inc. All rights reserved. Chapter 5 - Introduction to XHTML: Part 2 Outline 5.1 Introduction 5.2 Basic XHTML Tables 5.3 Intermediate.
 2008 Pearson Education, Inc. All rights reserved Introduction to XHTML.
CS105 INTRODUCTION TO COMPUTER CONCEPTS HTML Instructor: Cuong (Charlie) Pham.
Chapter 10 – Intermediate HTML 4 Outline 10.1Introduction 10.2Unordered Lists 10.3Nested and Ordered Lists 10.4Basic HTML Tables 10.5Intermediate HTML.
Designing a Web Page with Tables. A text table: contains only text, evenly spaced on the Web page in rows and columns uses only standard word processing.
Chapter 2 XHTML: Part II The Web Warrior Guide to Web Design Technologies.
 2008 Pearson Education, Inc. All rights reserved Introduction to XHTML.
2.2 XHTML (cont.). Motto Yea, from the table of my memory I’ll wipe away all trivial fond records. —William Shakespeare.
LOGO FORMs in HTML CHAPTER 5 Eastern Mediterranean University School of Computing and Technology Department of Information Technology ITEC229 Client-Side.
HTML: Hyptertext Markup Language Doman’s Sections.
Introduction HTML (Hypertext Markup Language) is used to create document on the World Wide Web. HTML is not a programming language, it is a markup language.
 2008 Pearson Education, Inc. All rights reserved Introduction to XHTML.
CSE 409 – Advanced Internet Technology 1 DISCUSSION OF BASIC HTML TAGS.
HTML Basics. HTML Coding HTML Hypertext markup language The code used to create web pages.
What is HTML? HTML is a language for describing web pages. HTML stands for Hyper Text Markup Language HTML is not a programming language, it is a markup.
20-753: Fundamentals of Web Programming 1 Lecture 6: Advanced HTML Fundamentals of Web Programming Lecture 6: Advanced HTML.
CS3101 Internet Programming. Chapter 01 Introduction to XHTML 2Internet Programming - Chapter 01:XHTML Slides based on: Programming the World Wide Web.
Introduction to XHTML/HTML5 (part 2) Instructor: Sergey Goldman Based on Based on Internet & World Wide Web How To Program (multiple versions) 1.
1 Foundation of HTML Web Page Design. 2 Safe Web Fonts: Used by most computers regardless of environment or platform  Times New Roman  Arial  Courier.
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 AN INTRODUCTION TO WEB PAGE PROGRAMMING. INTRODUCTION TO HTML With HTML you can create your own Web site. HTML stands for Hyper Text Markup Language.
 2008 Pearson Education, Inc. All rights reserved Introduction to XHTML.
HTML Basics.
4 Introduction to XHTML.
4 Introduction to XHTML.
4 Introduction to XHTML.
Basic XHTML Tables XHTML tables—a frequently used feature that organizes data into rows and columns. Tables are defined with the table element. Table.
The Web Warrior Guide to Web Design Technologies
Chapter 5 Introduction to XHTML: Part 2
Chapter 5 - Introduction to XHTML: Part 2
4 Introduction to XHTML.
1 Introduction to XHTML.
Introduction to XHTML Cont:.
Html.
Introduction to HTML.
Presentation transcript:

Common Tags Always include the … tags Comments placed inside tags HTML documents –HEAD section Info about the document Info in header not generally rendered in display window TITLE element names your Web page –BODY section Page content Includes text, images, links, forms, etc. Elements include backgrounds, link colors and font faces P element forms a paragraph, blank line before and after

Headers –Simple form of text formatting –Vary text size based on the headers level –Actual size of text of header element is selected by browser –Can vary significantly between browsers CENTER element –Centers material horizontally –Most elements are left adjusted by default

Text Styling Underline style – … Align elements with ALIGN attribute –right, left or center Close nested tags in the reverse order from which they were opened Emphasis (italics) style – … Strong (bold) style – … and tags deprecated –Overstep boundary between content and presentation

Linking Links inserted using the A (anchor) element –Requires HREF attribute HREF specifies the URL you would like to link to – … –Can link to addresses, using … –Note quotation mark placement

Images Image background – –Image does not need to be large as browser tiles image across and down the screen Pixel –Stands for picture element –Each pixel represents one addressable dot of color on the screen Insert image into page –Use tag Attributes: –SRC = location –HEIGHT (in pixels) –WIDTH (in pixels) –BORDER (black by default) –ALT (text description for browsers that have images turned off or cannot view images)

Images (II) Images as anchors Background color –Preset colors ( white, black, blue, red, etc.) –Hexadecimal code First two characters for amount of red Second two characters for amount of green Last two characters for amount of blue 00 is the weakest a color can get FF is the strongest a color can get Ex. black = #000000

Formatting Text With FONT element –Add color and formatting to text –FONT attributes: COLOR –Preset or hex color code –Value in quotation marks –Note: you can set font color for whole document using TEXT attribute in BODY element

Formatting Text With (II) SIZE –To make text larger, set SIZE = +x –To make text smaller, set SIZE = -x –x is the number of font point sizes FACE –Font of the text you are formatting –Be careful to use common fonts like Times, Arial, Courier and Helvetica –Browser will display default if unable to display specified font Example …

Special Characters, Horizontal Rules and More Line Breaks Special characters –Inserted in code form –Format always &code; Ex. & –Insert an ampersand –Codes often abbreviated forms of the character –Codes can be in hex form Ex. & to insert an ampersand Strikethrough with DEL element Superscript: SUP element Subscript: SUB element

Special Characters, Horizontal Rules and More Line Breaks (II) Horizontal rule – tag –Inserts a line break directly below it –HR attributes: WIDTH –Adjusts the width of the rule –Either a number (in pixels) or a percentage SIZE –Determines the height of the horizontal rule –In pixels ALIGN –Either left, right or center NOSHADE –Eliminates default shading effect and displays horizontal rule as a solid-color bar

Unordered Lists Unordered list element –Creates a list in which every line begins with a bullet mark – … tags –Each item in unordered list inserted with the (list item) tag Closing tag optional

Nested and Ordered Lists Nested list –Contained in another list element –Nesting the new list inside the original Indents list one level and changes the bullet type to reflect the nesting Browsers –Insert a line of whitespace after every closed list Indent each level of a nested list –Makes the code easier to edit and debug

Nested and Ordered Lists (II) Ordered list element – … tags –By default, ordered lists use decimal sequence numbers (1, 2, 3, …) –To change sequence type, use TYPE attribute in opening tag TYPE = 1 (default) –Decimal sequence (1, 2, 3, …) TYPE = I –Uppercase Roman numerals (I, II, III, …) TYPE = i –Lowercase Roman numerals (i, ii, iii, …) TYPE = A –Uppercase alphabetical (A, B, C, …) TYPE = a –Lowercase alphabetical (a, b, c, …)

Basic HTML Tables Tables –Organize data into rows and columns –All tags and text that apply to the table go inside … tags –TABLE element Attributes –BORDER lets you set the width of the tables border in pixels –ALIGN : left, right or center –WIDTH: pixels (absolute) or a percentage CAPTION element is inserted directly above the table in the browser window –Helps text-based browsers interpret table data

Basic HTML tables (II) –TABLE element (cont.) THEAD element –Header info –For example, titles of table and column headers TR element –Table row element used for formatting the cells of individual rows TBODY element –Used for formatting and grouping purposes Smallest area of the table we are able to format is data cells –Two types of data cells »In the header: … suitable for titles and column headings »In the table body: … –Aligned left by default

Intermediate HTML Tables and Formatting COLGROUP element –Used to group and format columns Each COL element –In the … tags –Can format any number of columns (specified by the SPAN attribute) Background color or image –Add to any row or cell –Use BGCOLOR and BACKGROUND attributes

Intermediate HTML Tables and Formatting (II) Possible to make some data cells larger than others –ROWSPAN attribute inside any data cell Value extends the data cell to span the specified number of cells –COLSPAN attribute Value extends the data cell to span the specified number of cells –Modified cells will cover the areas of other cells Reduces number of cells in that row or column VALIGN attribute –top, middle, bottom and baseline –Default is middle

Basic HTML Forms Forms –Collect information from people viewing your site FORM element –METHOD attribute indicates the way the Web server will organize and send you form output Web server: machine that processes browser requests METHOD = post in a form that causes changes to server data METHOD = get in a form that does not cause any changes in server data –Form data sent to server as an environment variable Processed by scripts –ACTION attribute Path to a script (a CGI script written in Perl, C or other languages)

Basic HTML Forms (II) INPUT element –Attributes: TYPE (required) –Hidden inputs always have TYPE = hidden –Defines the usage of the INPUT element »TYPE = text inserts a one-line text box NAME provides a unique identification for INPUT element VALUE indicates the value that the INPUT element sends to the server upon submission SIZE –For TYPE = text, specifies the width of the text input, measured in characters MAXLENGTH –For TYPE = text, specifies the maximum number of characters that the text input will accept

Basic HTML Forms (III) INPUT element (cont.) –Include textual identifier adjacent to INPUT element –2 types of INPUT elements that should be inserted into every form: TYPE = submit inserts a button that submits data to the server –VALUE attribute changes the text displayed on the button (default is Submit ) TYPE = reset inserts a button that clears all entries the user entered into the form –VALUE attribute changes the text displayed on the button (default is Reset )

More Complex HTML Forms TEXTAREA element –Inserts a scrollable text box into FORM –ROWS and COLS attributes specify the number of character rows and columns INPUT element –TYPE = password –Inserts a text box where data displayed as asterisks Actual data submitted to server

More Complex HTML Forms (II) INPUT element (cont.) –TYPE = checkbox creates a checkbox Used individually or in groups Each checkbox in a group should have same NAME Make sure that the checkboxes within a group have different VALUE attribute values –Otherwise, browser will cannot distinguish between them CHECKED attribute checks boxes initially –TYPE = radio Radio buttons similar in function and usage to checkboxes Only one radio button in a group can be selected CHECKED attribute indicates which radio button is selected initially

More Complex Forms (III) SELECT element –Places a selectable list of items inside FORM Include NAME attribute –Add an item to list Insert an OPTION element in the … tags Closing OPTION tag optional –SELECTED attribute applies a default selection to list –Change the number of list options visible Including the SIZE = x attribute inside the tag x number of options visible

Internal Linking Internal linking –Assign location name to individual point in an HTML file –Location name can then be added to the pages URL Link to specific point on the page –Location marked by including a NAME attribute in an A (anchor) element Ex. in list.html –URL of location Format: page.html#name Ex. list.html#features

Creating and Using Image Maps Image maps –Designate certain sections of an image as hotspots –Use hotspots as anchors for linking –All elements of image map inside … tags – tag requires NAME attribute Ex. Hotspots designated with AREA element –AREA attributes: HREF sets the target for the link on that spot SHAPE and COORDS set the characteristics of the AREA ALT provides alternate textual description

Creating and Using Image Maps (II) AREA element (continued) –SHAPE = rect Causes rectangular hotspot to be drawn around the coordinates given in the COORDS attribute COORDS - pairs of numbers corresponding to the x and y axes –x axis extends horizontally from upper-left corner –y axis extends vertically from upper-left corner Ex. –Rectangular hotspot with upper-left corner of rectangle at (3, 122) and lower-right corner at (73, 143)

Creating and Using Image Maps (III) AREA element (continued) –SHAPE = poly Causes a hotspot to be created around specified coordinates Ex. –SHAPE = circle Creates a circular hotspot Coordinates of center of circle and radius of circle, in pixels Ex.

Creating and Using Image Maps (IV) To use the image map with an IMG element –Insert the USEMAP = #name attribute into the IMG element –name - value of the NAME attribute in the MAP element –Ex.

Tags Search engines –Catalog sites by following links from page to page –Save identification and classification info –Tells browser that HTML conforms to a Transitional subset of HTML version 4.0 META tag –Main HTML element that interacts with search engines

Tags (II) META tags –Contain two attributes that should always be used: –NAME identifies type of META tag –CONTENT provides info the search engine will catalog about your site CONTENT of a META tag with NAME = keywords –Provides search engines with a list of words that describe key aspects of your site CONTENT of a META tag with NAME = description –Should be 3 to 4 lines –Used by search engines to catalog and display your site META elements –Not visible to users of the site –Should be placed inside header section

Tag Frames –Display more than one HTML file at a time –If used properly, frames make your site more readable and usable tag –Uses Frameset instead of Transitional –Tell the browser that you are using frames tags –Tell the browser the page contains frames –Details for frames contained within … tags –COLS or ROWS attribute gives the width or height of each frame In pixels or a percentage

Tag (II) FRAME elements –Specify what files will make up frameset –FRAME attributes: NAME - identifies specific frame, enabling hyperlinks to load in their intended frame –TARGET attribute of A element –Ex. –TARGET = _blank loads page in a new blank browser window –TARGET = _self loads page in the same window as anchor element –TARGET = _parent loads page in the parent FRAMESET –TARGET = _top loads page in the full browser window –SRC Gives the URL of the page that will be displayed in the specified frame

Tag (III) Not all browsers support frames –Use the NOFRAMES element inside the FRAMESET –Direct users to a non-framed version –Provide links for downloading a frames-enabled browser Use of frames –Do not use frames if you can accomplish same with tables or other, simpler HTML formatting

Nested Tags FRAME element –SCROLLING attribute Set to no to prevent scroll bars –NORESIZE attribute prevents user from resizing the frame Nesting frames –Include the correct number of FRAME elements inside FRAMESET –Using nested FRAMESET elements Indent every level of FRAME tag Makes page clearer and easier to debug