</HTML> </HEAD> </BODY> </TITLE> </I> </B> </U> </BLINK> </EM> </FONT> </FONT> </CENTER> </H1> </H2> </H3> </P> </BR> --!>

Similar documents
A HTML document has two sections 1) HEAD section and 2) BODY section A HTML file is saved with.html or.htm extension

CSC 121 Computers and Scientific Thinking

recall: a Web page is a text document that contains additional formatting information in the HyperText Markup Language (HTML)

5/17/2009. Marking Up with HTML. An HTML Web Page File. Tags for Bold, Italic, and underline. Structuring Documents

A Balanced Introduction to Computer Science, 3/E

CSE 3. Marking Up with HTML. Comics Updates Shortcut(s)/Tip(s) of the Day Google Earth/Google Maps ssh Anti-Spyware

1. The basic building block of an HTML document is called a(n) a. tag. b. element. c. attribute. d. container. Answer: b Page 5

Html basics Course Outline

Chapter 4: Marking Up With HTML: A Hypertext tmarkup Language Primer

HTML Summary. All of the following are containers. Structure. Italics Bold. Line Break. Horizontal Rule. Non-break (hard) space.

Introduction to HTML. SSE 3200 Web-based Services. Michigan Technological University Nilufer Onder

Chapter 4. Introduction to XHTML: Part 1

Marking Up with HTML. Tags for Bold, Italic, and underline. An HTML Web Page File. Chapter 4: Marking Up With HTML: A. Formatting with Tags:

HTML Hints & Tips. HTML is short for HyperText Markup Language.

Working with HTML. must appear at the very beginning of your webpage. starts the first section of your page

A Brief Introduction to HTML

(Refer Slide Time: 01:41) (Refer Slide Time: 01:42)

MMGD0204 Web Application Technologies. Chapter 3 HTML - TEXT FORMATTING

This booklet is knowledge of. a web page. of a web page find what you. you want to. SiteSell offers. Introduction

I-5 Internet Applications

Text and Layout. Digital Multimedia, 2nd edition Nigel Chapman & Jenny Chapman Chapter 11. This presentation 2004, MacAvon Media Productions

Shatin Tsung Tsin Secondary School S.3 Computer and Technology Web Page Design by HTML Introduction to HTML

Cascading Style Sheet Quick Reference

HTML TAG SUMMARY HTML REFERENCE 18 TAG/ATTRIBUTE DESCRIPTION PAGE REFERENCES TAG/ATTRIBUTE DESCRIPTION PAGE REFERENCES MOST TAGS

Chapter 4 A Hypertext Markup Language Primer

Class 7. Choose the correct answer:

Chapter 2 Creating and Editing a Web Page

COMPUTER APPLICATIONS IN BUSINESS FYBMS SEM II

ICT IGCSE Practical Revision Presentation Web Authoring

Solutions. 9. Which is the first version of HTML? a. HTML 1.0 b. HTML 5 c. HTML 2.0 d. HTML 3.0

3.1 Introduction. 3.2 Levels of Style Sheets. - HTML is primarily concerned with content, rather than style. - There are three levels of style sheets

ICT IGCSE Practical Revision Presentation Web Authoring

Appendix D CSS Properties and Values

As we design and build out our HTML pages, there are some basics that we may follow for each page, site, and application.

Downloads: Google Chrome Browser (Free) - Adobe Brackets (Free) -

Management Information Systems

- HTML is primarily concerned with content, rather than style. - However, tags have presentation properties, for which browsers have default values

CMPT 165 INTRODUCTION TO THE INTERNET AND THE WORLD WIDE WEB

The building block of a CSS stylesheet. A rule consists of a selector and a declaration block (one or more declarations).

UNIT II Dynamic HTML and web designing

11. HTML5 and Future Web Application

HTML TUTORIAL ONE. Understanding What XHTML is Not

Reading 2.2 Cascading Style Sheets

HTML OBJECTIVES WHAT IS HTML? BY FAITH BRENNER AN INTRODUCTION

Using Dreamweaver 2 HTML

CSC Web Programming. Introduction to HTML

HTML. Hypertext Markup Language. Code used to create web pages

- The CSS1 specification was developed in CSSs provide the means to control and change presentation of HTML documents

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?

Adding CSS to your HTML

