INTERNET APPLICATIONS CPIT405 XHTML. Objectives  To understand the structure of the xhtml documents and to create xhtml files with formatting tags. 

Slides:



Advertisements
Similar presentations
HTML I. HTML Hypertext mark-up language. Uses tags to identify elements of a page so that a browser such as Internet explorer can render the page on a.
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.
Learning the Basics – Lesson 1
Internet Services and Web Authoring (CSET 226) Lecture # 5 HyperText Markup Language (HTML) 1.
CSS Cascading Style Sheets. Objectives Using Inline Styles Working with Selectors Using Embedded Styles Using an External Style Sheet Applying a Style.
INTRODUCTION TO HYPERTEXT MARKUP LANGUAGE 1. Outline  Introduction  Markup Languages  Editing HTML  Common Tags  Headers  Text Styling  Linking.
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.
Creating and Editing a Web Page Using Inline Styles
Copyright © 2004 ProsoftTraining, All Rights Reserved. Lesson 3: XHTML Coding © 2007 Prosoft Learning Corporation All rights reserved ITD 110 Web Page.
Site Development Foundations © 2004 ProsoftTraining All rights reserved.
History Leading to XHTML
Hypertext Markup Language. Platform: - Independent  This means it can be interpreted on any computer regardless of the hardware or operating system.
Unit 2, cont. September 14 HTML,Validating your pages, Publishing your site.
Creating and Editing a Web Page
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.
Chapter 2 Introduction to HTML5 Internet & World Wide Web How to Program, 5/e Copyright © Pearson, Inc All Rights Reserved.
HTML Tags. Objectives Know the commonly used HTML tags Create a simple webpage using the HTML tags that will be discussed.
CpSc 462/662: Database Management Systems (DBMS) (TEXNH Approach) HTML Basics James Wang.
Web Design HTML, Frontpage, DreamWeaver μέρος β ΠΡΥ019 - Πληροφορική Δρ.Βάσος Βασιλείου.
Creating and Editing a Web Page
Headings, Paragraphs, Formatting, Links, Head, CSS, Images
Copyright © Texas Education Agency, All rights reserved. 1 Web Technologies Website Development with Dreamweaver.
ULI101 – XHTML Basics (Part II) What is Markup Language? XHTML vs. HTML General XHTML Rules Block Level XHTML Tags XHTML Validation.
Web Technologies Website Development Trade & Industrial Education
Website Development with Dreamweaver
Chapter 1 XHTML: Part I The Web Warrior Guide to Web Design Technologies.
Using Html Basics, Text and Links. Objectives  Develop a web page using HTML codes according to specifications and verify that it works prior to submitting.
1 HTML intro The development of HTMLThe development of HTML The transition from HTML to XHTMLThe transition from HTML to XHTML XHTML syntax, tags, and.
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.
Learning Web Design: Chapter 4. HTML  Hypertext Markup Language (HTML)  Uses tags to tell the browser the start and end of a certain kind of formatting.
Chapter 2 HTML Basics Key Concepts Copyright © 2013 Terry Ann Morris, Ed.D 1.
1 Web Developer Foundations: Using XHTML Chapter 2 Key Concepts.
Programming in HTML.  Programming Language  Used to design/create web pages  Hyper Text Markup Language  Markup Language  Series of Markup tags 
Introduction to HTML. What is a HTML File?  HTML stands for Hyper Text Markup Language  An HTML file is a text file containing small markup tags  The.
HTML Hyper Text Markup Language. What is an HTML File?  HTML stands for Hyper Text Markup Language  An HTML file is a text file containing small markup.
Unit 2, cont. September 12 More HTML. Attributes Some tags are modifiable with attributes This changes the way a tag behaves Modifying a tag requires.
XP Tutorial 9 1 Working with XHTML. XP SGML 2 Standard Generalized Markup Language (SGML) A standard for specifying markup languages. Large, complex standard.
INTRODUCTORY Tutorial 1 Using HTML Tags to Create Web Pages.
Chapter 1 Creating a Dreamweaver Web Page and Local Site
HTML: Hyptertext Markup Language Doman’s Sections.
Lesson 4.
Copyright (c) 2004 Prentice-Hall. All rights reserved. 1 Committed to Shaping the Next Generation of IT Experts. Creating XHTML Documents Essentials for.
HTML Basics BCIS 3680 Enterprise Programming. Web Client/Server Architecture 2  Your browser (the client) requests a Web page from a remote computer.
4 Chapter Four Introduction to HTML. 4 Chapter Objectives Learn basic HTML commands Discover how to display graphic image objects in Web pages Create.
Ali Alshowaish. What is HTML? HTML stands for Hyper Text Markup Language Specifically created to make World Wide Web pages Web authoring software language.
Chapter 2 Web Page Design Mr. Gironda. Elements of a Web Page These are things that most web pages use.
Web Development & Design Foundations with XHTML Chapter 2 HTML/XHTML Basics.
HTML— More Tags, Formatting, and Lists. Formatting Tags  Bold  Italics  Underline  Big text  Small text  Subscript (H 2 O)  Superscript (10 3 )
1 More About HTML Tables and Images. 22 Objectives You will be able to Create tables in HTML. Include images in your HTML page. Create links to other.
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.
COP 3813 Intro to Internet Computing Prof. Roy Levow Lecture 2.
Copyright © 2003 Pearson Education, Inc. Slide 1-1 Created by Cheryl M. Hughes The Web Wizard’s Guide to XHTML by Cheryl M. Hughes.
HTML Concepts and Techniques Fifth Edition Chapter 3 Creating Web Pages with Links, Images, and Formatted 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.
Creating and Editing a Web Page
Introduction to HTML C151 Multi-User Operating 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.
Creating and Editing a Web Page Using Inline Styles
Department of Computer Science, Florida State University CGS 3066: Web Programming and Design Spring
Building a Website: Layout Fall Overall Structure: Home Page Title Section Title Frame Picture UNCP Math Menu Content Footer Contact Information.
HTML. INDEX Introduction to HTML Creating Web Pages Commands And Tags Web Page.
INT222 – Internet Fundamentals
Lesson 5. XHTML Tags, Attributes and Structure XHTML Basic Structure head and body titles Paragraph headings comments Document Presentation Manipulating.
Working with Tables: Module A: Table Basics
Learning the Basics – Lesson 1
Computer Concepts I and II Sue Norris
Cheat Sheet CSCI 100 JW Ryder
Cheat Sheet CSCI 100 JW Ryder
Presentation transcript:

