My First Web Page Hello World">

Presentation is loading. Please wait.

Presentation is loading. Please wait.

XHTML Basics. What is XHTML? XHTML is newer than the old HTML XHTML has stricter rules and does not allow some elements formerly used in HTML One benefit.

Similar presentations


Presentation on theme: "XHTML Basics. What is XHTML? XHTML is newer than the old HTML XHTML has stricter rules and does not allow some elements formerly used in HTML One benefit."— Presentation transcript:

1 XHTML Basics

2 What is XHTML? XHTML is newer than the old HTML XHTML has stricter rules and does not allow some elements formerly used in HTML One benefit of using XHTML is that it helps make web pages look identical in different browsers, such as Internet Explorer, Firefox, Safari, etc. XHTML is used to define and organize the page content but not to format or style it.

3 A basic XHTML document: My First Web Page Hello World

4 DOCTYPE must be specified on the first line: The DOCTYPE tells the web browser which language is being used for the set of instructions that follow. In this class, we will be using XHTML Transitional, which allows us more flexibility than XHTML Strict.

5 In XHTML, all elements must be in lowercase (the DOCTYPE line is not an element.) My First Web Page Hello World

6 Each element must have a beginning and an end: My First Web Page Hello World

7 Elements must be properly nested: My First Web Page Hello World

8 What is wrong with this? My Favorite Things Brown paper packages Tied up with strings

9 What is wrong with this? My Favorite Things Brown paper packages Tied up with strings The tags are overlapped.

10 White space doesn’t matter. The browser will ignore blank lines and multiple spaces: First Item Second Item First Item Second Item is the same as: We can take advantage of this fact by putting blank lines and indents in our code to make it easier to organize and read.

11 Summary of XHTML Basics: DOCTYPE must be specified first. All elements must be in lowercase. Each element must have a beginning and an end. Elements must be properly nested. White space doesn’t matter.


Download ppt "XHTML Basics. What is XHTML? XHTML is newer than the old HTML XHTML has stricter rules and does not allow some elements formerly used in HTML One benefit."

Similar presentations


Ads by Google