A Brief Introduction to HTML

Similar documents
Metric Conversion Factors

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)

A Balanced Introduction to Computer Science, 3/E

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

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

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

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

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

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

Creating Web Pages. Getting Started

1.264 Lecture 12. HTML Introduction to FrontPage

Islamic University of Gaza Faculty of Engineering Department of Computer Engineering ECOM Advanced Internet Technology Lab.

Html basics Course Outline

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:

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

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

By Ryan Stevenson. Guidebook #2 HTML

Chapter 4. Introduction to XHTML: Part 1

UNIT II Dynamic HTML and web designing

Announcements. Paper due this Wednesday

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

Programmazione Web a.a. 2017/2018 HTML5

On a blog, code can mean many things. It can refer to the complicated

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

I-5 Internet Applications

Web Design 101. What is HTML? HTML Tags. Web Browsers. <!DOCTYPE html> <html> <body> <h1>my First Heading</h1> <p>my first paragraph.

INTRODUCTION TO HTML5! HTML5 Page Structure!

Certified HTML Designer VS-1027

CSC Web Programming. Introduction to HTML

CHAPTER 2 MARKUP LANGUAGES: XHTML 1.0

COMPUTER APPLICATIONS IN BUSINESS FYBMS SEM II

Certified HTML5 Developer VS-1029

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

HTML. Based mostly on

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

HTML OBJECTIVES WHAT IS HTML? BY FAITH BRENNER AN INTRODUCTION

Building Web Based Application using HTML

Selected Sections of Applied Informatics

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

11. HTML5 and Future Web Application

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

Desire2Learn: HTML Basics

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?

Summary 4/5. (contains info about the html)

introduction to XHTML

Management Information Systems

Markup Language SGML: Standard Generalized Markup Language. HyperText Markup Language (HTML) extensible Markup Language (XML) TeX LaTeX

HTML. HTML Evolution

CSC Web Technologies, Spring HTML Review

Creating Web Pages Using HTML

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

Web Publishing Basics I

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

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

BASICS OF WEB DESIGN CHAPTER 2 HTML BASICS KEY CONCEPTS

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

c122jan2714.notebook January 27, 2014

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

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

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

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

Introduction to using HTML to design webpages

Layout Manager - Toolbar Reference Guide

Your Own Web Page; Quick and Dirty Via Mashup Reminder: Next Quiz on 4/15

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

Hyper Text Markup Language HTML: A Tutorial

1. Please, please, please look at the style sheets job aid that I sent to you some time ago in conjunction with this document.

APPENDIX THE TOOLBAR. File Functions

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

Fundamentals: Client/Server

Web Design and Development ACS Chapter 3. Document Setup

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

How the Internet Works

Document Object Model. Overview

Introduction to HTML

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

Chapter 4 A Hypertext Markup Language Primer

Introduction to Computers and Their Applications

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

COPYRIGHTED MATERIAL. Contents. Chapter 1: Creating Structured Documents 1

2.1 Origins and Evolution of HTML

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

Basic HTML Handout & Exercise Web Technology

Review Ch. 17 Creating Online Pages and Sites. 2010, 2006 South-Western, Cengage Learning

Chapter 4 A Hypertext Markup Language Primer

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

Introduction to WEB PROGRAMMING

HTML+ CSS PRINCIPLES. Getting started with web design the right way

HTML. Mohammed Alhessi M.Sc. Geomatics Engineering. Internet GIS Technologies كلية اآلداب - قسم الجغرافيا نظم المعلومات الجغرافية

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

Comp-206 : Introduction to Software Systems Lecture 22. Alexandre Denault Computer Science McGill University Fall 2006

HTML for the SAS Programmer

Geocaching HTML & BBCode FUNdamentals by Scott Aleckson (SSO JOAT)

HYPERTEXT MARKUP LANGUAGE ( HTML )

The internet is a worldwide collection of networks that link millions of computers. These links allow the computers to share and send data.

HTML HTML/XHTML HTML / XHTML HTML HTML: XHTML: (extensible HTML) Loose syntax Few syntactic rules: not enforced by HTML processors.

HTML: Parsing Library

The [HTML] Element p. 61 The [HEAD] Element p. 62 The [TITLE] Element p. 63 The [BODY] Element p. 66 HTML Elements p. 66 Core Attributes p.

INTRODUCTION TO WEB USING HTML What is HTML?

Transcription:

A P P E N D I X HTML SuMMAry J A Brief Introduction to HTML A web page is written in a language called HTML (Hypertext Markup Language). Like Java code, HTML code is made up of text that follows certain strict rules. When a browser reads a web page, the browser interprets the code and renders the page, displaying characters, fonts, paragraphs, tables, and images. HTML files are made up of text and tags that tell the browser how to render the text. Nowadays, there are dozens of HTML tags see Table 1 for a summary of the most important tags. Fortunately, you need only a few to get started. Most HTML tags come in pairs consisting of an opening tag and a closing tag, and each pair applies to the text between the two tags. Here is a typical example of a tag pair: Java is an <i>object-oriented</i> programming language. The tag pair <i> </i> directs the browser to display the text inside the tags in italics: Java is an object-oriented programming language. The closing tag is just like the opening tag, but it is prefixed by a slash (/). For example, bold-faced text is delimited by <b> </b>, and a paragraph is delimited by <p> </p>. <p><b>java</b> is an <i>object-oriented</i> programming language.</p> The result is the paragraph Java is an object-oriented programming language. Another common construct is a bulleted list. For example: Java is object-oriented safe platform-independent Here is the HTML code to display it: <p>java is</p> <ul><li>object-oriented</li> <li>safe</li> <li>platform-independent</li></ul> Each item in the list is delimited by <li> </li> (for list item ), and the whole list is surrounded by <ul> </ul> (for unnumbered list ). A-86