INTERNET APPLICATIONS CPIT405 XHTML

Objectives  To understand the structure of the xhtml documents and to create xhtml files with formatting tags.  To show the difference between three DOCTYPE declarations and to validate the XHTML code according to the DOCTYPE.  To understand the special characters.  To use thead, tfoot and tbody elements for tables.  To setup environment variables in a system.  To learn how to configure the.htaccess and index file.  To learn the basic commands of start and stop the server.

How to Create XHTML file  Use any text editor such as Windows Notepad.  When you save an HTML file, use (.html ) extension by choosing File menu  Save as then write the file name with the extension.

The structure of the XHTML file  XHTML documents require certain mandatory elements.  The html, head, body and title elements must exist. Additionally there must be a DOCTYPE declaration. The DOCTYPE definition specifies the document type.  Your code should look like this:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" " Some Title body of page

Basic XHTML elements, attributes and Attribute Values  For body element:  Inside the tag write these attributes background=” Sunset.jpg” or bgcolor=”red”  You should use a relative path or a full path for the background image  For Headings tags:  you can insert the heading tags inside body and it has 6 tags from to

 To write a paragraph inside the tag:  You can insert the paragraph tag  Open a pargaph tag and write the text “This is a paragraph tag” and then close the tag  The tag has attributes such as align to change the alignment of the paragraph to left, right, center of the page.  To break text inside body, add the empty element and notice the effect of it.  For formatting the text with Boldface, Underline and Italic tags:  Use the tag for boldface type,  for italic  and for underline.  There are other formatting tags listed below you can use them

TagDescription Defines bold text Defines big text Defines emphasized text Defines italic text Defines small text Defines strong text defines strikethrough text Deprecated. Use styles instead

 To make characters subscripted or superscripted  use the or the Example: To write H 2 O you can use the tag  e.g.(H 2 0 ) To write 2 4 =16 you can use the tag e.g.(2 4 =16)

 To format the text with FONT tags  You can format your text using tag.  It has Attributes: size, color, family.  Note: most of font tags are deprecated in HTML5

Exercise:  Create an HTML file to display the following code in the browser and notice the output. Then, modify the HTML code to display the page in figure 1.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" " Some Title This is a h1 heading This is the 1 st paragraph very simple! this text is bold and out of the paragraph this text is underlined and out of the paragraph this text is italic and out of the paragraph

Document Type Definitions  A The DOCTYPE definition line in an XHTML document specifies the document type by referencing a Document Type Definition (DTD). The DTD specifies the syntax and legal elements of an XHTML document.  Three types of documents are defined:

