Home | Ajax | BioInformatics | Dojo | EAI | EJB | Hibernate | J2ME | Java | Java Glossary | Java Servlets | JavaScript | Jboss | JDBC | JDO | Jmeter | JSF | JSP | JUnit | Maven | MySQL | Spring Framework | SQL | Struts | Technology | WAP | Web Services | XML


 
  
 
Programming Tutorials: Ajax | Articles | JSP | Bioinformatics | Database | Free Books | Hibernate | J2EE | J2ME | Java | JavaScript | JDBC | JMS | Linux | MS Technology | PHP | RMI | Web-Services | Servlets | Struts | UML
 

 
Facing Programming Problem?
Ask Questions?, Browse Latest Questions, Question-Answer Guidelines
Java
  JDO Tutorials
  EAI Articles
  Struts Tutorials
  Java Tutorials
  Java Certification
  Java Applet
Questions
Comments

HTML Document Creation

                         

We have already come to know about the Java Applets to be embedded within the HTML pages. There are several tags used in HTML however in this section we will provide an  introduction to HTML for Java programmers.

We have already learned the following tags.

* <HTML> HTML tag
* <HEAD> Header tag that can contain document information
* <TITLE> Header title tag that contains the document title
* <BODY> Body tag
* <H1>-<H6> Body heading tags
* <P> Body paragraph tag
* <BR> Body line breaks
* <APPLET> Java applet tag 

Additional Header Information

As we know how to use the HEAD and the TITLE tags, there are two more additional tags which are commonly used to insert the information into the HTML file.

The <META> Tag

The header tag can also contains the meta tag. Each document can contain an unlimited number of META tags. This data is a miscellaneous information that may be of use to someone that views the HTML source at a later date. 

 <META> has three attributes:

NAME-Used to define what information is stored in the current META tag. If NAME is used, HTTP-EQUIV should not be. 

CONTENT-The CONTENT attribute defines the actual contents of the META tag. 

HTTP-EQUIV- This enables the HTML author to tie the contents of a META tag to an HTTP server's response header. NAME should not be used if HTTP-EQUIV is used, NAME should not be. 

Lets tweak the example:
<HTML>
<HEAD>
<TITLE>Sample Meta Information</TITLE>
<META NAME="Creation_Date" CONTENT="May 4, 2000">
<META NAME="Author" CONTENT="Jennifer">
</HEAD>
</HTML> 

The <BASE> Tag

To furnish a self-referencing URL for the document HTML  provides a <BASE>tag. This enables the remaining URLs to contain relative location information within the document instead of continually "hard-wiring" themselves. This is useful if a document is being used again and again at several locations.  The BASE tag has one attribute:

HREF-The HREF attribute is used to store the URL of the document containing the BASE tag. 

Overall Document Formatting

Several tags provided by HTML allow the document to provide a more visually appealing appearance by modifying the BODY Tag. It has several attributes. These attributes include the BGCOLOR, BACKGROUND, TEXT, LINK, VLINK, and ALINK attributes.

* BGCOLOR-Sets the background color of the document.
* BACKGROUND-Designates the URL of the background image to be used.
* TEXT-Sets the color of regular text (overrides browser defaults).
* LINK-Sets the color of hyperlinks (overrides browser defaults).
* VLINK-Sets the color of visited links (overrides browser defaults).
* ALINK-Sets the color of active links (overrides browser defaults). 

Complete Text Formatting

Text Formatting is the ability to change the size, type, and color of fonts, modify the highlighting of characters to show emphasis, and add onscreen effects such as horizontal lines and background coloring. 

Text Tags

The modification of various character styles to add effects to a document is done by the Text Tags. The following paragraphs shows the most popular of these styles, 
The <B>…</B> and <STRONG>…</STRONG> tags are used to boldface text. For these tags  simply place the text to be made bold within these tags.

Italicizing Text

The <I>…</I> and <EM>…</EM> tags are used to italicize text.
Setting the Base Font

The BASEFONT tag forces the size of all text within the page. It has one attribute, SIZE.

The syntax is

<BASEFONT SIZE=25> 

Using Anchors to Create Hyperlinks

The ability to create hyperlinks to other documents is accomplished by the Anchors. To embed these hyperlinks as part of the current document with the implementation hidden from the reader. HTML allows the creation of these hyperlinks through the use of the Anchor (<A>…</A>) tag.

The <A>…</A> tag by itself does nothing. To create hyperlinks, the <A>…</A> tag must be used in conjunction with one of its attributes such as HREF or NAME. 

Linking to Another URL

