HTML02 Create an HTML document giving details of your name, age, telephone etc. aligned in proper order

By | January 6, 2018

Create an HTML document giving details of your name, age, telephone number, address, TLC code & enrolment number aligned in proper order.

Special Characters

You have seen that there are certain characters that have special meaning in HTML code. For example, the “< ” and “ > ” characters delimit tags. If you want to display such characters on the web page, you have to take care that the characters are not interpreted and are displayed literally. To display the “< ” character, it can be specified as “&lt”. The “&” interprets the “lt” as the “< ” symbol and displays it. But now what if you want to display the & symbol itself? Simply writing “&” in the code will not display it. But first, let us see how to display some special characters.

The browser will display your text in a steady stream unless you tell it to do so otherwise with line breaks. It will reduce any amount of white space to a single space. If you want more spaces, you must use the space character (&nbsp;). If you hit Return (or Enter) while you are typing, the browser will interpret that as a space unless there is already a space there.

HTML_Special_Character_Page

HTML_Special_Character_Source_Code

 

 Create an HTML document giving details of your name, age, telephone number, address, TLC code & enrolment number aligned in proper order.

HTML_Formated_Details_Source_Code

HTML_Formated_Details_Page

Html code:

[codesyntax lang=”html4strict”]

<!DOCTYPE html>
<HTML>
<HEAD>
<TITLE>CSSimplified HTML 2</TITLE>
</HEAD>
<BODY>
<P><B>Name:</B>&nbsp;&nbsp;&nbsp;Gangadhar</P>
<P><B>Age:</B>&nbsp;&nbsp;&nbsp;21 yrs</P>
<P><B>Telephone Number:</B>&nbsp;&nbsp;&nbsp;65771277</P>
<P><B>TLC Code:</B>&nbsp;&nbsp;&nbsp;MSCL016</P>
<P><B>Enrollment Number:</B>&nbsp;&nbsp;&nbsp;071989476</P>
</BODY>
</HTML>

[/codesyntax]

Write above code in any text editor and save by htm or html extension and Open it in any browser by double clicking the file like internet explorer.

 

<!DOCTYPE html>

This tag defines the document type and HTML version.

 

<HTML>….</HTML>

This tag encloses the complete HTML document and mainly comprises of document header which is represented by <head>…</head> and document body which is represented by <body>…</body> tags.

 

<HEAD>….</HEAD>

This tag represents the document’s header which can keep other HTML tags like <title>, <link> etc.

 

<TITLE> CSSimplified HTML 2</TITLE>

The <title> tag is used inside the <head> tag to mention the document title.

 

<BODY>…</BODY>

This tag represents the document’s body which keeps other HTML tags like <h1>, <div>, <p> etc.

 

<P>…</P>

The <p> tag offers a way to structure your text into different paragraphs. Each paragraph of text should go in between an opening <p> and a closing </p> tag.

 

<B>…</B>

Anything that appears within <b>…</b> element, is displayed in bold.

 

The <!DOCTYPE> Declaration

The <!DOCTYPE> declaration tag is used by the web browser to understand the version of the HTML used in the document. Current version of HTML is 5 and it makes use of the following declaration:

<!DOCTYPE html>

There are many other declaration types which can be used in HTML document depending on what version of HTML is being used. We will see more details on this while discussing <!DOCTYPE…> tag along with other HTML tags.

 

Note:- To understand program for sequence in detail Please SEARCH numerically example. HTML01, HTML02, etc