HTML, XHTML, CSS, & JAVAScript ~ an introduction ~

Slides:



Advertisements
Similar presentations
CSCI N241: Fundamentals of Web Design Copyright ©2004 Department of Computer & Information Science Introducing XHTML: Module B: HTML to XHTML.
Advertisements

CSS Cascading Style Sheets. Objectives Using Inline Styles Working with Selectors Using Embedded Styles Using an External Style Sheet Applying a Style.
Cascading Style Sheets
Cascading Style Sheets (CSS) “Styles” for short. Pg. 418.
Today CSS HTML A project.
1. Content – Collective term for all text, images, videos, etc. that you want to deliver to your audience. 2. Structure – How the content is placed on.
HTML/XML XHTML Authoring. Creating Tables  Table: An arrangement of horizontal rows and vertical columns. The intersection of a row and a column is called.
Web Pages and Style Sheets Bert Wachsmuth. HTML versus XHTML XHTML is a stricter version of HTML: HTML + stricter rules = XHTML. XHTML Rule violations:
Pengantar Teknologi Mobile 13 Antonius Rachmat C, S.Kom, M.Cs XHTML.
Copyright © 2004 ProsoftTraining, All Rights Reserved. Lesson 3: XHTML Coding © 2007 Prosoft Learning Corporation All rights reserved ITD 110 Web Page.
XHTML 16-Apr-17.
Cascading Style Sheets. Slide 2 Lecture Overview Overview of Cascading Style Sheets (CSS) Ways to declare a CSS CSS formatting capabilities New features.
XHTML1 Building Document Structure. XHTML2 Objectives In this chapter, you will: Learn how to create Extensible Hypertext Markup Language (XHTML) documents.
17-Jun-15 XHTML 2 What is XHTML? XHTML stands for Extensible Hypertext Markup Language XHTML is aimed to replace HTML.
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
Introducing XHTML: Module B: HTML to XHTML. Goals Understand how XHTML evolved as a language for Web delivery Understand the importance of DTDs Understand.
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.
Computer Sciences Department
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,
Principles of Web Design 6 th Edition Chapter 1 – HTML5.
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,
_ HTML, XHTML & CSS Sami Niemelä | Module 1: Introduction to digital media: Day 02.
 XHTML is aimed to replace HTML  XHTML is almost identical to HTML 4.01  XHTML is a stricter and cleaner version of HTML  XHTML is HTML defined as.
Chapter 1 Understanding the Web Design Environment Principles of Web Design, 4 th Edition.
Week 1 Understanding the Web Design Environment. 1-2 HTML: Then and Now HTML is an application of the Standard Generalized Markup Language Intended to.
XHTML1 Building Document Structure Chapter 2. XHTML2 Objectives In this chapter, you will: Learn how to create Extensible Hypertext Markup Language (XHTML)
1 XHTML محمد احمدی نیا 2 Of 19 HTML vs XHTML  XHTML is a stricter and cleaner version of HTML.  by combining the strengths of HTML.
HTML INTRODUCTION, EDITORS, BASIC, ELEMENTS, ATTRIBUTES.
XHTML. Introduction to XHTML What Is XHTML? – XHTML stands for EXtensible HyperText Markup Language – XHTML is almost identical to HTML 4.01 – XHTML is.
 This presentation introduces the following: › 3 types of CSS › CSS syntax › CSS comments › CSS and color › The box model.