The HREF attribute is used to link to another URL from the current document. The <A> tag is called an anchor because it "anchors" text to a URL. Here is the syntax:

<A HREF="URL">LocationNameInText</A> 

The actual location name displayed to the user is not an actual attribute. Instead, it is "anchored" to the HREF attribute.

Linking within the Page

The NAME attribute is used to jump to a location at the end of the document to point to a remote URL. Using the NAME attribute actually requires two steps:
Using an anchor to set a link to the NAMED location.
Setting the NAMED location through the use of the # character.
The syntax is

<A HREF="#named_location">named_location_text</A>
.
.
.
<A NAME="named_location">link_name_text</A>

HTML and Images

We can improve the document's visual appeal by adding images to an HTML document. The HTML IMAGE tag is used to accomplish this task. The basic syntax for using the IMAGE tag is the following:

<IMG SRC="graphic_URL"> 

The following list gives more information on IMAGE tag attributes.

1. SRC-Used to set the URL of the image being loaded.
2. ALT-Contains text that will be displayed in text-only browsers (or browsers that have image-loading turned off).
3. ALIGN-Can be one of two possible values: TOP or MIDDLE. These values behave the same as the APPLET tag's ALIGN attribute.

                         

Leave your comment:

Name:

Email:

URL:

Title:

Comments:


Enter Code:

Audio Version
Reload Image
 

Note: Emails will not be visible or used in any way, and are not required. Please keep comments relevant. Any content deemed inappropriate or offensive may be edited and/or deleted.

No HTML code is allowed. Line breaks will be converted automatically. URLs will be auto-linked. Please use BBCode to format your text.

Add This Tutorial To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Latest Searches:
Refresh a Web Page Usi
what is rfc ?
cashier
J2ME and WAP
enumerations
java source code for c
delete statement form
jsp standard tags
drow rectangular
inserting Data into th
what is rfc
filereader
strutstext field and
distributed transactio
sql timestamp examples
mdb
launch dialog with but
array
Combo Box Using Ajax I
average numbers
ASP Form Processing Se
java e-books
struts option tag
hibernate type
Photoshop Drawing Penc
<jsp:include> example
combobox using ajax
Flex Java Tutorial
Ñ?â??еâ?¬Ð°Ñ?â??вÑ?â
accessing database fro
Photoshop Effects Parc
ajax examples java
java.lang.ArrayIndexOu
jsp action tags
servlet quetion and an
cache in hibernate
how to call pl/sql fro
Stateful Session EJBs:
paging
IgnoreCase() in java
program in java to dra
change password using
previous year's date
input charaters in arr
dojo tree
insert fields blob
actions erros validate
how to convert a numbe
tuxedo
�¡?� ??�¡?� ??
image on click in jsp
Convert String to Bool
struts ejb hibernate i
mvc hibernate
precision
how to get the checkbo
The Java X10 Project
calculate the occurren
count the number of di
ASP Form Processing Se
hibernate findall
concatenate java
count line
circle
Connection Pooling cod
architecture
Display detailed cloc
BLAG Linux and GNU 300
how to join two table
struts file upload max
yield,stop,sleep in th
hybernate annotations
multithreads
how to concate two str
spring applicationcont
break�?????�??
jboss portal
Combo Box operation in
Connecting to the Data
implicit objects in js
Java String toLowerCase Example
Java String toCharArray Example
Java String substring Example
Java String indexOf Example
Java String startsWith Example
Java String hashCode Example
Java String matches Example
Java String length Example
Java String lastIndexOf Example
Java String isEmpty Example
Java String equalsIgnoreCase Example
Java String equals Example
Java String endsWith Example
Java String copyValueOf Example
Java String contentEquals Example
  EAI Articles
  Java Certification
Tell A Friend
Your Friend Name
Search Tutorials

 

 
 
Browse all Java Tutorials
Java JSP Struts Servlets Hibernate XML
Ajax JDBC EJB MySQL JavaScript JSF
Maven2 Tutorial JEE5 Tutorial Java Threading Tutorial Photoshop Tutorials Linux Technology
Technology Revolutions Eclipse Spring Tutorial Bioinformatics Tutorials Tools SQL
 

Home | JSP | EJB | JDBC | Java Servlets | WAP  | Free JSP Hosting  | Search Engine | News Archive | Jboss 3.0 tutorial | Free Linux CD's | Forum | Blogs

About Us | Advertising On RoseIndia.net  | Site Map

India News

Indian Software Development Company | iPhone Development Company in India | Java Training Delhi | Java Training at Noida |

Send your comments, Suggestions or Queries regarding this site at roseindia_net@yahoo.com.

Copyright © 2008. All rights reserved.