Introduction to HTML Technology Mrs Huddleston WHAT IS

  • Slides: 15
Download presentation
Introduction to HTML Technology Mrs. Huddleston

Introduction to HTML Technology Mrs. Huddleston

WHAT IS HTML? ¨ HTML—Hyper. Text Markup Language ¨ HTML is a universal programming

WHAT IS HTML? ¨ HTML—Hyper. Text Markup Language ¨ HTML is a universal programming language used for the creation of web pages ¨ HTML is a set of logical codes (markup) in brackets that describe the appearance of a web document and the information it contains. ¨ HTML documents are electronic files that allow easy connection to other documents. Huddleston - Intro to HTML 2

CREATING HTML DOCUMENTS ¨ Can be created on any computer with a text editor

CREATING HTML DOCUMENTS ¨ Can be created on any computer with a text editor ¨ Must be saved as a “text only” file ¨ Must add an extension of. html or. htm to the file name Huddleston - Intro to HTML 3

VIEWING HTML DOCUMENTS ¨ Interpreted in a browser (IE, Firefox). ¨ All computers with

VIEWING HTML DOCUMENTS ¨ Interpreted in a browser (IE, Firefox). ¨ All computers with a browser can read HTML, but how they display the file may differ depending on: 1. Browser 2. User Preferences Huddleston - Intro to HTML 4

PARTS OF A WEB PAGE 1. HTML—tells browser that it’s reading an HTML document

PARTS OF A WEB PAGE 1. HTML—tells browser that it’s reading an HTML document as well as version of HTML Everything in the document is contained within the <html> </html> section. 2. HEAD—contains general information about that page, including title and meta tags 3. BODY—content of the page Huddleston - Intro to HTML 5

TAGS ¨ Tag—command/code – Enclosed in < > ¨ Attribute/Property—additional information that defines a

TAGS ¨ Tag—command/code – Enclosed in < > ¨ Attribute/Property—additional information that defines a tag’s appearance ¨ Value—characteristic of an attribute **If there is more than one word describing the value, use “ ” otherwise, it usually doesn’t matter Huddleston - Intro to HTML 6

EXAMPLE <tag attribute=value> <FONT color=white> ¨ Tag=FONT ¨ Attribute=color ¨ Value=white ¨ In most

EXAMPLE <tag attribute=value> <FONT color=white> ¨ Tag=FONT ¨ Attribute=color ¨ Value=white ¨ In most tags, capitalization does not matter Huddleston - Intro to HTML 7

ATTRIBUTES ¨ A tag can have as many attributes as it wants, but they

ATTRIBUTES ¨ A tag can have as many attributes as it wants, but they should be separated with a space Huddleston - Intro to HTML 8

EXAMPLE <FONT color=“red” size=“ 2” face=“times”> ¨ Tag=FONT ¨ Attributes=color, size, face ¨ Values=red,

EXAMPLE <FONT color=“red” size=“ 2” face=“times”> ¨ Tag=FONT ¨ Attributes=color, size, face ¨ Values=red, 2, times ¨ In this example, no quotation marks are needed Huddleston - Intro to HTML 9

CLOSING TAGS ¨ Closing tags contain a slash (/) before the tag name. ¨

CLOSING TAGS ¨ Closing tags contain a slash (/) before the tag name. ¨ Example: <b>Hi</b> Huddleston - Intro to HTML 10

CLOSING TAGS ¨ Not all tags need a closing. • One-sided tags require only

CLOSING TAGS ¨ Not all tags need a closing. • One-sided tags require only an opening tag. <p> • Two-sided tags require opening and closing tags. <b>Hi</b> Huddleston - Intro to HTML 11

TAG SPACING ¨ Extra spaces, returns, and repeated tags are generally ignored in HTML.

TAG SPACING ¨ Extra spaces, returns, and repeated tags are generally ignored in HTML. ¨ SS, DS, indenting, etc. will not affect how the HTML document is viewed in the browser. Huddleston - Intro to HTML 12

EXAMPLE A <H 1>Hello <P>How are you? <P>I’m fine. <BR>Really? Huddleston - Intro to

EXAMPLE A <H 1>Hello <P>How are you? <P>I’m fine. <BR>Really? Huddleston - Intro to HTML 13

EXAMPLE B <H 1>Hello<P>How are you? <P> I’m fine. <BR>Really? Huddleston - Intro to

EXAMPLE B <H 1>Hello<P>How are you? <P> I’m fine. <BR>Really? Huddleston - Intro to HTML 14

Both examples will look exactly the same in the browser. Hello How are you?

Both examples will look exactly the same in the browser. Hello How are you? I’m fine. Really? Huddleston - Intro to HTML 15