HTML 2 DOCUMENT STRUCTURE

Similar documents
استاد: امیر عسگری چناقلو ترم دوم درس طراحی صفحات وب

13.8 How to specify alternate text

XML 2 APPLICATION. Chapter SYS-ED/ COMPUTER EDUCATION TECHNIQUES, INC.

HTML Hyperlinks (Links)

XML 2 APPLICATION. Chapter SYS-ED/ COMPUTER EDUCATION TECHNIQUES, INC.

Web Development & Design Foundations with XHTML. Chapter 2 Key Concepts

Unit 5 Web Publishing Systems Page 1 of 13 Part 4 HTML Part 4

Metadata in HTML ... EXAM OBJEGIVES. .. Metadata and document identification.. Adding metadata to Web pages.. Metadata and indexing

introduction to XHTML

Basics of Web Design, 3 rd Edition Instructor Materials Chapter 2 Test Bank

Chapter 1 Getting Started with HTML 5 1. Chapter 2 Introduction to New Elements in HTML 5 21

Chapter 2:- Introduction to XHTML. Compiled By:- Sanjay Patel Assistant Professor, SVBIT.

CSI 3140 WWW Structures, Techniques and Standards. Markup Languages: XHTML 1.0

Seminar on Web Design

Markup Language. Made up of elements Elements create a document tree

CHAPTER 2 MARKUP LANGUAGES: XHTML 1.0

HTML Overview. With an emphasis on XHTML

Chapter 10: Understanding the Standards

HTML5 & CSS 8 th Edition. Chapter 2 Building a Webpage Template with HTML5

Introduction to HTML5

Creating Web Pages with SeaMonkey Composer

Developing a Basic Web Page

GETTING STARTED IN FRONTPAGE 2000 SETTING THE BACKGROUND

FileNET Guide for AHC PageMasters

IMY 110 Theme 11 HTML Frames

FileNET Guide for AHC PageMasters

Web Development & Design Foundations with HTML5 & CSS3 Instructor Materials Chapter 2 Test Bank

IU Kokomo Career and Accessibility Center

Understanding structure Learning about markup Tags and elements. Structure COPYRIGHTED MATERIAL

XHTML & CSS CASCADING STYLE SHEETS

(1) I (2) S (3) P allow subscribers to connect to the (4) often provide basic services such as (5) (6)

CSS: The Basics CISC 282 September 20, 2014

Creating a Web Presentation

Introduction, Notepad++, File Structure, 9 Tags, Hyperlinks 1

PROGRAMMING 2 BASICS. Chapter SYS-ED/ COMPUTER EDUCATION TECHNIQUES, INC.

HTML OBJECTIVES WHAT IS HTML? BY FAITH BRENNER AN INTRODUCTION

Tutorial 1: HTML Tutorial (Windows Version) HTML (Hypertext Markup Language) Basics Objectives

Wolf. Responsive Website Designer. Mac Edition User Guide

What is XHTML? XHTML is the language used to create and organize a web page:

Chapter 2 Creating and Editing a Web Page

HOW TO DOWNLOAD, INSTALL, and USE HTMLDOC v FOR WINDOWS

Web Development and Design Foundations with HTML5 8th Edition

Make a Website. A complex guide to building a website through continuing the fundamentals of HTML & CSS. Created by Michael Parekh 1

c122jan2714.notebook January 27, 2014

COMS 359: Interactive Media

PBwiki Basics Website:

CS144 Notes: Web Standards

Dreamweaver Basics. Planning your website Organize site structure Plan site design & navigation Gather your assets

California Open Online Library for Education & Accessibility

Web Site Documentation Eugene School District 4J

Announcements. 1. Class webpage: Have you been reading the announcements? Lecture slides and coding examples will be posted

California Open Online Library for Education & Accessibility

Lava New Media s CMS. Documentation Page 1

Using Word 2016: A Quick Guide

Dashboards. Overview. Overview, page 1 Dashboard Actions, page 2 Add Widgets to Dashboard, page 4 Run a Report from the Dashboard, page 6

