Introduction to HTML: Part 1

Slides:



Advertisements
Similar presentations
HTML popo.
Advertisements

CREATED BY : VIRAL M.KORADIYA. Anchor elements are defined by the element. The element accepts several attributes, but either the Name or HREF attribute.
INTRODUCTION TO HYPERTEXT MARKUP LANGUAGE 1. Outline  Introduction  Markup Languages  Editing HTML  Common Tags  Headers  Text Styling  Linking.
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.
 2003 Prentice Hall, Inc. All rights reserved. Chapter 4 - Introduction to XHTML: Part 1 Outline 4.1 Introduction 4.2 Editing XHTML 4.3 First XHTML Example.
 2008 Pearson Education, Inc. All rights reserved. 1 Introduction to HTML.
 2004 Prentice Hall, Inc. All rights reserved. Introduction to XHTML: Part 1.
 2003 Prentice Hall, Inc. All rights reserved. Chapter 4 - Introduction to XHTML: Part 1 Outline 4.1 Introduction 4.2 Editing XHTML 4.3 First XHTML Example.
HTML Tags. Objectives Know the commonly used HTML tags Create a simple webpage using the HTML tags that will be discussed.
 2008 Pearson Education, Inc. All rights reserved Introduction to XHTML.
1 Outline 3.1 Introduction 3.2 Editing HTML 3.3 First HTML Example 3.4 W3C HTML Validation Service 3.5 Headers 3.6 Linking 3.7 Images 3.8 Special Characters.
HTML HTML stands for "Hyper Text Mark-up Language“. Technically, HTML is not a programming language, but rather a markup language. Used to create web pages.
1 HTML Basics Dr. Awad Khalil Computer Science Department AUC.
 2001 Prentice Hall, Inc. All rights reserved. Lecture 1 Internet and the World Wide Web Course structure Introduction XHTML Cascading Style Sheets JavaScript.
 2002 Prentice Hall, Inc. All rights reserved.2 Chapter 2 — Introduction to HyperText Markup Language 4: Part I Outline 2.1Introduction 2.2Markup Languages.
1 CSC 121 Computers and Scientific Thinking David Reed Creighton University HTML and Web Pages.
Introduction to HTML. What is a HTML File?  HTML stands for Hyper Text Markup Language  An HTML file is a text file containing small markup tags  The.
 2008 Pearson Education, Inc. All rights reserved Introduction to XHTML.
