Background: HTML and CSS Chapters 1-4 of Deitel XML text.

Slides:



Advertisements
Similar presentations
Intro to HTML. HTML HTML = HyperText Markup Language Used to define the content of a webpage HTML is made up of tags and attributes Content.
Advertisements

HTML and CSS. HTML Hyper Text Markup Language Tells browser how to display text and images.
HTML popo.
HTML. The World Wide Web Protocols Addresses HTML.
1 Cascading Style Sheets™ (CSS) Outline 5.1 Introduction 5.2 Inline Styles 5.3 Embedded Style Sheets 5.4 Conflicting Styles 5.5 Linking External Style.
Very quick intro HTML and CSS. Sample html A Web Title.
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.
 2002 Prentice Hall, Inc. All rights reserved. Chapter 4 – Cascading Style Sheets (CSS) Objectives –To take control of the appearance of a Web site by.
1 Dynamic HTML: Cascading Style Sheets™ (CSS). 2 Introduction Cascading Style Sheets (CSS) –Specify the style of your page elements –Spacing, margins,
1 XHTML Cascading Style Sheets™ (CSS). 2 Inline.html 1 2
History Leading to XHTML
 2002 Prentice Hall, Inc. All rights reserved. Chapter 4 – Cascading Style Sheets (CSS) Outline 4.1Introduction 4.2Inline Styles 4.3Creating Style Sheets.
Presentation (5): Cascading Style Sheets (CSS) ITNET1.
1 Outline 9.1Introduction 9.2Markup Languages 9.3Editing HTML 9.4Common Tags 9.5Headers 9.6Text Styling 9.7Linking 9.8Images 9.9Formatting Text With 9.10Special.
 2001 Deitel & Associates, Inc. All rights reserved. 1 Outline 9.1Introduction 9.2Markup Languages 9.3Editing HTML 9.4Common Tags 9.5Headers 9.6Text Styling.
B118 Web Programming Session #3 Introduction to XHTML February 16, 2004.
The.htm/.html Mystery When saving the template files in Internet Explorer, they will be named.htm by default. To be consistent with how the code was written.
XHTML and CSS Overview. Hypertext Markup Language A set of markup tags and associated syntax rules Unlike a programming language, you cannot describe.
1 Dynamic HTML -Cascading Style Sheets™ (CSS) Outline 6.1 Introduction 6.2 Inline Styles 6.3 Embedded Style Sheets 6.4 Conflicting Styles 6.5 Linking External.
4.01 Cascading Style Sheets
HTML Tags. Objectives Know the commonly used HTML tags Create a simple webpage using the HTML tags that will be discussed.
Chapter 12 Creating and Using XML Documents HTML5 AND CSS Seventh Edition.
 2008 Pearson Education, Inc. All rights reserved Introduction to XHTML.
Cascading Style Sheets CS3505. What are CSS? Method for adding style attributes consistently to HML tags Cascading because styles are applied in order.
Chapter 4 HTML. Objectives Explain how HTML/XHTML are used and describe the difference between them Interpret HTML code Explain how HTML Forms are used.
 2000 Deitel & Associates, Inc. All rights reserved. Chapter 14 – Dynamic HTML: Cascading Style Sheets (CSS) Outline 14.1Introduction 14.2Inline Styles.
CSS Dvijesh Bhatt.
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.
1 Outline 3.1 Introduction 3.2 Editing HTML 3.3 First HTML Example 3.4 W3C HTML Validation Service 3.5 Headers 3.6 Linking 3.7 Images 3.8 Special Characters.
Cascading Style Sheet (CSS)
1 HTML Basics Dr. Awad Khalil Computer Science Department AUC.
Tutorial 6 By Sam INE 1020 Introduction to Internet Engineering 1 DHTML & CSS Tutorial 6.
HTML (HyperText Markup Language)
 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.
 2002 Prentice Hall, Inc. All rights reserved.2 Chapter 2 — Introduction to HyperText Markup Language 4: Part I Outline 2.1Introduction 2.2Markup Languages.
