HTML, Part 2. 4-2 Showing Pictures: The Image Tags Image Tag Format –src short for source –alt for text –Can use absolute or relative pathname.

Slides:



Advertisements
Similar presentations
HTML Basics Customizing your site using the basics of HTML.
Advertisements

HTML popo.
CREATED BY : VIRAL M.KORADIYA. Anchor elements are defined by the element. The element accepts several attributes, but either the Name or HREF attribute.
1 Cascading Style Sheets Continued Different kinds of selectors in a style sheet –Simple- Pseudo-Class –Contextual- Pseudo-Element –Class Image Styles.
INTRODUCTION TO HYPERTEXT MARKUP LANGUAGE 1. Outline  Introduction  Markup Languages  Editing HTML  Common Tags  Headers  Text Styling  Linking.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 4 Key Concepts 1 Copyright © Terry Felke-Morris.
Cascading Style Sheets. CSS stands for Cascading Style Sheets and is a simple styling language which allows attaching style to HTML elements. CSS is a.
กระบวนวิชา CSS. What is CSS? CSS stands for Cascading Style Sheets Styles define how to display HTML elements Styles were added to HTML 4.0 to.
Chapter 4 Marking Up With Html: A Hypertext Markup Language Primer.
Beginning Web Site Creation: Dreamweaver CS4. XHTMLCSS  Describes the structure  Content  Collection of styles  Formatting body { background-color:
Chapter 4_2 Marking Up With Html: A Hypertext Markup Language Primer.
Instructor: A. Burns 1 HTML Images. Instructor: A. Burns 2 Inserting a Graphic Images can be displayed in two ways: as inline images or as external images.
Marking Up With Html: A Hypertext Markup Language Primer
4.01 Cascading Style Sheets
HTML Introduction DSC340 Mike Pangburn. What is HTML?  HTML: Hyper Text Markup Language  The predominant markup language for web-page design.  A markup.
1 The Structure of a Web Table beginning of the table structure first row of three in the table end of the table structure table cells You do not need.
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.
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.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley A Hypertext Markup Language Primer Marking Up with HTML lawrence snyder c.
Dreamweaver -- CSS. Dreamweaver -- MX New icons are added in MX Most of the features commonly used in web design, and are same as FrontPage. New feature.
Spring 2013 CS 103 Computer Science – Business Problems Lecture 7: A Hypertext Markup Language (HTML) continue Instructor: Zhe He Department of Computer.
Tutorial #3 Cascading Style Sheets. Review: Last Class Image sizing Pathnames Project Default Path Relative Path Absolute Path Blackboard Homework Submission.
Chapter 4: Hypertext Markup Language Primer TECH Prof. Jeff Cheng.
Images (1) Three most popular formats – Graphics Interchange Format (GIF) – Joint Photographic Experts Group (JPEG) – Portable Network Graphics (PNG) –
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Introduction to Computers CS Dr. Zhizhang Shen Chapter 4: Talking.
ITEC 745 Instructional Web Authoring I Instructor: Ray Cole Week 8.
1 Basic HTML. 2 Part 1: Basic Web Page Production.
1 What is CSS?  CSS stands for Cascading Style Sheets  Styles define how to display HTML elements  Styles are normally stored in Style Sheets  Styles.
Exploring Office 2003 – Grauer and Barber Enhancing the Web Page Chapter 3 BCIS 1405 Session 15.
HTML 4 Foundation Level Course HyperText Markup Language Most common language used in creating Web documents. You can use HTML to create cross-platform.
 This presentation introduces the following: › 3 types of CSS › CSS syntax › CSS comments › CSS and color › The box model.
Copyright © 2013 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Relative Pathnames Often links refer to other Web pages on the same site.
CO1552 – Web Application Development Cascading Style Sheets.
Introduction to CSS. What is CSS?  Cascading Style Sheets  Used for styling HTML  Also important in javascript and jquery for selectors  External.
Introduction to Programming the WWW I CMSC Winter 2003 Lecture 7.
Designing a Web Page with Tables. A text table: contains only text, evenly spaced on the Web page in rows and columns uses only standard word processing.
CS134 Web Design & Development Cascading Style Sheets (CSS) Mehmud Abliz.
Adobe Dreamweaver CS3 Revealed CHAPTER THREE: WORKING WITH TEXT AND IMAGES.
Adding Images Learning Web Design: Chapter 7. Using an Image Images have many purposed on a Web site Used as a static image To add illustration: ex. A.
4 Chapter Four Introduction to HTML. 4 Chapter Objectives Learn basic HTML commands Discover how to display graphic image objects in Web pages Create.
HTML tags Some popular ones. Paragraph: separated by a single line of white space Line break NOTE: no end tag is used for this tag Headlines ( through.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley A Hypertext Markup Language Primer Marking Up with HTML lawrence snyder c.
Macromedia Dreamweaver MX 2004 Design Professional And Graphics WORKING WITH TEXT.
Copyright © 2013 Pearson Education, Inc. Publishing as Pearson Addison-Wesley What did we learn so far? 1.Computer hardware and software 2.Computer block.
CIS234A Lecture 8 Instructor Greg D’Andrea. Review Text Table contains only text, evenly spaced on the Web page in rows and columns uses only standard.
Internet Applications Development Lecture 4 L. Obead Alhadreti.
Macromedia Dreamweaver 8 Revealed AND GRAPHICS WORKING WITH TEXT.
HTML Primer. A very good set of tutorials and references for HTML “Try it” feature lets you type in HTML.
HTML Basics. HTML Coding HTML Hypertext markup language The code used to create web pages.
Web Technologies Beginning Cascading Style Sheets (CSS) 1Copyright © Texas Education Agency, All rights reserved.
Style Sheets. Coding Style Sheets  Style sheets use RULES to create the style  A selector (a tag or user-defined style name)  and then declarations.
©SoftMoore ConsultingSlide 1 Introduction to HTML: Block-Level Elements.
1 Cascading Style Sheet (CSS). 2 Cascading Style Sheets (CSS)  a style defines the appearance of a document element. o E.g., font size, font color etc…
Creating Web Documents CSS examples (do more later) Lab/Homework: Read chapters 15 & 16. Work on Project 3, do postings.
HTML Basics.
Showing Pictures: The Image Tags
Marking Up with XHTML Tags describe how a web page should look
CSS Layouts: Grouping Elements
Inserting and Working with Images
IS333: MULTI-TIER APPLICATION DEVELOPMENT
Web Development & Design Foundations with HTML5 7th Edition
Marking Up with XHTML Tags describe how a web page should look
Marking Up with XHTML Tags describe how a web page should look
Web Design and Development
Chapter 4: Marking Up With HTML: A Hypertext Markup Language Primer
Marking Up with XHTML Tags describe how a web page should look
Marking Up with XHTML Tags describe how a web page should look
Lesson 3: Cascading Style Sheets (CSS) and Graphical Elements
Marking Up with XHTML Tags describe how a web page should look
Presentation transcript:

HTML, Part 2

4-2 Showing Pictures: The Image Tags Image Tag Format –src short for source –alt for text –Can use absolute or relative pathname

4-3 “Clickable” Pictures Pictures can be used as links Anchor “text” is thumbnail image

4-4 Including Pictures With Image Tags GIF and JPEG Images –GIF: Graphic Interchange Format 8 bits (256 colors or levels of gray) PNG is a newer form –JPEG: Joint Photographic Experts Group 24 bits (millions of colors, compression levels) –Extension indicates format (.gif,.png,.jpg,.jpeg)

4-5 Attributes in HTML Tags can include attributes with values – Text alignment (justification) is specified using attributes (default justification is left) Horizontal rule attributes

4-6 Style Attribute Style is another attribute –Used to specify inline CSS –Value can have many properties in a list ( prop1: val1; prop2: val2 …)

4-7

4-8 Attributes for Image Tags Displayed image size can be adjusted <img src=“puffer.jpg” width=“200” height=“200” /> Scales to 200x200 pixels Leaving out dimension will result in browser preserving aspect ratio –E.g.: If original is 800 x 600, and you set width to 400, height will be set to 300

4-9 Browser will happily distort image (original is 2400x2400) Attributes for Image Tags

Styling Position for Images Images are inserted in the page at the point in the text where the tag is specified in the HTML, and the text lines up with the bottom of the image A better way to place images in text is to flow the text around them

Styling Position for Images Make text flow around an image with style attribute – Image with no surrounding text –

Span groups content for styling My favorite fonts are Helvetica, Century Gothic, and Bodoni.

4-13 Applying Style to Improve our Page Add links with local path names to bios Color –Special background and text colors –Color change on “This sentence is false” –New color styling for the headings Horizontal line modified Added floating image

4-14

4-15

4-16 Handling Lists Unordered (bulleted) list – and Ordered (numbered) list – and –Uses same tags Sublists possible Definitional list: – and tags – and for terms – and for definitions (indented)

4-17 Example (Nested Lists) Hydrogen, H, 1.008, 1 Helium, He, 4.003, 2 good for balloons makes you talk funny Lithium, Li, 6.941, 2 1 Beryllium, Be, 9.012, 2 2 Gets rendered as (browser indents each list some) 1.Hydrogen, H, 1.008, 1 2.Helium, He, 4.003, 2 Good for balloons Makes you talk funny 3.Lithium, Li, 6.941, Beryllium, Be, 9.012, 2 2

4-18 Handling Tables Tables use and tags For rows use and For cells use and Caption at top of table – and tags Column headings set up in first row –Use and tags instead of table data tags

4-19 Example Simple Table A B C Dan Jen Pat Mary Tim Bob Will display as A B C Dan Jen Pat Mary Tim Bob

4-20 Controlling Text with Tables Tables can control arrangement of information on a page, e.g. –Series of links across top of page in one-row table –Use no borders –Rows won’t wrap; scroll bar added

4-21 Cascading Style Sheets (CSS) Cascading Style Sheets allows for styling pages Can define themes Suppose we have 25 level-2 headings and we want them all to be styled like this: How to do?

4-22 Setting Global Style Inside tags, make a global style using … tags h2 { color: red; font-family: arial } Another example: tables and elements table {outline-style: solid; outline-color: violet} th {background-color: purple; font-family: courier} td {background-color: fuchsia; font-family: arial; color: white; text-align: center}

4-23 Overriding Style Sheets What if we want to have one table cell with background color “tan” (instead of the global “fuchsia”)? Can override with style attributes inside table Bob In style, closest wins

4-24 Adding Class to Style We can create different style collections, called classes (below uses “sum” and “fall”) table.sum {outline-style: solid; outline-color: lime} th.sum {background-color: lightgreen; font-family: courier; color: green} td.sum {background-color: green; font-family: arial; color: white; text-align: center} table.fall {outline-style: solid; outline-color: red} th.fall {background-color: tan; font-family: courier} td.fall {background-color: brown; font-family: arial; color: white; text-align: center}

4-25 Using Style Classes Now use class names in tags to apply the style selectively......

4-26 Style Files: One Style, Many Pages Take the style information out of the page and make a separate style file –Create a.css file, like myStyle.css –Put only the specifications from between the … tags in the style file –Put a tag to this style file back into the section of any page needing this style <link type=“text/css” href=“myStyle.css”>

4-27

4-28

4-29 Cascading the Style Sheets Five levels of style information, with precedence – Default, given by browser settings – External, from a style file – Global, in the of one page – Range, given in an enclosing – Site, given by style attribute at one location Closest style wins

Web Authoring HTML and CSS can be generated –Can use WYSIWYG editor like Word, Dreamweaver –Site building tools like on iPage Not for labs though!

Validation Web pages can be validated –Shows conformance to standard –

4-32 Wrap Up: Web Page Authoring Markup and tags HTML Style with CSS Authoring software