Cascading Style Sheets Orientation Learning Web Design: Chapter 11.
XP Tutorial 9 1 Working with XHTML. XP SGML 2 Standard Generalized Markup Language (SGML) A standard for specifying markup languages. Large, complex standard.
Lesson 4.
Web Development & Design Foundations with XHTML Chapter 2 HTML/XHTML Basics.
1 Web Application Programming Presented by: Mehwish Shafiq.
1 Introduction to XML XML stands for Extensible Markup Language. Because it is extensible, XML has been used to create a wide variety of different markup.
1 Credits Prepared by: Rajendra P. Srivastava Ernst & Young Professor University of Kansas Sponsored by: Ernst & Young, LLP (August 2005) XBRL Module Part.
XML Introduction. Markup Language A markup language must specify What markup is allowed What markup is required How markup is to be distinguished from.
Lecture: Web Design Assis. Prof. Freshta Hanif Ehsan Faculty of Computer Science Kabul Polytechnic University Spring Semester
1 Tutorial 11 Creating an XML Document Developing a Document for a Cooking Web Site.
INT222 - Internet Fundamentals Shi, Yue (Sunny) Office: T2095 SENECA COLLEGE.
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,
Introduction to CSS. What is CSS? CSS ("Cascading Style Sheets") determines how the elements in our XHTML documents are displayed and formatted. By using.
Copyright © 2003 Pearson Education, Inc. Slide 1-1 Created by Cheryl M. Hughes The Web Wizard’s Guide to XHTML by Cheryl M. Hughes.
©SoftMoore ConsultingSlide 1 Introduction to HTML: Basic Document Structure.
CSS Cascading Style Sheets A very brief introduction CSS, Cascading Style Sheets1.
Microsoft Expression Web 3 – Illustrated Unit D: Structuring and Styling Text.
Department of Computer Science, Florida State University CGS 3066: Web Programming and Design Spring
Chapter 6 Introducing Cascading Style Sheets Principles of Web Design, Third Edition.
XHTML Basics. What is XHTML? XHTML is newer than, but built upon, the original HTML (Hyper Text Markup Language) platform. XHTML has stricter rules and.
HTML5 and CSS3 Illustrated Unit B: Getting Started with HTML.
Chapter 4 Frames and Cascading Style Sheets. Frames Frames divide a browser window into two or more separate pieces or panes, with each pane containing.
What is XHTML? XHTML stands for Extensible Hypertext Markup Language
4.01 Cascading Style Sheets
Web Programming– UFCFB Lecture 9
IS333: MULTI-TIER APPLICATION DEVELOPMENT
Cascading Style Sheets - Building a stylesheet
XHTML
Cascading Style Sheets™ (CSS)
Chapter 6 Introducing Cascading Style Sheets
Web Programming– UFCFB Lecture 9
Cascading Style Sheets
XHTML 7-May-19.
Cascading Style Sheets - Building a stylesheet
4.01 Cascading Style Sheets
Lesson 2: HTML5 Coding.
XHTML 29-May-19.
محمد احمدی نیا XHTML محمد احمدی نیا
HTML5 and CSS3 Illustrated Unit B: Getting Started with HTML
Presentation transcript:

HTML, XHTML, CSS, & JAVAScript ~ an introduction ~

HTML (hyper text mark up language) Created by Tim Berners-Lee First time he used it was Christmas 1990 Publically introduced HTML in 1991 HTML totally adopted in 1993 HTML caught on by 1995 world wide and companies like Yahoo and Amazon.com were created!

Flavors of HTML HTML 4 has three versions ◦ HTML 4.01 Traditional  Encourages designers to move from the heavy coding of earlier forms of HTML and begin using CSS for formatting ◦ HTML 4.01 Strict  Requires that only structure based code be used with all formatting handled by CSS ◦ HTML 4.01 Frameset  Allows developers to create pages that utilize frames for page layout

HTML elements and tags HTML made up of elements ◦ Elements describe to the browser how text should be treated ◦ Elements are expressed in HTML as tags ◦ this is a tag ◦ Directions are given in between the brackets 

HTML Attributes Attributes tell the browser specifics and act as additional information Attributes come after the Attributes are never repeated in a closing tag

HTML Container Tags Container tags use an opening tag, that has the element in the tag and a corresponding closing tag ◦ A closing tag has a / before the element ◦ some text to be bold

HTML Empty Tags Act as instructions to the browser Do not contain content No matching closing tag is necessary

HTML Syntax Rules Case insensitive ◦ Upper or lowercase does not matter ◦ Be consistent ◦ Majority of web designers write in lowercase Whitespace insensitive ◦ In tags the element must immediately follow the opening angle bracket ◦ you can put as much space or returns with out effecting the display of the page in the browser Within the attribute you can use ‘ or “ ◦ Be consistent

XHTML (Extensible HTML) Evolved from XML (extensible markup language) which was a language that allowed developers to create documents that focused on the data on the page, not how it would be displayed W3C developed XHTML to eventually replace HTML 4.01 and used the same set of “flavors” ◦ Transitional, strict, frameset ◦ Requires that pages are written in a stricter XML syntax

XHTML Syntax Rules Case sensitive ….MUST BE LOWERCASE Attribute values must be quoted…’ or “ All attributes must have values Tags must be properly nested Closing tags are required The only syntax rule that is the same between HTML and XHTML is that both are whitespace insensitive

To make your XHTML code valid… Must begin document with a document type declaration ◦ This informs the browser which “flavor” you will be using to write your code ◦ Some times called DOCTYPES ◦ Looks complex, but will be exactly the same on every document that uses that type sooo…copy and paste

DOCTYPE Examples XHTML transitional DOCTYPE <!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” -transitional.dtdhttp:// -transitional.dtd>

DOCTYPE Examples XHTML strict DOCTYPE <!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Strict //EN” -strict.dtdhttp:// -strict.dtd>

DOCTYPE Examples XHTML frameset DOCTYPE <!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Frameset //EN” -frameset.dtdhttp:// -frameset.dtd>