Objectives: 1. Create a Skeleton HTML 2. View a Skeleton File Through a Server and Browser 3. Learn HTML Body Tags for the Display of Text and Graphics.
1 WDMD 170 – UW Stevens Point WDMD 170 Internet Languages eLesson: CSS Introduction to Style Sheets (NON-audio version) © Dr. David C. Gibbs
 This presentation introduces the following: › 3 types of CSS › CSS syntax › CSS comments › CSS and color › The box model.
CSS My favourite ICT lesson By Federico Boschi Cascading Style Sheets.
 2001 Prentice Hall, Inc. All rights reserved. 1 Chapter 6 - Cascading Style Sheets™ (CSS) Outline 6.1 Introduction 6.2 Inline Styles 6.3 Embedded Style.
 2008 Pearson Education, Inc. All rights reserved Introduction to XHTML.
1 Introduction to HTML: Part 1 Outline Introduction Elements and Attributes Editing HTML Common Elements Headers Images Unordered Lists Nested and Ordered.
Introduction to CSS. What is CSS?  Cascading Style Sheets  Used for styling HTML  Also important in javascript and jquery for selectors  External.
 2001 Prentice Hall, Inc. All rights reserved. 1 Chapter 6 - Cascading Style Sheets™ (CSS) Outline 6.1 Introduction 6.2 Inline Styles 6.3 Embedded Style.
HTML: Hyptertext Markup Language Doman’s Sections.
Lecture 2 - HTML and CSS Review SFDV3011 – Advanced Web Development 1.
Web Development & Design Foundations with XHTML Chapter 2 HTML/XHTML Basics.
1 Introduction to XHTML: Part 1 Outline Introduction Elements and Attributes Editing XHTML Common Elements W3C XHTML Validation Service Headers Linking.
1 Introduction to XHTML. 2 Main.html Program Output 1 2
HTML GUIDE Press F5 and then Click on the links on the left to get to the section you want Section 1: Getting Started Section 2: Moving Banner Section.
Presentation (5): Cascading Style Sheets (CSS) Fundamentals of Web-Centric Development.
Introduction to CSS. Why CSS? CSS Provides Efficiency in Design and Updates CSS relatively easy to use Can give you more flexibility and control Faster.
1 Working with Cascading Style Sheet (CSS). 2 Cascading Style Sheets (CSS)  a style defines the appearance of a document element. o E.g., font size,
CSS Cascading Style Sheets A very brief introduction CSS, Cascading Style Sheets1.
5 th ed: Chapter 4 4 th ed: Chapter 5 SY306 Web and Databases for Cyber Operations Slide Set #4: CSS.
Spiderman ©Marvel Comics Creating Web Pages (part 1)
CSS Hadas Kahsay. Overview  What is CSS  Basic syntax of CSS Rules  How to link CSS style to html documents  Browsers and CSS  Advantages of CSS.
Department of Computer Science, Florida State University CGS 3066: Web Programming and Design Spring
Stylizing a Navigational Menu Web Design Section 6-3 Part or all of this lesson was adapted from the University of Washington’s “Web Design & Development.
HTML 5 AND CSS Dr Mohd Soperi Mohd Zahid Semester /16.
HTML And the Internet. HTML and the Internet ► HTML: HyperText Markup Language  Language in which all pages on the web are written  Not Really a Programming.
HTML Help book. HTML HTML is the programming language used to make web pages for the Internet. HTML stands for Hyper Text Markup Language. HTML is made.
WebD Introduction to CSS By Manik Rastogi.
INTRO TO WEB DEVELOPMENT html
Web Basics: HTML/CSS/JavaScript What are they?
Chapter 6 - Cascading Style Sheets™ (CSS)
CSS Layouts: Grouping Elements
Introduction to XHTML.
Cascading Style Sheets
Presentation transcript:

Background: HTML and CSS Chapters 1-4 of Deitel XML text

Remarks There is a lot of important and useful discussion on html in the text that is not covered in this ppt. I have simply picked a few interesting examples. You may need to work through the rest of these chapters for yourself.

A little background: HTML Hypertext markup language is processed by the browser (or some html parser) and content is displayed. The language consists of tags opening and closing instructions, like font settings, anchors, applets, and forms. The material (data) thus presented is said to be “marked up” using the defined tags. This course won’t cover much html per se.

