Wednesday, June 1, 2011

HTML: Publishing HTML Source Code on Web Page


If you want to publish HTML source code on webpage you need to take some step on the program.

Example Program
<html>
<head>
                <title>HTML Source code on web page</title>
</head>

<body>

If you want to create a web page, just open any text editor and write the following HTML code
                <p>&lt;html>
                <br>&lt;head>
                <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title>html&lt;/title>
                <br>&lt;/head>
                <br>&lt;body>
                <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This is my first HTML program.
                <br>&lt;/body>
                <br>&lt;/html>
</body>
</html>

Result



















Language Selection on Web Page

To define the language for a web page, lang attribute is used with <html> tag. The code name of a language is used with lang attribute. Such as for English the code is En and within the HTML program –
<html lang=”En”>
It can be writing within the document also. Such as –
<p lang=”En”>
dir attribute is another attribute that is used like as lang attribute.  dir attribute is two types –
dir=ltr
For this attribute the direction of the text will be from left to right. Suct as English Language.
dir=rtl
For this attribute the direction of the text will be from right to left. Suct as Arabic Language.

No comments:

Post a Comment