MODULE 2 HTML 5 FUNDAMENTALS. HyperText. > Douglas Engelbart ( )

Lesson 5 Introduction to Cascading Style Sheets

California Open Online Library for Education & Accessibility

History of the Internet. The Internet - A Huge Virtual Network. Global Information Infrastructure. Client Server Network Connectivity

INTRODUCTION 1 AND REVIEW

Background of HTML and the Internet

Part 1: HTML Language HyperText Make-up Language

Converting HTML to PDF author debbiet

Motivation (WWW) Markup Languages (defined). 7/15/2012. CISC1600-SummerII2012-Raphael-lec2 1. Agenda

Interview Question & Answers

HTML and CSS: An Introduction

COPYRIGHTED MATERIAL. The Basics of HTML. What Is the World Wide Web?

Web Content. Overview. Web Content Mini WYSIWYG Editor

HTML&CSS. design and build websites

Creating a Website: Advanced Dreamweaver

California Open Online Library for Education & Accessibility

California Open Online Library for Education & Accessibility

Chapter 1 Self Test. LATIHAN BAB 1. tjetjeprb{at}gmail{dot}com. webdesign/favorites.html :// / / / that houses that information. structure?

Styles, Style Sheets, the Box Model and Liquid Layout

Quick Access Toolbar. You click on it to see these options: New, Open, Save, Save As, Print, Prepare, Send, Publish and Close.

Creating Accessible Word Documents Tutorial

Skill Area 323: Design and Develop Website. Multimedia and Web Design (MWD)

Tutorial 2 - HTML basics

California Open Online Library for Education & Accessibility

Index. alt, 38, 57 class, 86, 88, 101, 107 href, 24, 51, 57 id, 86 88, 98 overview, 37. src, 37, 57. backend, WordPress, 146, 148

Introduction to WEB PROGRAMMING

End User Guide Faculty Folders

Web Design and Development ACS Chapter 3. Document Setup

DRAFT. Table of Contents About this manual... ix About CuteSITE Builder... ix. Getting Started... 1

Objectives. Introduction to HTML. Objectives. Objectives

LETTER BUILDER. Letter Builder. For RiskMan Version Last reviewed 24 Jun Copyright 2017 Page RiskMan 1 of International 17 Pty Ltd

Creating Web Pages Using Netscape Composer AGENDA FOR THIS WORKSHOP. 1. How does it all work? 2. What do I need to get started at Fairfield?

Introduction to. Name: Class: ~ 1 ~

Introduction to FrontPage 2002

Beginning Web Site Design

Basic HTML Lecture 14

Announcements. 1. Class webpage: Have you been reading the announcements? Lecture slides and coding examples will be posted

Basic Internet Skills

UNIT I. A protocol is a precise set of rules defining how components communicate, the format of addresses, how data is split into packets

HTML: The Basics & Block Elements

Creating and Editing a Web Page Using Inline Styles

Creating A Web Page. Computer Concepts I and II. Sue Norris

FIT 100 LAB Activity 3: Constructing HTML Documents

COMP519 Web Programming Lecture 3: HTML (HTLM5 Elements: Part 1) Handouts

COOL4Ed ACCESSIBILITY CHECKPOINTS METHODS FOR WORD FORMATS (ASSISTIVE TECHNOLOGIES)

Transcription:

HTML DOUMENT STRUTURE hapter SYS-ED/ OMPUTER EDUATION TEHNIQUES, IN.

Objectives You will learn: The parts of a HTML document. Document tags: <HTML> Tag, Tag, <TITLE> Tag, and <BASE> tag. The role and function of meta data and how to apply the <META> tag. META and search engines. Document body tags: <BODY> Tag, <BASEFONT> Tag, and <ADDRESS> tag. SYS-ED \OMPUTER EDUATION TEHNIQUES, IN. (HTML Web Auth - 0.) h : Page i