Display an image

An image <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" " XML How to Program - Welcome <img src = "xmlhtp.jpg" height = "238" width = "183" alt = "Cover of XML How to Program">

Lists

Code for lists html example is in the ppt notes for this slide <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" " XML How to Program - Lists The Best Features of the Internet You can meet new people from countries around the world. You have access to new media as it becomes public: tag --> New games New applications For business For pleasure …

Navigation bar

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" " XML How to Program - Navigation Bar <img src = "buttons/links.jpg" width = "65" height = "50" alt = "Links Page"> <img src = "buttons/list.jpg" width = "65" height = "50" alt = "List Example Page"> <img src = "buttons/contact.jpg" width = "65" height = "50" alt = "Contact Page"> <img src = "buttons/header.jpg" width = "65" height = "50" alt = "Header Page"> <img src = "buttons/table.jpg" width = "65" height = "50" alt = "Table Page"> <img src = "buttons/form.jpg" width = "65" height = "50" alt = "Feedback Form">

Page with links

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" " XML How to Program - Links Here are my favorite Internet Search Engines Click on the Search Engine address to go to that page. Yahoo AltaVista Ask Jeeves WebCrawler

Send mail

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" " XML How to Program - Contact Page My address is Click on the address and your browser will open an message and address it to me.

A table Link to table Table source

An html form from Dietel’s XML text

The source for form from Dietel’s XML text In notes below And at htmlform.htmlhtmlform.html

What’s wrong with html? Network programmers found html too limiting. It is ok for web page content, but what about presenting material for some specialized application, like molecular structure? Also, there are inconsistencies and ambiguities in some expression definitions. Many browsers accept/process HTML, even though it has errors.

Aside: And what is XML? XML was developed by a consortium of programmers. It is “eXtensible Markup Language”. A developer can use the “element” tag to create his own entities for application-specific needs.

Aside continued: DTD, DOM and Schema We will learn more about these, but DTD references appear in the CSS examples. DTD: Document type declarations define an XML document’s structure. A DTD is not required for an XML document but they insure conformity. DTDs use a modified BNF for defining entities, called extended Backus-Nauer Form. An XML or HTML document might reference a DTD at the top. Schema: There is currently a shift away from DTDs to Schema for defining XML structure. Schema uses XML syntax and both W3C and MS have defined schema standards. DOM is a tree-structure, recommended by W3C for representing an XML document. (Any directory-style tree would work.)

CSS: cascading style sheet A CSS can be internally or externally defined. It is a style sheet that tells the browser how to represent the html document.

Internal stylesheet

Source is at Grocerylist.htmlGrocerylist.html

Importing an external style-sheet

links Grocery is at grocery2.htmlgrocery2.html Stylesheet is at styles.htmlstyles.html

An external style sheet: code part 1 /* An external stylesheet */ a { text-decoration: none; } a:hover { text-decoration: underline; color: red; background-color: #ccffcc; } li em { color: red; font-weight: bold; } ul { margin-left: 2cm; } ul ul { text-decoration: underline; margin-left:.5cm; }

Importing a style sheet (example continued) <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" " XML How to Program - Importing Style Sheets Shopping list for Monday : Milk Bread White bread Rye bread Whole wheat bread Rice Potatoes Pizza with mushrooms Go to the Grocery store

In line CSS ( from Dietel’s XML text)

Source for inline CSS document “width.html” <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" " Box Dimensions div { background-color: #ffccff; margin-bottom:.5em } Here is some text that goes in a box which is set to stretch across twenty precent of the width of the screen. Here is some CENTERED text that goes in a box which is set to stretch across eighty precent of the width of the screen. This box is only twenty percent of the width and thirty percent of the height. What do we do if it overflows? Set the overflow property to scroll!

Another inline CSS example

Source for borders2.html <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" " XML How to Program - Borders body { background-color: #ccffcc } div { text-align: center; margin-bottom:.3em; width: 50%; position: relative; left: 25%; padding:.3em } Solid border Double border Groove border Ridge border Inset border Outset border

HW on this section Use my form, table and html/css examples to produce your own form, table and html/css. Post these 3 exercises and me the links.