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:

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

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

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

Chapter 4 A Hypertext Markup Language Primer

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

Chapter 4 A Hypertext Markup Language Primer

Creating Web Pages. Getting Started

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

A Brief Introduction to HTML

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

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

Html basics Course Outline

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

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

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

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

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

CSC Web Programming. Introduction to HTML

Chapter 4. Introduction to XHTML: Part 1

HYPERTEXT MARKUP LANGUAGE ( HTML )

Brief Intro to HTML. CITS3403 Agile Web Development. 2018, Semester 1

Desire2Learn: HTML Basics

I-5 Internet Applications

INTRODUCTION TO HTML5! HTML5 Page Structure!

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

11. HTML5 and Future Web Application

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

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

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

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

Creating Web Pages with SeaMonkey Composer

Management Information Systems

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

INFS 2150 / 7150 Intro to Web Development / HTML Programming

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

Glossary. advance: to move forward

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

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

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

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

UNIT II Dynamic HTML and web designing

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

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

Creating Web Pages Using HTML

Intro to html. --- define every element, attribute, and entity along with the rules for their use

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

HTML TUTORIAL ONE. Understanding What XHTML is Not

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

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?

ICT IGCSE Practical Revision Presentation Web Authoring

By Ryan Stevenson. Guidebook #2 HTML

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

This is a paragraph. It's quite short.

Basic HTML Handout & Exercise Web Technology

Dreamweaver Primer. Using Dreamweaver to Create and Publish Simple Web Pages. Mark Branom, Stanford University, Continuing Studies June 2011

HTMLnotesS15.notebook. January 25, 2015

1.264 Lecture 12. HTML Introduction to FrontPage

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

What You Will Learn Today

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

Basic HTML. Lecture 14. Robb T. Koether. Hampden-Sydney College. Wed, Feb 20, 2013

Chapter 2 Creating and Editing a Web Page

Basic HTML. Lecture 14. Robb T. Koether. Hampden-Sydney College. Wed, Feb 20, 2013

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

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

Web Design and Development ACS Chapter 12. Using Tables 11/23/2017 1

CSC 101: PreLab Reading for Lab #4 More HTML (some of this reading on Tables and Images are based on previous writings of Prof William Turkett)

Indian Institute of Technology Kharagpur. HTML Part III. Prof. Indranil Sen Gupta Dept. of Computer Science & Engg. I.I.T.

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

html: lists, images, tables network basics UNIVERSITY OF MASSACHUSETTS AMHERST CMPSCI 120 Fall 2010 See notes 09/16/10 Go to the validator

Save Forum Messages will be sent and Pages will be completed by pressing this Save button.

All Creative Designs. Basic HTML for PC Tutorial Part 1 Using MS Notepad (Version May 2013) My First Web Page

Chapter 3 Web Design & HTML. Web Design Class Mrs. Johnson

Basic HTML Lecture 14

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

Metric Conversion Factors

APPENDIX THE TOOLBAR. File Functions

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

MMGD0204 Web Application Technologies. Chapter 3 HTML - TEXT FORMATTING

2.1 Origins and Evolution of HTML

Title: Jan 29 11:03 AM (1 of 23) Note that I have now added color and some alignment to the middle and to the right on this example.

Announcements. Paper due this Wednesday

Rich Text Editor Quick Reference

Layout Manager - Toolbar Reference Guide

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

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

Problem 1: Textbook Questions [4 marks]

Using Dreamweaver 2 HTML

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

Netscape Composer Tutorial

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

Start by launching Mozilla To start making a web page, go to File -> New -> Composer Page

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

STD 7 th Paper 1 FA 4

Resetting Your Password

HTML and CSS Lecture 15 COMPSCI111/111G SS 2018

BASICS OF WEB DESIGN CHAPTER 2 HTML BASICS KEY CONCEPTS

HTML and CSS COURSE SYLLABUS

Transcription:

Chapter 4: Marking Up With HTML: A HypertextMarkup tm Language Primer Fluency with Information Technology Third Edition by Lawrence Snyder Marking Up with HTML Tags describe how a web page should look Formatting with Tags: Words or abbreviations enclosed in angle brackets < > Come in pairs (beginning and end): <title> </title> Tags are not case-sensitive, but the actual text between the tags is 1-2 Copyright 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Copyright 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 4-2 Tags for Bold, Italic, and underline An HTML Web Page File Bold: <b> </b> Italic: <i> </i> Underline: <u> </u> Tag pair surrounds the text to be formatted You can apply more than one kind of formatting at a time <b><i>veni, Vidi, Vici!</i></b> produces: Veni, Vidi, Vici! Tags can be in any order, but have to be nested correctly Some tags do not surround anything, so they don't have an ending form. Closing angle bracket is replaced by /> <hr /> inserts a horizontal rule (line) <br /> inserts a line break 1-3 Begins with <html> and ends with </html> <html> <head> Preliminary material goes here, including <title> </title> </head> <body> Main content of the page goes here </body> </html> 1-4 Copyright 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 4-3 Copyright 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 4-4

Structuring Documents Markup language g describes how a document's parts fit together Headings: Choice of eight levels of heading tags to produce headings, subheadings, etc. Headings display material in large font on a new line <h1>pope</h1> <h2>cardinal</h2> <h3>archbishop</h3> produces: Pope Cardinal Archbishop Copyright 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 4-5 1-5 Copyright 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 4-6 1-6 HTML Format vs. Display Format White Space HTML text was run together on one line, but displayed formatted on separate lines HTML source tells the browser how to produce the formatted image based on the meaning of the tags, not on how the source instructions look But HTML is usually written in a structured (indented) form to make it easier for people to understand <h1>pope</h1> <h2>cardinal</h2> <h3>archbishop</h3> 1-7 White space that has been inserted for readability Spaces Tabs New lines Browser turns any sequence of white space characters into a single space before processing HTML Exception: Preformatted information between <pre> and </pre> tags is displayed as it appears 1-8 Copyright 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 4-7 Copyright 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 4-8