<body bgcolor=" " fgcolor=" " link=" " vlink=" " alink=" "> These body attributes have now been deprecated, and should not be used in XHTML.

LING 408/508: Computational Techniques for Linguists. Lecture 14

Hyper Text Markup Language HTML: A Tutorial

CSS: The Basics CISC 282 September 20, 2014

Part 1: HTML Language HyperText Make-up Language

Using Dreamweaver CS6

What You Will Learn Today

Creating Web Pages. Getting Started

HTML. LBSC 690: Jordan Boyd-Graber. October 1, LBSC 690: Jordan Boyd-Graber () HTML October 1, / 29

ITL Public School Mid Term examination ( )

Web Page Creation Part I. CS27101 Introduction to Web Interface Design Prof. Angela Guercio

Computer Programming. Dr. Deepak B Phatak Dr. Supratik Chakraborty Department of Computer Science and Engineering IIT Bombay

FRONTPAGE STEP BY STEP GUIDE

Data Representation From 0s and 1s to images CPSC 101

<! - - S T W i n g - - > Minicourses. HTML Basics. October 1, 2005 Armand O'Donnell Electrical Engineering '07

HTML Tags <A></A> <A HREF=" CNN </A> HREF

HTML Images - The <img> Tag and the Src Attribute

HTML/XML. HTML Continued Introduction to CSS

request HTML Document send HTML Document

Announcements. Paper due this Wednesday

HTML BEGINNING TAGS. HTML Structure <html> <head> <title> </title> </head> <body> Web page content </body> </html>

APPENDIX THE TOOLBAR. File Functions

In this project, you ll learn how to create a webpage for your favourite recipe.

HTML = hyper text markup language

Desire2Learn: HTML Basics

Lesson: 6 Database and DBMS an Introduction. Lesson: 7 HTML Advance and features. Types of Questions

This document provides a concise, introductory lesson in HTML formatting.

Creating A Website - Part 1: Web Design principles, HTML & CSS. CSS Color Values. Hexadecimal Colors. RGB Color

How the Internet Works

introduction to XHTML

Programmazione Web a.a. 2017/2018 HTML5

CS 103, Fall 2008 Midterm 1 Prof. Nakayama

The City School. Prep Section. ICTech. 2 nd Term. PAF Chapter. Class 8. Worksheets for Intervention Classes

The City School. Prep Section. ICTech. 2 nd Term. PAF Chapter. Class 7. Worksheets for Intervention Classes

Learning Objectives. Review html Learn to write a basic webpage in html Understand what the basic building blocks of html are

EDITOR GUIDE. Button Functions:...2 Inserting Text...4 Inserting Pictures...4 Inserting Tables...8 Inserting Styles...9

CS 1124 Media computation. Lab 9.3 October 24, 2008 Steve Harrison

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

CSCE 101. Creating Web Pages with HTML5 Applying style with CSS

ITNP43: HTML Lecture 4

Advanced Web Programming C2. Basic Web Technologies

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

CMPT 165: More CSS Basics

Web Development & Design Foundations with HTML5

Introduction to using HTML to design webpages

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

INFS 2150 / 7150 Intro to Web Development / HTML Programming

Web Development & Design Foundations with HTML5

COSC 2206 Internet Tools. CSS Cascading Style Sheets

Session 3.1 Objectives Review the history and concepts of CSS Explore inline styles, embedded styles, and external style sheets Understand style

Transcription:

HTML - hypertext mark-up language HTML is a standard hypertext language for the WWW and has several different versions. Most WWW browsers support HTML 2 and most of new versions of the browsers support HTML3. WWW pages are created and edited with a text editor, a word processor or, as is becoming more common, within the WWW browser. HTML tags contain special formatting commands and are contained within a less than (<) and a greater than(>) symbol(which are also known as angled brackets). Most tags have an opening and closing version; for example, to highlight bold text the bold opening tag is (B) and the closing tag is (/B). Table 1 outlines a few examples. Table 1 Open tag Closing tag Description <BODY> <TITLE> <I> <B> <U> <BLINK> <EM> <FONT SIZE=+1> <FONT SIZE=-1> <CENTER> <H1> <H2> <H3> <P> <BR> <! </TITLE> </I> </B> </U> </BLINK> </EM> </FONT> </FONT> </CENTER> </H1> </H2> </H3> </P> </BR> --!> Start and end of HTML Defines the HTML header Defines the main body of the HTML Defines the HTML header Italic text Bold text Underlined text Make text blink Emphasise text Increase font size by one increment Reduce font size by one increment Centre text Section header, level 1 Section header, level 2 Section header, level 3 Create a new paragraph Create a line break Comments 54