1 Introduction to HTML: Part 1 Outline Introduction Elements and Attributes Editing HTML Common Elements Headers Images Unordered Lists Nested and Ordered.
1 Web Development Lecture # 11 Introduction to XHTML (Chapter # 4) It.GulGasht.Com.
CS105 INTRODUCTION TO COMPUTER CONCEPTS HTML Instructor: Cuong (Charlie) Pham.
1 Introduction to XHTML. 2 Main.html Program Output 1 2
HTML: Hyptertext Markup Language Doman’s Sections.
Introduction to HTML Xiangming Mu 9/23/ Learning Objectives Understand basic HTML tags and their attributes Learn to create a simple HTML page.
HTML— More Tags, Formatting, and Lists. Formatting Tags  Bold  Italics  Underline  Big text  Small text  Subscript (H 2 O)  Superscript (10 3 )
1 Introduction to XHTML: Part 1 Outline Introduction Elements and Attributes Editing XHTML Common Elements W3C XHTML Validation Service Headers Linking.
WEB DESIGN AND PROGRAMMING Introduction to XHTML.
HTML Basics Computers. What is an HTML file? *HTML is a format that tells a computer how to display a web page. The documents themselves are plain text.
HTML Basics. HTML Coding HTML Hypertext markup language The code used to create web pages.
HTML CS 105. Page Structure HTML elements control the details of how a page gets displayed. Every HTML document has the following basic structure: … …
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.
HTML. INDEX Introduction to HTML Creating Web Pages Commands And Tags Web Page.
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.
Lesson 5. XHTML Tags, Attributes and Structure XHTML Basic Structure head and body titles Paragraph headings comments Document Presentation Manipulating.
Introduction to HTML.
HTML Basics.
Chapter 24 – Introduction to XHTML Basic: Part I
LAB Work 01 MBA 61062: E-Commerce
Marking Up with XHTML Tags describe how a web page should look
Chapter 3 – Introduction to HyperText Markup Language 4 (HTML 4)
Computer Fundamentals 2
Elements of HTML Web Design – Sec 3-2
Advanced Web Programming Intro to HTML5 part 1
Chapter 9 – Introduction to HyperText Markup Language 4 (HTML 4)
Chapter 1: Introduction to XHTML (part 1)
Chapter 4 - Introduction to XHTML: Part 1
Web Programming– UFCFB Lecture 5
COMPUTING FUNDAMENTALS
HTML (HyperText Markup Language)
Introduction to HTML: Part 1
Computers and Scientific Thinking David Reed, Creighton University
Introduction to HyperText Markup Language (HTML)
Chapter 4 - Introduction to XHTML: Part 1
Marking Up with XHTML Tags describe how a web page should look
Marking Up with XHTML Tags describe how a web page should look
1 Introduction to XHTML.
张奇 复旦大学 计算机科学技术学院 2015年4月 多媒体技术基础 第6讲 HTML5 & CSS 多媒体技术基础 第5讲 HTML 张奇 复旦大学 计算机科学技术学院 2015年4月.
Introduction to HTML- Basics
Introduction to XHTML Cont:.
Chapter 4 - Introduction to XHTML: Part 1
Computer Science Department
<html> This tag is used to begin each html document
Html.
Introduction to HTML.
Marking Up with XHTML Tags describe how a web page should look
Marking Up with XHTML Tags describe how a web page should look
IS333: MULTI-TIER APPLICATION DEVELOPMENT
Marking Up with XHTML Tags describe how a web page should look
Chapter 4 - Introduction to XHTML: Part 1
Presentation transcript:

Introduction to HTML: Part 1 Outline Introduction Elements and Attributes Editing HTML Common Elements Headers Images Unordered Lists Nested and Ordered Lists Linking Special Characters and More Line Breaks More Examples

- Introduction to HTML: Part 1 - HTML stands for Hyper Text Markup Language. - An HTML file is a text file containing . -The markup tags tell the Web browser how to display the page. -An HTML file must have an htm or html file extension. -An HTML file can be created using a simple text editor.

Main.html Program Output <head> <title>Internet and WWW How to Program - Welcome</title> </head> <body> <p>Welcome to XHTML!</p> </body> </html> Main.html Program Output The text between the title tags appears as the title of the web page. Elements between the body tags of the html document appear in the body of the web page

HTML Text Formatting Tag Description <b> Defines bold text <big> Defines big text <em> Defines emphasized text <i> Defines italic text <small> Defines small text <strong> Defines strong text <sub> Defines subscript text <sup> Defines superscript text <del> Defines deleted text <bdo> defines the text direction <u> Defines underlined text <hr> Defines horizontal rule <h1>…<h6> Defines header text

Text Formatting Example <Html><Head> <Title> my first example </title> </head> <Body> <b> this is bold text </b> <Big> this is big text </big> <Em> this is emphasized text </em> <i> this is italic text </i> <Small > this is small text </small> <Del> this is deleted text </del> <u> this is underlined text </u> This is <sub>subscript text</sub> This is <sup>superscript text</sup> <bdo dir="rtl"> this is right to left text </bdo> <bdo dir="ltr"> this is left to right text </bdo> </body></html>

<html> <head> <title>Internet and WWW How to Program - Headers</title> </head> <body> <h1>Level 1 Header</h1> <h2>Level 2 header</h2> <h3>Level 3 header</h3> <h4>Level 4 header</h4> <h5>Level 5 header</h5> <h6>Level 6 header</h6> </body> </html> Header.html The font size of the text between tags decreases as the header level increases. Program Output