Copyright 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 4-9 1-9 Copyright 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 4-10 1-10 Brackets in HTML: The Escape Symbol Special Characters What if our web page needed to show a math relationship like 0 < p > r The browser would interpret < p > as a paragraph tag, and would not display it To show angle brackets, use escape symbol ampersand (&) then an abbreviation, then a semicolon (;) < displays as < > displays as > & displays as & 1-11 < < > > & & (non-breaking space) &mdash (em dash) Full list at http://www.w3.org/tr/rec-html40/sgml/entities.html 1-12 Copyright 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 4-11 Copyright 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 4-12

Accent Marks in HTML Letters with accent marks use the escape symbol Ampersand, then letter, then the name of the accent mark, then semicolon é displays as é ñ Full list at displays as ñ http://www.w3.org/tr/rec-html40/sgml/entities.html /TR/REC l/ titi l Copyright 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 4-13 1-13 Copyright 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 4-14 1-14 Attributes in HTML Marking Links With Anchor Tags Properties such as text alignment require more information For justification, we need to specify left, right, or center Attributes appear inside the angle brackets of start tag, after tag word, with equal sign, value in double quotes. Do not use fancy/smart quotes!!! <p align = "center"> (default justification is left) Horizontal rule attributes: width and size (thickness) can be specified or left to default <hr width="50%" size="3" /> 1-15 There are two sides of a hyperlink: 1. Anchor text (the text in the current document that is highlighted) 2. Hyperlink reference (the address of a Web page / target of the link) Begin with <a followed by a space Give the link reference using href="filename" Close the start anchor tag with > Text to be displayed for this link End anchor tag with </a> <a href="target_of_the_hyperlink">anchor Text Seen</a> Anchor Text Seen 1-16 Copyright 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 4-15 Copyright 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 4-16

Anchor Tags (cont'd) Absolute pathnames: Reference pages at other web sites using complete URLs http://server/directory_path/filename <a href="http://www.aw.com/snyder/index.html">fit</a> html">fit</a> Copyright 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 4-17 1-17 Anchor Tags (cont'd) Relative pathnames: Reference pages stored to the same directory (give only the name of the file) Read <a href="./filename">this file</a>. Relative pathnames are more flexible we can move web files around as a group Relative pathnames can also specify a path deeper or higher in the directory structure./directory/filename /fil../directory/filename /fil. Current directory.. Parent directory (one level l up) Copyright 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 4-18 1-18 Including Pictures With Image Tags Image Tag Format: <img src="filename" /> src short for source Absolute and relative pathname rules apply Pictures can be used as links using anchor tag <a href="fullsize fullsize.jpg jpg"><img src="thumbnail thumbnail.jpg jpg" /></a> Copyright 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 4-19 1-19 Copyright 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 4-20 1-20

Including Pictures With Image Tags GIF and JPEG Images GIF: Graphic Interchange Format 8 bits (256 colors or levels of gray) JPEG: Joint Photographic Experts Group 24 bits (millions of colors full color; levels of compression) Tell browser which format image is in using filename extension (.gif,.jpg or.jpeg) Positioning the Image in the Document By default, images are inserted in the page at the point where the tag is specified in the HTML, and the text lines up with the bottom of the image Align attribute can line up image with top of line of text, middle, or bottom Align left, center, or right attribute puts the image on the side of the browser window text flows around it To put image on separate line, enclose within paragraph tags Can specify how large the image should be displayed (in pixels) with height and width attributes Copyright 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 4-21 1-21 Copyright 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 4-22 1-22 Handling Color Color is used for both background and text bgcolor attribute of body tag gives solid background color Use hexadecimal color numbers (0-9 A-F) <body bgcolor="#ff00ff"> (magenta) Or use predefined color terms <body bgcolor="magenta"> color attribute can be used with body text, link, or font tags <font color="red">text</font> 1-23 1-24 Copyright 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 4-23 Copyright 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 4-24

1-25 1-26 Copyright 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 4-25 Copyright 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 4-26 Handling Lists Handling Tables Unnumbered (bulleted) list: <ul> and </ul> tags begin and end the list <li> and </il> tags begin and end the items within the list Ordered (numbered) list: <ol> and </ol> tags begin and end the list Uses the same <li> tags Sublists: Insert lists within lists (between <li> </li> tags) Definitional list: <dl> and </dl> tags begin and end the list <dt> and </dt> surround the terms to be defined <dd> and </dd> surround the definitions iti (indented) d) 1-27 Tables begin and end with <table> and </table> tags Rows are enclosed in table row tags, <tr> and </tr> Cells of each row are surrounded by table data tags, g, <td> and </td> Create a caption centered at the top of the table with <caption> and </caption> tags Column headings are created as first row of table by using <th> and </th> tags instead of table data tags See examples in textbook 1-28 Copyright 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 4-27 Copyright 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 4-28

Controlling Text with Tables Tables can control arrangement of information on a page e.g., g, a series of links listed across the top of the page could be placed in a one-row table to keep them together If the window is too small to display all the links, table keeps them in a row and a scroll bar is added If the tags are not in a table, the links will wrap to the next line instead 1-29 1-30 Copyright 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 4-29 Copyright 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 4-30 1-31 1-32 Copyright 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 4-31 Copyright 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 4-32

Copyright 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 4-33 1-33 Copyright 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 4-34 1-34 1-35 Copyright 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 4-35