<TT> <OL>,<UL> <LI> <SUPER> <SUB> </TT> </OL>,</UL> </LI> </SUPER> </SUB> Teletype (monospaced font) Ordered and unordered lists List Superscript Subscript HTML script below (left table) gives an example script and right table shows output from the WWW browser. The first line is always and the last line is. After this line the HTML header is defined between and. The title of the window in this case is My first HTML page. The main HTML text is then defined between <BODY> and. <TITLE> My HTML page </TITLE> <BODY> <H1> This is section 1</H1> This is the <b>text</b> for section 1 <H1> This is section 2</H1> This is the <i>text</i> for section 2 <H1> This is section 3</H3> This is the <u>text</u> for section 3 <p> This is the end of the text The WWW browser fits text into the window size and does not interpret line breaks in the HTML source. To force a new line the <BR> (line break) or a new paragraph (<P>) is used. The example also shows bold, italic and underlined text. 55

Links The topology of the WWW is set-up using links where pages link to other related pages. A reference takes the form: <A HREF= URL >Reference Name</A>. See example. Where url defines the URL (uniform resource locator) for the file, Reference Name is the name of the reference and </A> defines the end of the reference name. <TITLE> My page </TITLE> <BODY BGCOLOR= #CCFFFF > <H1> This is Tomsk polytechnic university site </H1> If you want to access information about university<a HREF= http://tpu.ru/ >click here</a> 56 Figure 2

HTML script above (Figure 2 ) shows an example of the uses of referenced and Figure 2 shows a sample browser page. The background colour is set using <BODY BGCOLOR= #CCFFFF > which sets the background colour to white. In this case the default text colour is black and the link is coloured blue. Lists HTML allows ordered and unordered lists, which can be declared anywhere in the body of the HTML file. Ordered lists To start of an ordered list is defined with <OL> and the end of the list by </OL>. Each part of the list is defined after the <LI> tag. Unordered lists are defined between the <UL> and</ul>tags. HTML script below (left table) gives examples of an ordered and an unordered list. Figure 3 shows the output from the browser. <TITLE> My page </TITLE> <BODY BGCOLOR= #CCFFFF > <H1>List 1</H1> <OL> <!-- Ordered List --!> <LI> Part 1 <LI> Part 2 <LI> Part 3 </OL> <H1>List 2</H1> <UL> <!-- Unordered List --!> <LI> Section 1 <LI> Section 2 <LI> Section 3 </UL> Figure 3 57

Some browsers allow the type of numbered list to be defined with <OL TYPE =x>, where X can either be: A for capital letters(such as A, B,C, and so on). a for small letters(such as a, b, c, and so on). I for capital roman letters(such as I, II, III, and so on ). i for small letters(such as i, ii, iii, an so on). I for numbers(which is the default). For example: <TITLE> My page </TITLE> <BODY BGCOLOR= #CCFFFF > <H1>List 1</H1> <OL TIPE=A> <LI> Part 1 <LI> Part 2 <LI> Part 3 </OL> <OL TIPE=I> <LI> Part 1 <LI> Part 2 <LI> Part 3 </OL> Unordered lists Unordered lists are used to list a series of items in no particular order. They are defined between the <UL> and </UL> tags. Some browsers allow the type of bullet point to be defined with the <LT TYPE = shape>, where shape can either be : Disc for round solid bullets (which is the default for first level lists). Round for round hollow bullets( which is the default for second level lists). 58

Square for square bullets(which is the default for third). HTML script Figure 4 gives an example of an unnumbered list and Figure 4 (right table) shows the WWW page output for this script. It can be seen from this that the default bullets for level 1 lists are discs, for level 2 they are round and for level 3 they are square. <TITLE> Example list </TITLE> <BODY BGCOLOR= #CCFFFF > <H1> Introduction</H1> <UL> <LI> OSI Model <LI> Network <UL> <LL> Ethernet <UL> <LI> MAC addresses </UL> <LI> Token Ring <LI> FDDI </UL> <LI> Conclusion> </UL> <H1> Wide Area Network </H1> <UL> <LI> Standards <LI> Examples <UL> <LI> EastMan </UL> <LI> Conclusion> </UL> 8.3.3 Definition lists Figure 4 HTML uses the <DL> and </DL> tags for definition lists, which are normally used when building glossaries. Each entry in the definition is defined by the <DT> tag and the text associated with the item is defined after the <DD> tag. The end of the 59