An HTML document is composed of three parts: Parts of Document A line containing HTML version information. A declarative header section, which delimited by the HEAD tag. A body, which contains the document's actual content. The body can be implemented by the BODY tag or the FRAMESET tag. A Simple HTML Document 7 8 9 0 <!DOTYPE HTML PUBLI "-//W//DTD HTML.0//EN" "http://www.w.org/tr/re-html0/strict.dtd"> <HTML> <TITLE>My first HTML document</title> </HEAD> <BODY> <P>Hello world! </BODY> </HTML>. oding Style White space--such as spaces, newlines, tabs, and comments--may appear before or after each section. Sections should be delimited by the HTML tag. Although indentation is not required, HTML authors should use spacing and indentation for clarity. omments should be used for inline documentation. SYS-ED \OMPUTER EDUATION TEHNIQUES, IN. (HTML Web Auth - 0.) h : Page

. HTML Version Information A valid HTML document declares the version of HTML to be used in the document. The document type declaration names the document type definition (DTD) in use for the document. HTML specifies three DTDs, so authors must include one of the following document type declarations in their documents. The DTDs vary in the tags they support.. The HTML.0 Strict DTD includes all tags and attributes that have not been deprecated or do not appear in frameset documents. For documents with this DTD, use this document type declaration: <!DOTYPE HTML PUBLI "-//W//DTD HTML.0//EN" "http://www.w.org/tr/re-html0/strict.dtd">. The HTML.0 Transitional DTD includes everything in the strict DTD plus deprecated tags and attributes, most of which concern visual presentation. For documents with this DTD, use this document type declaration: <!DOTYPE HTML PUBLI "-//W//DTD HTML.0 Transitional//EN" "http://www.w.org/tr/re-html0/loose.dtd">. The HTML.0 Frameset DTD includes everything in the transitional DTD plus frames as well. For documents with this DTD, use this document type declaration: <!DOTYPE HTML PUBLI "-//W//DTD HTML.0 Frameset//EN" "http://www.w.org/tr/re-html0/frameset.dtd"> SYS-ED \OMPUTER EDUATION TEHNIQUES, IN. (HTML Web Auth - 0.) h : Page

<HTML> Tag The <HTML> tag denotes the file as an HTML document. <HTML>...</HTML> This tag has no attributes. 7 8 9 0 <HTML> <TITLE>... </TITLE> </HEAD> <BODY> <P>This is an HTML document. </BODY> </HTML> SYS-ED \OMPUTER EDUATION TEHNIQUES, IN. (HTML Web Auth - 0.) h : Page

The Document Head. Tag The HEAD tag contains information about the current document, such as its title, keywords that may be useful to search engines, and other data that is not considered document content. User agents do not generally render tags that appear in the HEAD as content. They may, however, make information in the HEAD available to users through other mechanisms. The end tag is not required. <TITLE>A Simple Document</TITLE> </HEAD>. <TITLE> Tag Every HTML document should have a TITLE tag in the HEAD section. Authors should use the TITLE tag to identify the contents of a document. Since users often consult documents out of context, authors should provide context-rich titles. Thus, instead of a title such as "Introduction", which doesn't provide much contextual background, authors should supply a title such as "Introduction to Medieval Bee-Keeping" instead. This tag is valid only within the HEAD tag. The end tag is required. <TITLE>...</TITLE> SYS-ED \OMPUTER EDUATION TEHNIQUES, IN. (HTML Web Auth - 0.) h : Page

7 8 9 0 <!DOTYPE HTML PUBLI "-//W//DTD HTML.0//EN" "http://www.w.org/tr/re-html0/strict.dtd"> <HTML> <TITLE>A study of population dynamics</title>... other head tags... </HEAD> <BODY>... document body... </BODY> </HTML> For reasons of accessibility, user agents must always make the content of the TITLE tag available to users, including TITLE tags that occur in frames. Titles may contain character entities (for accented characters, special characters, etc.), but no other markups are allowed.. The title Attribute The title attribute contains advisory information about the tag for which it is set. Unlike the TITLE tag, which provides information about an entire document and may only appear once, the title attribute may annotate any number of tags. Values of the title attribute may be rendered by user agents in a variety of ways. For instance, visual browsers frequently display the title as a "tool tip". A tool tip is a short message that appears when the pointing device pauses over an object....some text... Here's a photo of <A href="http://someplace.com/neatstuff.gif" title="me scuba diving"> me scuba diving last summer </A>...some more text.... <BASE> Tag The BASE tag must appear in the HEAD section of an HTML document before any tag referencing an external source. The path information specified by the BASE tag only affects URLs in the document where the tag appears. SYS-ED \OMPUTER EDUATION TEHNIQUES, IN. (HTML Web Auth - 0.) h : Page