<font> tag <Font>: defines font Attribute  size 12 font size flag available +6  +1 -1  -6 Example: <font size="+6"> text </font> <font size="1"> text </font> centering and aligning: centering: <center> text </center> Aligning: Attribute  align  left, right, center <p align="left"> this is the left side </p> <p align="right"> this is the right side </p> <p align="center"> this is the center side </p>

Placing image on web page: Tag Description <img> Defines image Attribute Src defines the image file location. Width specify the image width. Height specify the image height. Alt is an attribute give a description of the image, the description is displayed if the image cannot be displayed Border defines the image border width align defines the placement side of the image (the default is left).

Aligning text with images Aligning text with images: <img align="top" src="img.gif"> text </> <img align="middle" src="img.gif"> text </> <img align="button" src="img.gif"> text </> The value of the src attribute of the image element is the location of the image file. <html> <head> <title>Internet and WWW How to Program - Welcome</title> </head> <body> <p><img src = "xmlhtp.jpg" height = "238" width = "183" alt = "XML How to Program book cover" /> <img src = "jhtp.jpg" height = "238" width = "183" alt = "Java How to Program book cover" /></p> </body> </html> The height and width attributes of the image element give the height and width of the image. The value of the alt attribute gives a description of the image. This description is displayed if the image cannot be displayed.

Program Output The second image could not be displayed properly, so the value of its alt attribute is displayed instead.

<marquee> Tag <Marquee> Attribute  behavior  alternate  Scroll  Slide Direction right, left, down, up. ScrollAmount =1,2,3,…. ScrollDelay= 30,40,…. Bgcolor: defines on underground color <body bgcolor="red"> <marquee bgcolor="green">

Ordered and Unordered List Ordered list: create a list in which item begin with a number or letter. Unordered list: does not order it's items by letters or unletters. Tag Description <ol> Defines ordered list <ul> Defines unordered list <li> Defines list items Attribute type Type of ordering or unordering (circle, square, disk)

By inserting a list as an entry in another list, lists can be nested. List.html <html> <head> <title>Internet and WWW How to Program - Lists</title> </head> <body> <h1>The Best Features of the Internet</h1> <ul> <li>You can meet new people from countries around the world.</li> <li>You have access to new media as it becomes public: <li>New games</li> <li>New applications <ol type = "I"> <li>For business</li> <li>For pleasure</li></ol> </li> <li>Around the clock news</li> <li>Search engines</li> <li>Shopping</li> <li>Programming <ol type = "a"> <li>XML</li> <li>Java</li> <li>XHTML</li> <li>Scripts</li> <li>New languages</li></ol></li></ul></li> <li>Links</li> <li>Keeping in touch with old friends</li> <li>It is the technology of the future!</li></ul> <h1>My 3 Favorite <em>CEOs</em></h1> <ol> <li>Harvey Deitel</li> <li>Bill Gates</li> <li>Michael Dell</li </ol> By inserting a list as an entry in another list, lists can be nested. Entries for an ordered list must be placed between the <ol> and </ol> tags. The type attribute of the ordered list element allows you to select a sequence type to order the list. Text placed between the em tags will be italicized.

List.html Program Output </body> </html> List.html Program Output Nested lists are indented underneath the main list. Some sequence types available to order lists are roman numerals, letters and numbers.

Linking Tag Description <a> Attribute href target Defines an anchor, used to create an anchor to link for. Attribute href Used to address the document to link to target Defines where the link document will be opened

Text between strong tags will appear bold. Links.html <html> <head> <title>Internet and WWW How to Program - Links</title> </head> <body> <h1>Here are my favorite sites</h1> <p><strong>Click on a name to go to that page.</strong></p> <p><a href = "http://www.deitel.com">Deitel</a></p> <p><a href = "http://www.prenhall.com">Prentice Hall</a></p> <p><a href = "http://www.yahoo.com">Yahoo!</a></p> <p><a href = "http://www.usatoday.com">USA Today</a></p> </body> </html> Text between strong tags will appear bold. Linking is accomplished in XHTML with the anchor (a) element. The text between the a tags is the anchor for the link. The anchor links to the page that’s value is given by the href attribute. Elements placed between paragraph tags will be set apart from other elements on the page with a vertical line before and after it.