list is defined by </DL>. HTML script Figure 5 shows an example with a definition lst and Figure 5 (right table) gives a sample output. Note that it uses the <EM> tag to emphasise the definition subject. <TITLE> Example list </TITLE> <BODY BGCOLOR= #CCFFFF > <H1> Glossary </H1> <DL> <DT> <EM> Address Resolution Protocol (ARP) </EM> <DD>A TCP/IP process which maps an IP address to an Ethernet address <DT> <EM>American National Standards Institute (ANSI) </EM> <DD> ANSI is a non-profit organization which is made up of expert committees that publish standards for national industries. <DT><EM> American Standard Code for Information Interchange (ASCII)</EM> <DD>An ANSI-defined character alphabet which has since been adopted as a standard international alphabet for the interchange of characters. </DL> 8.4 Colours Figure 5 Colours in HTML are defined in the RGB (red/ green / blue)strength. The format is #rrggbb, where rr is the hexadecimal equivalent for the red component, gg the hexadecimal equivalent for the green component and bb the hexadecimal equivalent for the blue component. Figure 6 lists some of the codes for certain colours. Colour Code White Light red Yellow Dark Green Dark Blue Pink Dark grey Light grey #FFFFFF #DC640D #FCE503 #088343 #0D3981 #F3D7E3 #777777 #D4D4D4 Figure 6 60

Colour Dark red Orange Light Green Light Blue Purple Nearly Black Grey Black Code #C91F16 #F1A60A #BED20F #009DBE #3A0B59 #434343 #A7A7A7 #000000 Figure 6 (continuation) Individual hexadecimal numbers use base 16 and range from 0 to F (in decimal this ranges from 0 to 15). A two-digit hexadecimal number ranges from 00 to FF (in decimal this ranges form 0 to 255). Table 2 outlines hexadecimal equivalents. HTML uses percentage strengths for the colours. For example, FF represents full strength (100%) and 00 represents no strength (0%). Thus, white is made form FF(red), FF(green) and FF(blue) and black is made from 00(red), 00(green) and 00(blue). Grey is made from equal weighting of each of the colours, such as 43, 43, 43, for dark grey (#434343) and D4, D4 and D4 for light grey (#D4D4D4). Thus, pure red with be #FF0000, pure green will be #00FF00 and pure blue will be #0000FF. Each colour is represented by eight bits, thus the colour is defined by 24 bits.this gives a total of 16777216 colours (2 24 different colours). Note that some video displays will not have enough memory to display 16.777million colours in a certain mode so that colours may differ depending on the WWW browser and the graphic adapter. The colours of the background, text and the link can be defined with the <BODY> tag. An example with a background colour of white, a text colour of orange and a link colour of dark red is: <BODY BGCOLOR= #FFFFFF TEXT = #F1A60A LINK= #C91F16 > And for a background colour of red, a text colour of green and a link colour of blue: 61

<BODY BGCOLOR = #FF0000 TEXT = #00FF00 LINK= #0000FF > When a link has been visited its colour changes. This colour itself can be changed with VLINK. For example, to set-up a visited link colour of yellow: <BODY VLINK= #FCE503 TEXT = 00FF00 LINK= #0000FF > Note that the default link colours are: Link: #0000FF (Blue) Visited link: #FF00FF (Purple) Table 2 Hex. Dec. Hex. Dec. Hex. Dec. Hex. Dec. 0 4 8 C 0 4 8 12 8.5 Background images 1 5 9 D 1 5 9 13 Images (such as GIF and JPEG) can be used as a background to a WWW page. For this purpose the option BACKGROUNF = src.gif is added to the <BODY> tag. An HTML script with a background of CLOUDS.GIF is given in HTML script Figure 7. A sample output from a browser is shown in Figure 7 (right table) <TITLE> My page</title> <BODY BACKGROUND="bee.jpg"> <H1> My page </H1> If you want to access information about me <A HREF= http://portal.tpu.ru/share D/i/ISAEV >click here </A> </BODY > 2 6 A E 2 6 10 14 3 7 B F 3 7 11 15 Figure 7 62

