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.

Slides:



Advertisements
Similar presentations
Table, List, Blocks, Inline Style
Advertisements

HTML popo.
Introduction to HTML & CSS
HyperText Markup Language (HTML). Introduction to HTML Hyper Text Markup Language HTML Example The structure of an HTML document Agenda.
CSS Cascading Style Sheets. Objectives Using Inline Styles Working with Selectors Using Embedded Styles Using an External Style Sheet Applying a Style.
Today CSS HTML A project.
Presenter: James Huang Date: Sept. 26,  Introduction  Basics  Lists  Links  Forms  CSS 2.
Making Things Look Nice: Visual Appearance and CSS CMPT 281.
HTML – A Brief introduction Title of page This is my first homepage. This text is bold  The first tag in your HTML document is. This tag tells your browser.
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 BASICS. CSS Rules Components of a CSS Rule  Selector: Part of the rule that targets an element to be styled  Declaration: Two or more parts: a.
Web Pages and Style Sheets Bert Wachsmuth. HTML versus XHTML XHTML is a stricter version of HTML: HTML + stricter rules = XHTML. XHTML Rule violations:
กระบวนวิชา 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 8 Creating Style Sheets.
ICS-FORTH 1 May 22, 2001 Christos Georgis The extensible markup language: An introduction to XML What is a XML document ? How do we check its validity.
Introduction to Cascading Style Sheets (CSS) Module 2: HTML Basics LESSON 4.
Instructional Technology & Design Office or Insert Workshop Name Presented by Your Name Here.
Beginning Web Site Creation: Dreamweaver CS4. XHTMLCSS  Describes the structure  Content  Collection of styles  Formatting body { background-color:
MR.Mohammed Sharaf al Shareef
XHTML II DIGITAL MEDIA: COMMUNICATION AND DESIGN F2007.
XHTML and CSS Overview. Hypertext Markup Language A set of markup tags and associated syntax rules Unlike a programming language, you cannot describe.
Web Workshop: CSS Objectives: - “What is CSS?” - Structure of CSS - How to use CSS in your webpage.
CSS Basics LIS Webteam April 8, Why CSS? What’s wrong with HTML? Structure vs Style Early web design used hacks to style webpages with HTML – like.
XHTML and CSS Overview. Hypertext Markup Language A set of markup tags and associated syntax rules Unlike a programming language, you cannot describe.
4.01 Cascading Style Sheets
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.
Introduction to HTML academy.zariba.com 1. Lecture Content 1.What is HTML? 2.The HTML Tag 3.Most popular HTML tags 2.
Computer Sciences Department
Basics of HTML Shashanka Rao. Learning Objectives 1. HTML Overview 2. Head, Body, Title and Meta Elements 3.Heading, Paragraph Elements and Special Characters.
Review HTML  What is HTML?  HTML is a language for describing web pages.  HTML stands for Hyper Text Markup Language  HTML is not a programming language,
Basics of HTML.
© 2012 Adobe Systems Incorporated. All Rights Reserved. LEARNING THE LANGUAGE OF THE WEB INTRODUCTION TO HTML AND CSS.
Principles of Web Design 6 th Edition Chapter 4 – Cascading Style Sheets.
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.
DAT602 Database Application Development Lecture 14 HTML.
_ HTML, XHTML & CSS Sami Niemelä | Module 1: Introduction to digital media: Day 02.
ACM 511 HTML Week -1 ACM 511 Course Notes. Books ACM 511 Course Notes.
 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.
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.
ITCS373: Internet Technology Week 3: Introduction to CSS Dr. Faisal Al-Qaed.
 This presentation introduces the following: › 3 types of CSS › CSS syntax › CSS comments › CSS and color › The box model.
 2008 Pearson Education, Inc. All rights reserved Introduction to XHTML.
Introduction to Programming the WWW I CMSC Summer 2004 Lecture 7.
Introduction to Programming the WWW I CMSC Winter 2003 Lecture 7.
XHTML 1.1  Derived from Standard Generalized Markup Language (SGML) of ISO  XHTML concerned primary with content rather than presentation and style 
HTML – Organizing Page Content. HTML Images img tag Required attribute: src
HTML/XHTML Structure Building a basic web page using notepad.
HTML – Organizing Page Content. HTML Images img tag Required attribute: src
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.
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.
Microsoft Expression Web 3 – Illustrated Unit D: Structuring and Styling Text.
WEEK -1 ACM 262 ACM 262 Course Notes. HTML What is HTML? HTML is a language for describing web pages. HTML stands for Hyper Text Markup Language HTML.
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
XP 2 HTML Tutorial 1: Developing a Basic Web Page.
HTML Tutorial. What is HTML HTML is a markup language for describing web documents (web pages) HTML documents are described by HTML tags Each HTML tag.
HTML AN INTRODUCTION TO WEB PAGE PROGRAMMING. INTRODUCTION TO HTML With HTML you can create your own Web site. HTML stands for Hyper Text Markup Language.
Week-11 (Lecture-1) Introduction to HTML programming: A web based markup language for web. Ex.
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…
Cascading Style Sheets Using HTML. What are they? A set of style rules that tell the web browser how to present a web page or document. In earlier versions.
CSS Introductions. Objectives To take control of the appearance of a Web site by creating style sheets. To use a style sheet to give all the pages of.
WebD Introduction to CSS By Manik Rastogi.
Fall 2016 CSULA Saloni Chacha
4.01 Cascading Style Sheets
Madam Hazwani binti Rahmat
Introduction to XHTML.
Using Cascading Style Sheets (CSS)
4.01 Cascading Style Sheets
Presentation transcript:

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 in web applications Interpret HTML Forms Explain the purpose Cascading Style Sheets (CSS) Describe the different formats for CSS code Interpret CSS code

HTML HyperText Markup Language (HTML) is the language for writing web pages HTML/4 is the current version HTML/4 versions include –strict:strictly enforces syntax rules –traditional:allows informally accepted syntax –frameset:allows the use of HTML frames

XHTML XHTML is HTML expressed as an XML document Compared to HTML –XHTML has a more rigorous syntax, which is more machine-readable –XHTML contains more meta-information, i.e., information about the HTML document

HTML Syntax Each HTML element is defined by a tag, or pair of tags –tags are delimited by angle brackets: –tags may include attributes( name=“value” ) Paired tags have content –e.g., paragraph: Hello! Empty tags contain nothing –e.g.,,

Sample Web Page

XHTML Headings XHTML documents start in this form (version XHTML/1-strict) <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" " <html xmlns=" xml:lang="en" lang="en"> define XML version define XML document type start HTML document

element The first element of an HTML document is the element –defines a document title, among other things –document title appears in the browser title bar Eastern Hills Soccer League

Headings and Paragraphs Eastern Hills Soccer League EHSL Mission: to serve all children in the Hills area by providing an opportunity for them to grow up healthy, happy, and strong through participation in the world's greatest competitive sport. heading, level1 (1-6 available ) horizontal rule image paragraph (text)

Lists unordered (bullet) list ordered (numbered) list list item Current Team Standings This Week's Matches Contact Us

Hyperlinks Hyperlinks take the browser to other documents when clicked Format: …link text… –e.g., Current Team Standings

Tables An HTML table presents data in a grid format Table Caption R1,C1 R1,C2 R1,C3 R2,C1 R2,C2 R2,C3 R1,C1R1,C2R1,C3 R2,C1R2,C2R2,C3 Table Caption

HTML Forms An HTML Form presents a fill-in form for entering data Form controls include –text box, text area, and password box –check box –radio buttons –drop-down menus –submit buttons

Form tag

Text and Passwords

Check-box and Radio-Buttons

Drop-Down Menus

Submit Buttons

CSS Cascading Style Sheets is a technique for changing the appearance, or style, of web page elements Style may be defined in three ways: –in-line: along with an HTML element –internal style sheet:within an HTML document –external style sheet:outside of an HTML document

Style Elements The “style” of an element can include many visible attributes: –Color –Size –Font –Alignment –Decoration (underline, bold, etc.) –etc.

Style Definition Style attributes are defined as a set of “name: value” pairs, separated by “;” color: red; background: blue; align: left Each HTML element has its own set of relevant style attributes

In-Line Style In-line style is defined using the “style” attribute of an HTML element This paragraph is centered in blue

Internal Style Sheet An internal style sheet is defined in the heading of an HTML document –Delimited by …... p{ color: blue; text-align: center }

Internal Style Sheet An internal style sheet consists of a set of descriptors Each descriptor defines the style for one HTML element Descriptor format: h1{ text-align: center; color: brown } selector declaration block property name / value

Internal Style Sheet h1{ text-align: center; color: brown } The selector identifies one or more HTML elements to which the rule applies –multiple elements are comma-separated Property values in the declaration block apply to each instance of the selected HTML element(s) selector declaration block property name / value

Selectors Descriptors starting with "." define classes that can be referenced in document elements using the class attribute. number { text-align: right } 1234

Selectors Descriptors may also identify established psuedoclasses –e.g., a:hover is applied to hyperlinks only while under the cursor a:hover{ background: white }

Internal Style Sheet Example... h1 { color: brown; background-color: lightgray; border: solid gray; text-align:center; padding:.5em; }.strong { font-weight: bold; }.quote { margin-left: 1em; margin-right: 1em; } li { padding-top: 1ex; } a:hover { background-color: lightgray; }

External Style Sheet An external style sheet has the same format as an internal style sheet, but is stored in a separate document It is imported into a document with a tag...

CSS - Precedence When conflicting style attributes apply to an element, the closest one takes precedence External Style Sheet Internal Style Sheet In-line Style Attribute HTML Element

Review HTML XHTML HTML Forms Cascading Style Sheets In-line, internal, and external style sheets