Program Output Clicking on the “Deitel” link will open up the Deitel homepage in a new browser window.

<html> <head> <title>Internet and WWW How to Program - Contact Page </title> </head> <body> <p>My email address is <a href = "mailto:deitel@deitel.com"> deitel@deitel.com </a>. Click the address and your browser will open an email message and address it to me.</p> </body> </html> Contact.html To create an email link include “mailto:” before the email address in the href attribute.

Program Output When a user clicks on an email link, an email message addressed to the value of the link will open up.

Character Entities Entity name Description Result   Non-breaking space Space < Less than > Greater than " Quotation mark “ © Copyright ©

The horizontal rule element renders a horizontal line on the web page. <html> <head> <title>Internet and WWW How to Program - Contact Page </title> </head> <body> <p>My email address is <a href = "mailto:deitel@deitel.com">deitel@deitel.com </a>. Click on the address and your browser will automatically open an email message and address it to my address.</p> <hr /> <!-- Inserts a horizontal rule --> <p>All information on this site is <strong>©</strong> Deitel <strong>&</strong> Associates, Inc. 2002.</p> <p><del>You may download 3.14 x 10<sup>2</sup> characters worth of information from this site.</del> Only <sub>one</sub> download per hour is permitted.</p> <p>Note: <strong>< ¼</strong> of the information presented here is updated daily.</p> </body> </html> Contact2.html The horizontal rule element renders a horizontal line on the web page. Special characters are denoted with an ampersand (&) and an abbreviation for that character. In this case, the special characters are ampersand and copyright.

Contact2.html Program Output Text placed between del tags is struck out.. Text placed between the sub tags is subscripted. Text placed between the sup tags is superscripted.

A line break will render an empty line on a web page. <html> <head> <title>Internet and WWW How to Program - Navigation Bar </title> </head> <body> <p> <a href = "links.html"> <img src = "buttons/links.jpg" width = "65" height = "50" alt = "Links Page" /></a><br /> <a href = "list.html"> <img src = "buttons/list.jpg" width = "65" height = "50" alt = "List Example Page" /></a><br /> <a href = "contact.html"> <img src = "buttons/contact.jpg" width = "65" height = "50" alt = "Contact Page" /></a><br /> <a href = "header.html"> <img src = "buttons/header.jpg" width = "65" height = "50" alt = "Header Page" /></a><br /> <a href = "table.html"> <img src = "buttons/table.jpg" width = "65" height = "50" alt = "Table Page" /></a><br /> <a href = "form.html"> <img src = "buttons/form.jpg" width = "65" height = "50" alt = "Feedback Form" /></a><br /> </p> </body> </html> Nav.html Placing an image element between anchor tags, creates an image that is an anchor for a link. A line break will render an empty line on a web page.

Nav.html Program Output Clicking on the image entitled “links” brings the user to the page on the right. Using an image as an anchor works exactly the same as using text.

<html> <head> <title>Internet and WWW How to Program - Links</title> </head> <body> <h1>Here are my favorite sites</h1> <p><strong>Click on a name to go to that page.</strong></p> <ul> <li><a href = "http://www.deitel.com">Deitel</a></li> <li><a href = "http://www.prenhall.com">Prentice Hall </a></li> <li><a href = "http://www.yahoo.com">Yahoo!</a></li> <li><a href = "http://www.usatoday.com">USA Today</a> </li> </ul> </body> </html> Links2.html The entries in an unordered list must be included between the <ul> and </ul> tags. An entry in the list must be placed between the <li> and </li> tags.

Program Output Each entry in the list is rendered on its own line with a bullet before it.