8.6 Displaying images WWW pages can support graphics images within a page. The most common sources of images are either JPEG or GIF files, as these types of images normally have a high degree of compression. GIF images, as was previously mentioned, support only 256 colours from a pallet of 16.7 million colours, whereas JPEG supports more than 256 colours. 8.6.1. Inserting an image Images can be displayed within a page with the <IMG SRC= scr.gif > which inserts the graphic src.gif. HTML script (Figure 8) contains three images : bee.jpg, Lion.jpg and Fox.jpg. These are aligned either to the left or the right using the ALIGN option within the <IMG SRC> tag. The first image (bee.jpg) is aligned to the right, while the second image (Lion.jpg) is aligned to the left. Figure 8 shows output from the script. Note that images are left aligned by default. <TITLE> My page</title> <BODY BGCOLOR="#ffffff"> <IMG SRC="bee.jpg" width=120 ALIGN=RIGHT> <H1>Picture gallery</h1> <P><P> Here are a few pictures. To the right is a picture of bee. Below to the left is a picture of lion and tiger and to the right is a picture of fox <P> <IMG SRC="Lion.jpg" ALIGN=LEFT width=300> <IMG SRC="Fox.jpg" AILIGN=RIGHT width=300> 63

Figure 8 8.6.2 Alternative text Often users choose not to view images in a page and select an option on the viewer which stops the viewer from displaying any graphic images(to give faster downloading of pages). If this is the case then the HTML page can contain substitute text which is shown instead of the image. For example: <IMG SRC="bee.jpg" ALT= bee ALIGN=RIGHT > <IMG SRC="Lion.jpg" ALT= Lion ALIGN=LEFT > <IMG SRC="Fox.jpg" ALT= Fox AILIGN=RIGHT> 8.6.3 Other options Other image options can be added, such as: HDPAGE =x VSPAGE =y defines the amount of space that should be left around images. The x value defines the number of pixels in the x-direction and the y value defines the number of pixels in the y- direction. 64

WIDTH =x HEIGHT = y defines the scaling in the x- and y=direction, where x and y are the desired pixel width and height, respectively, of the image. ALIGH = direction defines the alignment of the image. This can be used to align an image with text. Valid options for aligning with text are texttop, top, middle, absmiddle, bottom, baseline or absbottom. HTML script Figure 9 shows an example of image alignment with the image a.gif (which is just the letter A as a graphic) and Figure 9(right table) shows a sample output. It can be seen that texttop aligns the image with highest part of the text of the line,top aligns the image with the highest element in the line, middle aligns with the middle of the image with the baseline, absmiddle aligns the middle of the image with the middle of the largest item, bottom aligns the bottom of the image with the bottom of the text and absbottom aligns the bottom of the image with the bottom of the largest item. <TITLE> My page</title> <BODY BGCOLOR="#ffffff"> <IMG SRC="A.bmp" ALIGN=texttop>pple<p> <IMG SRC="A.bmp" ALIGN=top>pple<p> <IMG SRC="A.bmp" ALIGN=middle>pple<p> <IMG SRC="A.bmp" ALIGN=bottom>pple<p> <IMG SRC="A.bmp" ALIGN=baseline>pple<p> <IMG SRC="A.bmp" ALIGN=Absbottom>pple<p > </BODY > Figure 9 65

8.7 Horizontal lines A horizontal line can be added with the <HR> tag. Most browsers allow extra parameters, such as: SIZE =n which defines that the height of the rule is n pixels. WIDTH = w which defines that the width of the rule in w pixels or as a percentage. ALIGN = direction where direction refers to the alignment of the rule. Valid options for direction are left, right or center. NONSHADE which defines that the line should be solid with no shading. HTML script Figure 10 gives some example horizontal lines and Figure 10(right table) shows an example output. <TITLE> My page</title> <BODY BGCOLOR="#ffffff"> <IMG SRC="A.bmp" >pple<p> <HR> <IMG SRC="A.bmp" >pple<p> <HR WIDTH=50% ALIGN=CENTER> <IMG SRC="A.bmp" >pple<p> <HR SIZE=10 NOSHADE> </BODY > Figure 10 66