CSC 551: Web Programming Fall 2001 Basic HTML  hypertext  tags & elements  text formatting  hyperlinks  images  style sheets.

Slides:



Advertisements
Similar presentations
Introduction to HTML. A Web Page is.. An ASCII (text) file.. Whose filename ends with.htm or.html –index.html or cookie-recipe.htm Contains HTML tags.
Advertisements

Computers: Tools for an Information Age Writing Your Own Web Page: Using HTML and Web Authoring Tools.
1 CSC 551: Web Programming Spring 2004 Basic HTML  hypertext  tags & elements  text formatting  lists, hyperlinks, images  tables, frames  cascading.
HTML popo.
Internet Services and Web Authoring (CSET 226) Lecture # 5 HyperText Markup Language (HTML) 1.
HTML. The World Wide Web Protocols Addresses HTML.
HTML: HyperText Markup Language Hello World Welcome to the world!
INTRODUCTION TO HYPERTEXT MARKUP LANGUAGE 1. Outline  Introduction  Markup Languages  Editing HTML  Common Tags  Headers  Text Styling  Linking.
Chapter 4 Marking Up With Html: A Hypertext Markup Language Primer.
Bayu Priyambadha, S.Kom.  HyperText Markup Language (HTML) is the language for specifying the static content of Web pages (based on SGML, the Standard.
Marking Up With Html: A Hypertext Markup Language Primer
HTML Introduction HTML
HTML Companion. Lecture Objectives Learn about HTML. Know basic HTML tags.
Glencoe Digital Communication Tools Create a Web Page with HTML Chapter Contents Lesson 4.1Lesson 4.1 Get Started with HTML (85) Lesson 4.2Lesson 4.2 Format.
Tutorial 3: Adding and Formatting Text. 2 Objectives Session 3.1 Type text into a page Copy text from a document and paste it into a page Check for spelling.
HTML: PART ONE. Creating an HTML Document  It is a good idea to plan out a web page before you start coding  Draw a planning sketch or create a sample.
COMP519: Web Programming Autumn 2014 Basic HTML  hypertext  tags & elements  text formatting  lists, hyperlinks, images  tables, frames.
© 2005 ComputerPREP, Inc. All rights reserved. HTML 4.0 and Web Page Design Module I.
Bayu Priyambadha, S.Kom. for long documents, you can even have links to other locations in that same document  … where ident is a variable for identifying.
ULI101: XHTML Basics (Part III) Introduction to XHTML / Continued … Block-Level vs. Inline Elements (tags) Manipulating Text,  , Text Characteristics,,,,,,,,,,,,,,,
Multimedia and Web Technology Prepared by: Asst. Prof. Maryam Eskandari.
Chapter 4 Fluency with Information Technology L. Snyder Marking Up With HTML: A Hypertext Markup Language Primer.
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Fluency with Information Technology Third Edition by Lawrence Snyder Chapter.
Chapter 2: The Client Side: HTML CIS 275—Web Application Development for Business I.
CSc 4370/6370: Web Programming Fall 2012 Basic HTML  hypertext  tags & elements  text formatting  lists, hyperlinks, images  tables, frames  cascading.
Cascading Style Sheet (CSS)
HTML HTML stands for "Hyper Text Mark-up Language“. Technically, HTML is not a programming language, but rather a markup language. Used to create web pages.
HTML HyperText Markup Language Constantly evolving - extra facilities being added regularly Java applets and JavaScript used to increase functionality.
Chapter 4: Hypertext Markup Language Primer TECH Prof. Jeff Cheng.
Understanding HTML Code
 HTML stands for Hyper Text Mark-up Language. The coding language used to create documents for the World Wide Web  HTML is composed of tags. HTML tags.
CP2022 Multimedia Internet Communication1 HTML and Hypertext The workings of the web Lecture 7.
1 CSC 121 Computers and Scientific Thinking David Reed Creighton University HTML and Web Pages.
Section 4.1 Format HTML tags Identify HTML guidelines Section 4.2 Organize Web site files and folder Use a text editor Use HTML tags and attributes Create.
1 Introduction to HTML Joshua S. Simon Collective Technologies.
XP Mohammad Moizuddin Creating Web Pages with HTML Tutorial 1 1 New Perspectives on Creating Web Pages With HTML Tutorial 1: Developing a Basic Web Page.
HTML 4 Foundation Level Course HyperText Markup Language Most common language used in creating Web documents. You can use HTML to create cross-platform.
Programming in HTML.  Programming Language  Used to design/create web pages  Hyper Text Markup Language  Markup Language  Series of Markup tags 
 2008 Pearson Education, Inc. All rights reserved Introduction to XHTML.
Exploring the Digital Domain HTML Basics. HTML Hypertext Markup Language Standard (ASCII) text with embedded format codes Most HTML tags are paired Tags.
Introduction to HTML 1 Basharat Mahmood, Department of Computer Science, CIIT, Islamabad, Pakistan.
1 SEN 910 CSS/HTML Programming Basic HTML  hypertext  tags & elements  text formatting  hyperlinks  images  tables  frames.
1 Week 1 l HTML l Applets Applets and HTML. 2 Overview l Applets: Java programs designed to run from a document on the Internet l HTML: Hypertext Markup.
Exploring Office 2003 – Grauer and Barber WEB Creation & Design using HTML Chapters BCIS 1405 Session 14.
INTRODUCTORY Tutorial 1 Using HTML Tags to Create Web Pages.
HTML: Hyptertext Markup Language Doman’s Sections.
Agenda Block-Level vs. Inline Elements (tags) Manipulating Text,  , Text Characteristics,,,,,,,,,,,,,,, Font Attributes: size, color, face Horizontal.
Introduction to HTML Xiangming Mu 9/23/ Learning Objectives Understand basic HTML tags and their attributes Learn to create a simple HTML page.
1 Lect 4 HTML-Intro. 2 HTML & Web Pages A Web page is a text document that contains additional formatting information in the HyperText Markup Language.
HTML Basics Computers. What is an HTML file? *HTML is a format that tells a computer how to display a web page. The documents themselves are plain text.
Formatting Text with HTML. Objectives: Students will be able to: Define the structure of the document with block elements Format numbered, bulleted, and.
HTML Basics. HTML Coding HTML Hypertext markup language The code used to create web pages.
Basic HTML Programming Technology Education Ellsworth Community Middle School Communication Systems.
HTML HYPER TEXT MARKUP LANGUAGE. INTRODUCTION Normal text” surrounded by bracketed tags that tell browsers how to display web pages Pages end with “.htm”
What is HTML? HTML is a language for describing web pages. HTML stands for Hyper Text Markup Language HTML is not a programming language, it is a markup.
Department of Computer Science, Florida State University CGS 3066: Web Programming and Design Spring
Department of Computer Science, Florida State University CGS 3066: Web Programming and Design Spring
HTML. INDEX Introduction to HTML Creating Web Pages Commands And Tags Web Page.
1 Foundation of HTML Web Page Design. 2 Safe Web Fonts: Used by most computers regardless of environment or platform  Times New Roman  Arial  Courier.
Bayu Priyambadha, S.Kom.  HyperText Markup Language (HTML) is the language for specifying the static content of Web pages (based on SGML, the Standard.
Marking Up with XHTML Tags describe how a web page should look
HTML Programming Basic HTML text formatting.
IS333: MULTI-TIER APPLICATION DEVELOPMENT
Computers and Scientific Thinking David Reed, Creighton University
Marking Up with XHTML Tags describe how a web page should look
Marking Up with XHTML Tags describe how a web page should look
Marking Up with XHTML Tags describe how a web page should look
Marking Up with XHTML Tags describe how a web page should look
An Introduction to HTML Pages
Marking Up with XHTML Tags describe how a web page should look
Presentation transcript:

CSC 551: Web Programming Fall 2001 Basic HTML  hypertext  tags & elements  text formatting  hyperlinks  images  style sheets

Hypertext & HTML HyperText Markup Language (HTML) is the language for specifying the content of Web pages  hypertext refers to the fact that Web pages are more than just text can contain multimedia, provide links for jumping within & without  markup refers to the fact that it works by augmenting text with special symbols (tags) that identify structure and content type HTML is an evolving standard (as new technology/tools are added)  HTML 1 (Berners-Lee, 1989): very basic, limited integration of multimedia in 1993, Mosaic added many new features (e.g., integrated images)  HTML 2.0 (IETF, 1994): tried to standardize these & other features, but late in , Netscape & IE added many new, divergent features  HTML 3.2 (W3C, 1996): attempted to unify into a single standard but didn't address newer technologies like Java applets & streaming video  HTML 4.0 (W3C, 1997): current standard attempts to map out future directions for HTML, not just react to vendors

Web development tools many high-level tools exist for creating Web pages e.g., Microsoft FrontPage, Netscape Composer, Adobe PageMill, Macromedia DreamWeaver, HotDog, … also, many applications have "save to HTML" options (e.g., Word) for most users who want to develop basic, static Web pages, these are fine assembly language vs. high-level language analogy  may want low-level control  may care about size/readability of pages  may want to "steal" page components and integrate into existing pages  may want dynamic features such as scripts or applets so, why are we learning low-level HTML using a basic text editor?

Tags vs. elements HTML specifies a set of tags that identify structure and content type  tags are enclosed in specifies an image  most tags come in pairs, marking a beginning and ending and enclose the title of a page an HTML element is an object enclosed by a pair of tags My Home Page is a TITLE element This text appears bold. is a BOLD element Part of this text is bold. is a PARAGRAPH element that contains a BOLD element HTML document is a collection of elements (text/media with context)

Structural elements an HTML document has two main structural elements  HEAD contains setup information for the browser & the Web page e.g., the title for the browser window, style definitions, JavaScript code, …  BODY contains the actual content to be displayed in the Web page Title for Page Text that appears in the page HTML documents begin and end with and tags Comments appear between HEAD section enclosed between and BODY section enclosed between and view page in browser

Text layout the BODY can contain multiple lines of text  text layout and spacing is pretty much ignored by the browser  every sequence of whitespace is interpreted as a single space  browser automatically wraps the text to fit the window size  can layout text in an HTML document for readability, will not affect how it is viewed Title for Page This is a whole lot of text that goes on and on and on and on. view page in browser

Overriding default layouts for the most part, layout of the text must be left to the browser WHY? can override some text layout  can cause a line break using the tag (no closing tag)  can specify a new paragraph (starts on a new line, preceded by a blank line) using …  can force a space character using the symbol for a non-breaking space: Title for Page This is a paragraph of text made up of two lines. This is another paragraph with a GAP between some of the words. This paragraph is indented on the first line but not on subsequent lines. view page in browser

Separating blocks of text can specify headings for paragraphs or blocks of text  … tags produce a large, bold heading  … tags produce a slightly smaller heading...  … tags produce a tiny heading can insert a horizontal rule to divide sections  draws line across window  sets width  sets thickness  sets color Title for Page Major heading 1 Here is some text. Subheading Here is some subtext. Major heading 2 Here is some more text. view page in browser

Aligning text can specify whether elements should be centered  … Note: the CENTER element is deprecated in HTML 4.0  still can be used, but a preferred method exists HTML 4.0 recommends using paragraph tags with an alignment attribute  … Title for Page Centered Heading Here is some left-justified text (which is the default in HTML). Here is some centered text. Here is some right-justified text. view page in browser

Example Web page Consider the CSC 551 Home PageCSC 551 Home Page  page title and section information is centered  paragraphs/sections for different topics (course description, required work, collaboration policy, schedule)  headings to identify each section  breaks and spaces used to align text, improve layout

Text styles can specify styles for fonts  … specify bold  … specify italics  … specify underlined  … specify typewriter- like (fixed-width) font  … increase the size of the font  … decrease the size of the font Note: if elements are nested, the order of opening/closing is important! (must be LIFO) Title for Page Text can be emphasized using bold, italics, or even resizing. Underlining text is not generally recommended since it looks too much a like a hyperlink. The typewriter font is good for displaying code: sum = sum + i; view page in browser

More text styles  … specify a subscript  … specify a superscript  … change the font color constants are defined for many colors the FONT tag is deprecated in HTML 4.0, instead they recommend:  … for paragraphs  … for inline text Title for Page Subscripts (e.g., x 1 ) and superscripts (e.g., 2 10 ) can be embedded directly in text. In order to avoid affecting line spacing, usually it should be made smaller (e.g., 2 10 ). view page in browser

More text grouping  … specify text that is to be displayed as is (line breaks and spacing are preserved) useful for code or whenever you want text to fit a specific layout  … specify text that is to be indented on both margins useful for quotations or for indenting text in subsections Title for Page for (i = 0; i < 10; i++) { sum = sum + i; } Eagleson's Law states that: Any code of your own that you haven't looked at for six or more months might as well have been written by someone else. view page in browser

Lists There are 3 different types of list elements  … specifies an ordered list (using numbers or letters to label each list item) identifies each list item can set type of ordering, start index  … specifies unordered list (using a bullet for each) identifies each list item  … specifies a definition list identifies each term identifies its definition Title for Page First thing. Second thing. Third thing. HTML HyperText Markup Language HTTP HyperText Transfer Protocol view page in browser

Hyperlinks Perhaps the most important HTML element is the hyperlink, or ANCHOR  … where URL is the Web address of the page to be displayed when the user clicks on the link if the page is accessed over the Web, must start with if not there, the browser will assume it is the name of a local file  … causes the page to be loaded in a new window Title for Page Creighton University Open html09 in a new window view page in browser

Hyperlinks (cont.) For long documents, you can even have links to other locations in that document  … where ident is a variable for identifying this location  … will then jump to that location within the file  … can jump into the middle of another file just as easily Title for Page [ HTML | HTTP | IP | TCP ] Computer acronyms: HTML HyperText Markup Language HTTP HyperText Transfer Protocol IP Internet Protocol TCP Transfer Control Protocol view page in browser

Hyperlinks (cont.) By default,  hyperlinks appear as blue  while you are clicking, turns red  after you have visited, turns purple can redefine these colors by specifying attributes in the BODY tag  BGCOLOR is background color  LINK is the unvisited link color  ALINK is the active link color  VLINK is the visited link color Title for Page CNN view page in browser

Images Can include images using  by default, browsers can display GIF and JPEG files  other image formats may require plug-in applications for display  again, if file is to be accessed over the Web, must start with if not, the browser will assume it is a local file more on images next week Title for Page <img src=" ~davereed/Images/reed.gif"> view page in browser

Example Web page revisited Consider the CSC 551 Home Page againCSC 551 Home Page  bold, italics, and font size changes are used throughout to embellish text  does not have colored fonts (use sparingly!)  uses an unordered list to present the course goals  uses BODY attributes to specify link colors  has links to University page, department page, instructor page  links to lecture notes bring up a new window

Style sheets modularity is key to the development and reuse of software  design/implement/test useful routines and classes  package and make available for reuse  saves in development cost & time  central libraries make it possible to make a single change and propogate HTML 4.0 emphasizes the use of style sheets in order to package and resuse style formats  idea is to separate structure/content (HTML) and presentation (Style Sheets)  central libraries make it possible to make a single change and propagate

Inline style sheets Using tags, can move formatting specifications into the HEAD  specify element, then sequence of attribute:value pairs Careful: current browsers do not support all style sheet features Title for Page <!-- body {background-color : white} a:link {color : blue} a:visited {color : purple} a:active {color : red} --> CNN view page in browser

Inline style sheets (cont.) Can define extensions to existing elements p.indented defines a new class of paragraphs inherits all defaults of adds new features to specify this newly defined class, place class="ID" attribute in tag Title for Page <!-- h1 {color : blue; text-align : center} p.indented {margin-left : 1in} --> Center Title This is a normal paragraph. This is an indented paragraph. view page in browser

Careful with style sheets Can completely change the look of HTML elements  not usually a good idea to diverge too much from user expectations Careful: current browsers do not support all style sheet features Title for Page <!-- a {color : red; text-decoration : none; font-size : larger} a:hover {color : blue} --> Visit the CNN web site. view page in browser

Modularity & style sheets To take full advantage of style sheets, can place style definitions in separate file, link to that file  any changes can be localized to that one style file ideally, place all formatting options in a central style sheet all Web pages link to that same style sheet for a uniform look  simplifies Web pages since only need to specify structure/content tags Title for Page <link rel="stylesheet" type="text/css" href="myStyle.css" title="myStyle"> Center Title This is a normal paragraph. This is an indented paragraph. view page in browser h1 {color : blue; text-align : center} p.indented {margin-left : 1in}

Style sheets summary: 3 options 1) if need to set the style of a single element  place style attribute in corresponding tag red text 2) if need to set the style for similar elements in a page  place style definitions with STYLE tags in the HEAD <!-- a {color : red; text-decoration : none; font-size : larger} a:hover {color : blue} --> 3) if need to set the style for similar elements across pages  place style definitions in separate file, link in using tag in HEAD <link rel="stylesheet" type="text/css" href="myStyle.css" title="myStyle">

Web rules of thumb HTML provides for lots of neat features, but just because you can add a feature doesn't mean you should! don't add features that distract from the content of the page  use color & fonts sparingly and be careful how elements fit together e.g, no purple text on a pink background, no weird fonts  use images only where appropriate e.g., bright background images can make text hard to read e.g., the use of clickable images instead of buttons or links can slow access  don't rely on window or font size for layout e.g., font size may be adjusted by viewer, window constrained  don’t be annoying e.g., no pop-up windows, excessive advertising, silly music  break large document into smaller or provide a menu to internal links  stick to standard features and test using both IE and Netscape

Next week… advanced HTML  tables  more on style sheets  frames  images Read Chapters 7-8, As always, be prepared for a quiz on  today’s lecture (moderately thorough)  the reading (superficial)