Make "Hello Word" by using XHTML

No beginners guide would be complete while not showing you the way to mention "Hello World". With XHTML this is often pretty straightforward. don't be concerned if you do not perceive everything, it'll all become clear in time. Your "Hello World" web content code sounds like this:
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
<html xml:lang="en" lang="en" xmlns="http://www.w3.org/1999/xhtml">
 <head>
  <title>Hello World</title>
 </head>
 <body>
  <p>My first Web page.</p>
 </body>
</html>
 Now if you run this in the browser like Internet Explore, the browser showing like this picture..
 A Microsoft Internet Explorer window. The title bar contains the text "Hello World". The page contains the text "My first Web page.".


We aren't reaching to worry regarding the code that's a gray color for the present. All you would like to grasp for now's that it tells the pc that this page is in XHTML and therefore the language used is English. This code must be in each page that you just turn out and unharness on a live computer however i am reaching to leave it out till we have a tendency to agitate it later to assist you learn while not it obtaining it the manner. do not sweat it.

XHTML is termed a language as a result of that is what you are doing with it. You price areas of text to point what they mean that the browser will grasp what to try to to with them. this is often done by victimization components. a part consists of 2 tags, a gap tag and a closing tag. Tags use the angle brackets < and > to indicate they're tags, and {also the} closing tag also features a slash /.

Let's scrutinize the document we have a tendency to simply saw to demonstrate this

<title>Hello World</title>



As mentioned higher than the sole distinction between a begin tag associated an finish tag is that the slash .This is often essential because it is that the solely approach the pc is aware of whether or not you're beginning a brand new tag or finishing a previous one.

The name of the gap and shutting tags should be identical, so:
 

<title>Hello World</heading>

 This code is invalid and not working.


As well as containing text like "Hello World" on top of, components will contain alternative components. If we glance simply outside the


<head>
 <title>Hello World</title>
</head>

This is right code.










Next Post Previous Post
No Comment
Add Comment
comment url