Appendix J HTML Summary A-87 Table 1 Selected HTML Tags Tag Meaning Children Commonly Used Attributes html HTML document head, body head Head of an HTML document title title body Title of an HTML document Body of an HTML document h1... h6 Heading level 1... 6 p Paragraph ul Unnumbered list li ol Ordered list li dl Definition list dt, dd li dt dd List item Term to be defined Definition data table Table tr tr Table row th, td th td Table header cell Table cell data a Anchor href, name img Image src, width, height pre hr br i or em b or strong tt or code s or strike u super sub Preformatted text Horizontal rule Line break Italic Bold Typewriter or code font Strike through Underline Superscript Subscript form Form action, method

A-88 Appendix J HTML Summary Table 1 Selected HTML Tags Tag Meaning Children Commonly Used Attributes input Input field type, name, value, size, checked select Combo box style selector option name option Option for selection textarea Multiline text area name, rows, cols As in Java, you can freely use white space (spaces and line breaks) in HTML code to make it easier to read. For example, you can lay out the code for a list as follows: <p>java is</p> <ul> <li>object-oriented</li> <li>safe</li> <li>platform-independent</li> </ul> The browser ignores the white space. If you omit a tag (such as a </li>), most browsers will try to guess the missing tags sometimes with differing results. It is always best to include all tags. You can include images in your web pages with the img tag. In its simplest form, an image tag has the form <img src="hamster.jpeg"/> This code tells the browser to load and display the image that is stored in the file hamster.jpeg. This is a slightly different type of tag. Rather than text inside a tag pair <img> </img>, the img tag uses an attribute to specify a file name. Attributes have names and values. For example, the src attribute has the value "ham ster.jpeg". Table 2 contains commonly used attributes. Table 2 Selected HTML Attributes Attribute Description Commonly Contained in name Name of form element or anchor input, select, textarea, a href Hyperlink reference a src Source (as of an image) img code Applet code applet width, height Width, height of image or applet img, applet rows, cols Rows, columns of text area textarea type Type of input field, such as text, password, checkbox, radio, submit, hidden input value Value of input field, or label of submit button input

Appendix J HTML Summary A-89 Table 2 Selected HTML Attributes Attribute Description Commonly Contained in size Size of text field input checked Check radio button or checkbox input action URL of form action form method GET or POST form It is considered polite to use several additional attributes with the img tag, namely the image size and an alternate description: <img src="hamster.jpeg" width="640" height="480" alt="a photo of Harry, the Horrible Hamster"/> These additional attributes help the browser lay out the page and display a temporary description while gathering the data for the image (or if the browser cannot display images, such as a voice browser for blind users). Users with slow network connections really appreciate this extra effort. Because there is no closing </img> tag, we put a slash / before the closing >. This is not a requirement of HTML, but it is a requirement of the emerging XHTML standard, the XML-based successor to HTML. See www.w3c.org/tr/xhtml1 for more information on XHTML. The most important tag on a web page is the <a> </a> tag pair, which makes the enclosed text into a link to another file. The links between web pages are what makes the Web into, well, a web. The browser dis plays a link in a special way (for example, underlined text in blue color). Here is the code for a typical link: <a href="http://horstmann.com">cay Horstmann</a> is the author of this book. When the viewer of the web page clicks on the words Cay Horstmann, the browser loads the web page located at horstmann.com. (The value of the href attribute is a Universal Resource Locator (URL), which tells the browser where to go. The prefix http:, for Hypertext Transfer Protocol, tells the browser to fetch the file as a web page. Other protocols allow different actions, such as ftp: to download a file, mailto: to send e mail to a user, and file: to view a local HTML file.) Table 3 Selected HTML Entities Entity Description Appearance < Less than < > Greater than > & Ampersand & " Quotation mark " Nonbreaking space Copyright symbol

A-90 Appendix J HTML Summary You have noticed that tags are enclosed in angle brackets (less-than and greaterthan signs). What if you want to show an angle bracket on a web page? HTML provides the notations < and > to pro duce the < and > symbols, respectively. Other codes of this kind produce symbols such as accented letters. The & (ampersand) symbol introduces these codes; to get that symbol itself, use &. See Table 3 for a summary. You may already have created web pages with a web editor that works like a word processor, giving you a WYSIWYG (what you see is what you get) view of your web page. But the tags are still there, and you can see them when you load the HTML file into a text editor. If you are comfortable using a WYSI WYG web editor, you don t need to memorize HTML tags at all. But many programmers and professional web designers prefer to work directly with the tags at least some of the time, because it gives them more control over their pages.