Declaring the XHTML namespace Technically written in XML so must define the XHTML namespace Technical and not totally necessary to fully understand it Will be the same on all your documents, regardless of the DOCTYPE you are using It is an added attribute to the first tag in your page which is the tag

Advantages of XHTML Advantages of XHTML Can validate XHTML for free using on line resources ◦ Browsers will not throw out any errors will just try to understand your code as best they can and still show page ◦ By declaring the flavor with the DOCTYPE you can check your code with a validator Requires you write better, cleaner code making it easier to edit and maintain later “Future proof”..by declaring the language you are using from the beginning browsers in the future will be able to correctly render your pages By writing in XHTML Strict you can separate the content of your pages (the XHTML and the CSS)…which means more flexibility.

CSS Developed in effort to provide more robust formatting language for the web. Can be used with any web page and any DOCTYPE Created in 1996 Introduced text formatting, indents, spacing, alignment, padding, borders

CSS Browser Support Current version is CSS 2.0 and almost all browsers support CSS Some browsers may not implement the CSS exactly to the standards so some pages may render differently

BASIC CSS SYNTAX CSS relies on a different syntax then XHTML Instead of elements and tags, CSS uses rules ◦ Made up of a selector and declarations

BASIC CSS SYNTAX The selector is a reference to the portion of the XHTML document that should be formatted ◦ Can be XHTML element or a special CSS selector such as an ID or class.

BASIC CSS SYNTAX Declarations are made up of property values pairs. Each property is separated by its value by a colon, and each declaration is separated from the next by a semicolon. All of the declaration is enclosed in curly braces. p {color: #ff0000; font-weight:bold;}

BASIC CSS SYNTAX CSS selectors are case sensitive Declarations are case insensitive CSS is white space insensitive Properties that contain more than one word, like font-weight, separate the words with hyphens. If a property value needs more than one word, like with TNR for a font, the values need to be in quotation marks.

Inheritance…. XHTML docs are made up of nested sets of elements which creates a parent-child relationship. Many – BUT NOT ALL, CSS properties inherit from parent-to-child elements. So, if you have a paragraph that has a span, the span will inherit most of the parent’s properties, especially those referring to test and font styles.

CSS Advantages Provides many formatting options not available in HTML Pages that use CSS load and render more quickly You can reformat an entire site You can repurpose your site with out rewriting it

What the ‘cascade’ means If you have more than one style rule applied to the same element on your page it gets fixed by using the cascade Style rules closer to the element in question take precedence over those farther away. More specific rules override less specific rules ◦ So an ID selector that targets one specific element will take precedence over a general element

To depict the cascade…. p {color:#999999; font-weight:bold; } p#heading {color:#000099; } This means a paragraph with an ID of heading would be dark blue (000099) from the more specific p#heading rule but would also be bold because the more specific font weight property coming before.

Linking and Importing CSS Keep your style sheet info in a separate document ◦ Separates content from presentation ◦ Can apply same style sheet to multiple pages  Create one design for your entire web site Two ways to attach CSS style sheet ◦ Link (most common)

Attaching CSS All 3 attributes are required Value of rel attribute is almost always stylesheet Value of type is always text/css

Attaching (“path_to_css_document” ) ; Importing your style sheet through the special CSS 2iport rule….appears within an XHTML style tag:

Getting started with CSS Why use them? ◦ Give greater control over the presentation and formatting of your site ◦ Can place styles within a web site or use external style sheets What tag do we use? ◦ Style tag after the head tag

Tag block, selectors, etc. Within the tag block you will create your stlye rules Each rule has a selector ◦ Many types ◦ We will first use element selector  This means an XHTML element is being used somewhere on the page and we want to format the element accordingly ◦ Declarations are made after the selector  Made up of property and value

Property and values Separated by a colon ( : ) Each pair is separated from each other pair by a semi colon ( ; ) Entire block of declarations is wrapped by a pair of curly braces to offset it from the selector p {color:#ff0000;}

Creating a CSS of your own Terms to understand ◦ FIXED ◦ ELASTIC ◦ LIQUID ◦ HYBRID

Fixed CSS Column width is specified in pixels Column does not resize based on the size of the browser or the site visitors text settings

Elastic CSS Column width is specified in a unit of measurement (ems) relative to the size of the text The design adapts if the site visitor changes the settings, but does not change based on the size of the browser window

Liquid CSS Column width is specified as a percentage of the site visitors browser width The design adapts if the site visitor makes the browser wider or narrower, but does not change based on the site visitors text settings

Hybrid Columns are a combination of any of the previous three options For example, the 2 column hybrid, right side bar layout has a main column that scales to the size of the browser and an elastic column on the right that scales to the size of the site visitors text settings