Bài giảng Business Driven Technology - Technology plug-in T10 - Creating Web pages Using HTML

Tài liệu Bài giảng Business Driven Technology - Technology plug-in T10 - Creating Web pages Using HTML: TECHNOLOGY PLUG-IN T10Creating Web pages Using HTMLLEARNING OUTCOMESExplain what HTML isDescribe the purpose of HTML tagsExplain how browsers display tagged HTML documentsDescribe how an HTML document is structuredLEARNING OUTCOMESDescribe what an HTML attribute is.Describe how to create, save, and view HTML documentsExplain what a structure tag isExplain how to apply bold, italic, and underline formatting to an HTML documentLEARNING OUTCOMESDescribe how to create ordered and unordered listsDescribe the different types of Web links and how to insert them in a HTML documentExplain how to insert images in a HTML documentINTRODUCTIONHypertext Markup Language, or HTML, is a system of codes that you use to create Web pagesHTML, though, is not what you see onscreen as a Web pageHTML is the behind-the-scenes code that tells browsers what to displayHTMLHTML is made up of tags and attributes that work together to identify document parts and tell browsers how to display themUnderstanding TagsHT...

ppt67 trang | Chia sẻ: honghanh66 | Ngày: 27/03/2018 | Lượt xem: 60 | Lượt tải: 0download
Bạn đang xem trước 20 trang mẫu tài liệu Bài giảng Business Driven Technology - Technology plug-in T10 - Creating Web pages Using HTML, để tải tài liệu gốc về máy bạn click vào nút DOWNLOAD ở trên
TECHNOLOGY PLUG-IN T10Creating Web pages Using HTMLLEARNING OUTCOMESExplain what HTML isDescribe the purpose of HTML tagsExplain how browsers display tagged HTML documentsDescribe how an HTML document is structuredLEARNING OUTCOMESDescribe what an HTML attribute is.Describe how to create, save, and view HTML documentsExplain what a structure tag isExplain how to apply bold, italic, and underline formatting to an HTML documentLEARNING OUTCOMESDescribe how to create ordered and unordered listsDescribe the different types of Web links and how to insert them in a HTML documentExplain how to insert images in a HTML documentINTRODUCTIONHypertext Markup Language, or HTML, is a system of codes that you use to create Web pagesHTML, though, is not what you see onscreen as a Web pageHTML is the behind-the-scenes code that tells browsers what to displayHTMLHTML is made up of tags and attributes that work together to identify document parts and tell browsers how to display themUnderstanding TagsHTML tags serve two purposes:They identify logical document parts —the major structural components in HTML documents HTML tags reference other elements - tags can include pointers and links to other documents, images, sound files, video files, multimedia applications, animations, applets, and so onUnderstanding Tag ComponentsAll tags are composed of elements that are contained within angle brackets ()The angle brackets simply tell browsers that the text between them is an HTML commandSome sample tags look like these: (for heading level 2) (for document body) (for bold)Understanding Tag ComponentsMost tags are paired, with an opening tag () and a closing tag (This is a headingUnderstanding Tag ComponentsTo apply more than one tag to a chunk of information, you nest the tagsNesting means placing one set of tags inside another setExample:This is an italicized headingThis is an italicized headingImproving ReadabilityYou will find it easier to read and use tags in your HTML code if you follow a few conventionsType tags using all caps Use hard returns to create shorter linesThese conventions do not affect how browsers display code, they just make it easier for you to read the HTMLImproving ReadabilityThe code below is identical (however, one of them is far easier to read):HTML Document Title HTML Document Body or HTML Document Title HTML Document Body Understanding AttributesSome tags work in conjunction with attributesAttributes provide additional information about an element, such asHow elements should alignWhat other files should be accessedThe color of an elementAll attributes go in the opening tag and are separated from other attributes and the tag itself by a spaceUnderstanding AttributesIf you want to center a heading in the browser window, start with your heading and tags: A heading goes hereAdd the ALIGN= attribute to the opening tag, like this: A centered heading goes hereUnderstanding AttributesIn HTML, the attributes can go in any order after the tagThe tag must always go firstYou can include multiple attributes in a tag by using one space between each attribute:A wildly formatted heading goes hereHTML ToolsTo create an HTML document, you need only two basic tools:An HTML editor, to create and save your HTML documentsA Web browser, to view and test your HTML documentsHTML EditorsIn general, HTML editors fall into two categories:Text- or code-based, which allow you to see the HTML code as you are creating documentsWYSIWYG (What You See Is What You Get), which show the results of code, similar to the way it will appear in a browser, as you are formatting your documentWeb BrowsersThe most common browsers are Mozilla Firefox and Microsoft Internet ExplorerAlthough a variety of browsers are available for virtually all computer platforms and online servicesBrowsers tend to display things a bit differentlyCREATING, SAVING, AND VIEWING HTML DOCUMENTSHow you start a new HTML document depends on which operating system and editor you are usingYou will find that starting a new HTML document is similar to starting other documents you have createdCREATING, SAVING, AND VIEWING HTML DOCUMENTSHere is the general process of creating an HTML document:Open a text editor (such as Notepad or SimpleText)Start a new document by choosing File, then select NewEnter the HTML code and text you want to includeSave your document with the extension .htm or .html by choosing File Save or File Save AsApplying Structure TagsAfter you create a new document, your first task is to include structure tagsStructure tags provide browsers with information about document characteristicsStructure tags identify the document as HTML, provide introductory information about the document, and include the titleApplying Structure TagsAll HTML documents should include four structure tags, nested and orderedThe TagsThe tags identify the document as an HTML documentTo use the tags, enter them in your document like this: The TagsThe tags contain information about the document, including its title, scripts used, style definitions, and document descriptionsTo use the tags, enter them between the tags, for example: The TagsThe tags are contained in the document titleThe title does not appear within the browser window, although it is usually visible in the browser's title bar A HTML Tutorial The TagsThe tags enclose all the tags, attributes, and information that you want a visitor's browser to displayTo use the tags, enter them below the closing tag and above the closing tag: A HTML Tutorial All the tags, attributes, and information in the document body go here. This is what the browser displays on the screen. Applying Style Tags And AttributesStyle tags tell the browser exactly how to present the labeled textThese elements constitute the basic HTML document components and, unlike the structure tags, do appear in the browser windowParagraphsOne of the most common tags you will use is the paragraph tag, , which is appropriate for regular body textHTML automatically adds an extra blank line before and after a paragraphTo use the paragraph tags, put them around the text you want to format as a paragraph, for example: A whole paragraph goes right here. Creating HeadingsHeadings break up large areas of text, announce topics to follow, and arrange information according to a logical hierarchyHTML provides six levels of headings: The largest The smallestCreating HeadingsCreating HeadingsBy default, all browsers align headings on the leftTo use the alignment attributes, include them in the initial heading tag, such as:Left-aligned Heading Centered HeadingRight-aligned HeadingCreating ListsLists are a great way to provide information in a structured, easy-to-read formatLists come in two varieties:Numbered (ordered)Bulleted (unordered)Creating ListsStart with text you want to format as a list:Lions Tigers Bears Oh, My!Insert the tags around the list text:Lions Tigers Bears Oh, My! Type the tag for each list item:Lions Tigers Bears Oh, My! Creating ListsCreating ListsApplying Bold, Italic, and Other EmphasesYou can apply formatting to individual letters and wordsFor example, you can make a word appear italic, bold, underlined, or superscript (as in e2)Example:This is the end of a paragraph that also uses boldface.This is the beginning of the following paragraph.Applying Bold, Italic, and Other EmphasesUsing Horizontal RulesHorizontal rules are lines that break up long sections of text, indicate a shift in information, or help improve the overall document designThe tag is a nonpaired tag; it has no ending tagTo use a horizontal rule, put the tag where you want the rule to appear:Long passages of text should often be broken into sections with headings and, optionally, horizontal rules.A Heading Also Breaks Up TextA new long passage can continue here.Using Horizontal RulesInserting Line BreaksYou can easily break paragraph lines by inserting the tag where you want the lines to break:There once was an HTML writer,Who tried to make paragraphs wider.She found with a shock All the tags did mockThe attempt to move that text outside.Inserting Line BreaksUSING FANCIER FORMATTINGMost newer browsers support effects, not all browsers do; your fancier effects might not reach all visitorsThe HTML specification discourages many of these effects in favor of Style SheetsYou might consider using Style Sheets instead of the tags and attributesAdding ColorsYou can add a background color and change the text colors to coordinate with the backgroundYou can highlight a word or two with color to make the words leap off the pageIf you are developing a corporate site, adhere to the company's color scheme to ensure a consistent lookAdding ColorsYou specify colors using hexadecimal numbers, which combine pro­portions of Red, Green, and Blue — called RGB numbersRGB numbers use six digits, two for each proportion of red, green, and blueNot all RGB numbers display well in browsers; some colors dither, meaning that they appear spotty or splotchySetting Background ColorsTo specify a background color for your documents, include the BGCOLOR= “#...” attribute in the opening tag, like this: tag, add the TEXT= attribute to set the color of text within the documentThe example presented here makes the text whiteUnless you change the background color you will not see the text, as the background default color is also white! Specifying Text ColorsAdd the LINK= attribute to set the link color:Add the VLINK= attribute to set the color for visited linksSet the ALINK= to specify the active link colorSpecifying Text ColorsSpecifying Fonts and Font SizesSpecify fonts and increase font sizes to improve readability with dark back­grounds and light colored textUse the tag to specify font characteristics for your document, including color, size, and typefaceSpecifying Fonts and Font SizesSelect a specific font using the FACE= attributeThis text is displayed using Verdana font face and the default browser’s font size.Change the font size using the SIZE= attributeYou set the size of text on a relative scale - from 1 to 7, with the default size being 3Either set the size absolutely (with a number from 1 to 7) or relatively (with + or-to change the size) Specifying Fonts and Font SizesAdd a COLOR= attribute to set the color, using a color name or a #RRGGBB valueThis text is displayed using Technical font face, a font size of +2, and a font color of green.Specifying Fonts and Font SizesCREATING HYPERLINKSA hyperlink is a bit of text or a graphic that you can click toMove to a different location on the pageOpen a different Web pageStart an e-mail messageDownload a fileView a movieListen to a sound clipActivate a Web-based programHyperlinking to a Web PageNo matter what type of hyperlink you want to create, the basic syntax is the sameIt starts with the tag, and then uses an HREF= argument that provides the URL or the path to the destinationExample: University of DenverHyperlinking to a Web PageHyperlinking to an E-Mail AddressTo create a hyperlink to an e-mail address, use the same HREF= argument as before, but instead of a Web address, type MAILTO: followed by the e-mail address, like this:Contact MeOr Contact MeHyperlinkingHyperlinking to Other ContentA hyperlink can reference any file, not just a Web documentYou can take advantage of this to link to other content such asMicrosoft Office documentsCompressed archive files such as .zip filesExecutable program files such as setup utilitiesHyperlinking to Other ContentDISPLAYING GRAPHICSWeb pages are more interesting and attractive when they include graphicsIn a word-processing program such as Microsoft Word, graphics are embedded in the documentIn HTML each graphic displayed on a Web page is stored in a separate file, which must be stored on a Web serverInserting GraphicsInserting a graphic on a Web page is as simple as placing an tag where you want the graphic to appear, like this: When a file is stored in the same folder as the HTML document in which it is referenced, you can refer to the file name only, without any location informationInserting GraphicsIf you want to store your graphics in a subfolder of the folder containing the text files (to organize your files more tidily), you must refer to the graphic with the subfolder name, such as: Inserting GraphicsBy default, unless you place the image within a block-level tag such as a paragraph or heading, the image blocks off all the space horizontallyTo force the image to the left or right side of the screen and wrap surrounding text around the image, apply an ALIGN attribute rule that uses a left, right, or center argument: Inserting GraphicsSUMMARYSummary of the tags used is the plug-in:SUMMARY

Các file đính kèm theo tài liệu này:

  • pptchap010_4645.ppt
Tài liệu liên quan