<BASE HREF=url TARGET=window> Attribute HREF=url TARGET=window Purpose Specifies the document's full URL in case the document gets read out of context and the reader wants to refer to the original. Specifies to load all of the links on the page into the targeted window. This can be overridden by specifying a different target attribute for a specific link. Specifies to load the link into the targeted window. The window must begin with an alpha-numeric character to be valid, except for the folllowing four target windows. _blank _parent _self _top Specifies to load the link into a new blank window. This window is not named. Specifies to load the link into the immediate parent of the document the link is in. Specifies to load the link into the same window the link was clicked in. Specifies to load the link into the full body of the window. Examples: <BASE HREF="http:// www.sample.com/hello.htm"> <BASE HREF="http:// www.sample.com/hello.htm" TARGET="viewer"> SYS-ED \OMPUTER EDUATION TEHNIQUES, IN. (HTML Web Auth - 0.) h : Page

Meta Data Meta data provides a form in which authors can specify information about a document rather than document content - in a variety of ways. To specify the author of a document, use the META tag as follows: <META name="location" content="new York"> The META tag specifies a property (ie. "Location") and assigns a value to it (ie. "New York"). This specification does not define a set of legal meta data properties. The meaning of a property and the set of legal values for that property should be defined in a reference lexicon called a profile. For example, a profile designed to help search engines index documents might define properties such as "author", "copyright", "keywords", etc.. <META> Tag Meta tag is a general purpose tag typically used to store application-specific information in a HTML document. <META attributes> Attribute HTTP-EQUIV="REFRESH" ONTENT="n; URL=url" Purpose auses a document to be automatically reloaded on a regular basis, specified in seconds. Tells the browser to reload in n seconds. If URL=url is specified, the browser will load the URL after the time specified has elapsed. If no URL is specified, it will reload the current document. SYS-ED \OMPUTER EDUATION TEHNIQUES, IN. (HTML Web Auth - 0.) h : Page 7

. META and HTTP Headers The http-equiv attribute can be used in place of the name attribute and has a special significance when documents are retrieved via the Hypertext Transfer Protocol. HTTP servers can use the property name specified by the http-equiv attribute to create a style header in the HTTP response. Sample META Declaration <META http-equiv="expires" content="tue, 0 Aug 99 ::7 GMT"> will result in the HTTP header: Expires: Tue, 0 Aug 99 ::7 GMT This can be used by caches to determine when to fetch a fresh copy of the associated document. Some user agents support the use of META to refresh the current page after a specified number of seconds, with the option of replacing it with a different URL. <META http-equiv="refresh" content=",http://www.acme.com/intro.html"> The content is a number specifying the delay in seconds, followed by the URL to load when the time is up. This mechanism is generally used to show users a fleeting introductory page. However, since some user agents do not support this mechanism, authors should include content on the introductory page to allow users to navigate away from it.. META and Search Engines META is typically used to specify keywords that a search engine can use for improving the quality of search results. When several META tags provide language-dependent information about a document, search engines may filter on the lang attribute to display search results using the language preferences of the user. SYS-ED \OMPUTER EDUATION TEHNIQUES, IN. (HTML Web Auth - 0.) h : Page 8