1. Strict <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" " Used when you want to apply the strictest rules. XHTML should not contain any presentational tags. Use Cascading Style Sheets for the display of data. The Strict DTD includes elements and attributes that have not been deprecated.

2. Transitional  Used when your document contains presentational tags.  This is useful for browsers that do not support Cascading Style Sheets.  The Transitional DTD includes everything in the strict DTD plus deprecated elements and attributes.

3.Frameset  This is used when the page contains frames to split the browser window into two or more panes.  The Frameset DTD includes everything in the transitional DTD plus frames as well.

 Example: validate the following XHTML code with transitional DOCTYPE using w3 validator here

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" " Transitional DTD XHTML Example This is a transitional XHTML example

Some questions  convert DOCTYPE to Strict in the above example and then validate the code.  Explain and justify the validator output.

XHTML special characters  Some characters are reserved in XHTML.  e.g. you cannot use the greater than or less than signs within your text because the browser could mistake them for markup.  If you want to force certain characters to show up, you will need to use escape codes instead of those characters.

Escape code is just a programming term for replacing characters that a program uses in a special way with something else. All of these codes start with an & and end with a ; between these characters is either a short mnemonic indicating what the character is or a number code starting with #. The mnemonics are easier to remember, but some of them only work in certain browsers. The number codes will work when the mnemonics don't.

 You will see that s can also be useful when making tables.  & to show a & (ampersand) or &  < to show a < (less-than sign) or <  > to show a > (greater-than sign) or >  Codes for other special characters, such as ¢ £ ¥ ® © ½ ° ± á ç è ñ ö ÷ û ²etc. can be found here: 

Tables The element is used in conjunction with the and elements to specify each part of a table (header, body, footer). Browsers can use these elements to enable scrolling of the table body independently of the header and footer.  The tag must be used in the following context:  As a child of a element, after any, and elements, and before any,, and elements.  The tag must be used in the following context: As a child of a element, after any,, and elements and before any and elements.

 Example:  Note:  Use thead, tfoot and tbody.  Use the special characters codes.  Use colspan attribute of element to merge the cells.

<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Strict//EN" " Special characters and Table example Monthly Savings Month Savings Evaluation January £ 50 February £ 180 > the average March £ 100 = the average Sum £ 330 Tip: The thead, tbody, and tfoot elements will not affect the layout of the table by default. However, you can use CSS to style these elements.

Configuring.htaccess file  By default our servers will look for (in order) a file by the name of index.html, index.cgi, index.php, index.htm, default.htm or home.htm in a given directory and will load the first file it finds as the directory's (or site's) index or "home" page.  If you wish to use an alternate file name as a default index page this can be done by adding the following directive to a.htaccess file stored either in your root directory (if you wish the directive to be in effect for your your entire site) or in a specific folder:

DirectoryIndex filename.ext DirectoryIndex default.php For example if you wish the default index page in a given directory to be "default.php" you would place a.htaccess file in that folder containing the following line:

Things to Note DirectoryIndex page1.html index.html index.php index.htm You can specify multiple file names and the server will look for them in the order you specify and set the first valid file name found as the directory's index page.

 Creating a.htaccess File You can create a.htaccess file on your local computer or on the server.  On your computer: 1. Open Notepad or any other text editor. 2. Put in what you want in the file. 3. Go to Save As, and put ".htaccess" for the filename, including the quotations.  Note: If you save the file as.htaccess it will be hidden and you will not be able to see it in the Finder. Using your preferred FTP client upload the file to the server. The.htaccess file will need to be in the folder where your site is located, typically the root folder (public_html) folder. Also,.htaccess file is used to deny/permit accessing certain specific files in the web server.

Environment variables  An environment variable is a dynamic "object" on a computer that stores a value, which in turn can be referenced by one or more software programs in Windows. Environment variables help programs know what directory to install files in, where to store temporary files, where to find user profile settings, and many other things.

To set JAVA_HOME variable or any other environment variable using GUI : first you need to know the installation path for the Java Development Kit. Open the default installation path for the Java Development Kit C:\Program Files\Java There should be a subdirectory like C:\Program Files\Java\jre7 Once you have the JDK installation path: 1. Right-click the My Computer icon on your desktop and select Properties. 2. Click the Advanced tab. 3. Click the Environment Variables button. 4. Under System Variables, click New. 5. Enter the variable name as JAVA_HOME. 6. Enter the variable value as the installation path for JRE. 7. Click OK. 8. Click Apply Changes. You might need to restart windows.

Setting environment variables using command prompt  Check previous lab slides.

Assignment 2  Write an xhtml code to design the following table Price Item Without taxesWith taxes DVD player Laser printer LCD monitor

We’re done! Thank you for listening