<-- For speakers of US English --> <META name="keywords" lang="en-us" content="vacation, Greece, sunshine"> <-- For speakers of British English --> <META name="keywords" lang="en" content="holiday, Greece, sunshine"> The effectiveness of search engines can also be increased by using the LINK tag to specify: Links to translations of the document in other languages. Links to versions of the document in other media (e.g., PDF). When the document is part of a collection, links to an appropriate starting point for browsing the collection. Examples: 7 8 9 0 7 8 9 0 <HTML> <META HTTP-EQUIV="REFRESH" ONTENT=> <TITLE>Reload Document</TITLE> </HEAD> <BODY> <P>This document will be reloaded every two seconds. </BODY> </HTML> <HTML> <META HTTP-EQUIV="REFRESH" ONTENT="; URL=http://www.sample.com/next.htm"> <TITLE>Load Next Document</TITLE> </HEAD> <BODY> <P>After five seconds have elapsed, the document "http://www.sample.com/next.htm" will be loaded. </BODY> </HTML> SYS-ED \OMPUTER EDUATION TEHNIQUES, IN. (HTML Web Auth - 0.) h : Page 9

The Document Body The body of a document contains the document's content. The content may be presented by a user agent in a variety of ways. For example, for visual browsers, the body can be thought of as a canvas where the content appears: text, images, colors, graphics, etc.. <BODY> Tag The <BODY>Tag specifies the beginning and end of the document body. It also allows the background image, the background color, the link colors, and the top and left margins of the page to be set. <BODY BAKGROUND=url BGPROPERTIES=FIXED BGOLOR=color TEXT=color LINK=color VLINK=color> Attribute BAKGROUND=url BGOLOR=color BGPROPERTIES=FIXED LEFTMARGIN=n LINK=color TEXT=color TOPMARGIN=n VLINK=color or colorname Purpose Specifies a background picture. The picture is tiled behind the text and graphics on the page. Sets the background color of the page. The color can be either a hexadecimal, red-green-blue color value or a predefined color name. Specifies a watermark, which is a background picture that does not scroll. Specifies the left margin for the entire body of the page and overrides the default margin. Set to "0", the left margin will be exactly on the left edge. Sets the color of hyperlinks that have not yet been visited. The color can be either a hexadecimal, red-green-blue color value or a predefined color name. Sets the color of text on the page. The color can be either a hexadecimal, red-green-blue color value or a predefined color name. Specifies the margin for the top of the page and overrides the default margin. Set to "0" the top margin will be on the precise top edge. Sets color of hyperlinks that have already been visited. The color can be either a hexadecimal, red-green-blue color value or a predefined color name. SYS-ED \OMPUTER EDUATION TEHNIQUES, IN. (HTML Web Auth - 0.) h : Page 0

Examples: 7 8 9 0 <BODY BAKGROUND="/ie/images/watermrk.gif" BGPROPERTIES=FIXED BGOLOR=#FFFFFF TEXT=#000000 LINK=#ff00 VLINK=#0099> <HTML> <TITLE>My First Webpage</TITLE> </HEAD> <BODY> Here's a Web page! </BODY> </HTML> Documents that contain framesets replace the BODY tag by the FRAMESET tag.. <BASEFONT> Tag The BASEFONT tag sets the base font size using the size attribute. Font size changes achieved with FONT are relative to the base font size set by BASEFONT. If BASEFONT is not used, the default base font size is. The base font size does not apply to headings, except where these are modified using the FONT tag with a relative font size change. <BASEFONT SIZE=n> Attribute SIZE=n Purpose Sets the base font size. The n can be between and 7 inclusive; default is ; 7 is largest. Throughout the document, relative font size settings (e.g. <FONT SIZE=+>) are set according to this. <BASEFONT SIZE=> This sets the base font size to. <FONT SIZE=+> Now the font size is 7. <FONT SIZE=-> Now the font size is. SYS-ED \OMPUTER EDUATION TEHNIQUES, IN. (HTML Web Auth - 0.) h : Page

<ADDRESS> Tag The ADDRESS tag may be used by authors to supply contact information for a document or a major part of a document such as a form. This tag typically is used at the bottom of a document. Text is displayed in italics. <ADDRESS>...</ADDRESS> <ADDRESS> SYS-ED 9 W th Street New York, NY 000 www.sysed.com </ADDRESS> SYS-ED \OMPUTER EDUATION TEHNIQUES, IN. (HTML Web Auth - 0.) h : Page