Sunteți pe pagina 1din 5

HTML TAGS

 <HTML></HTML> The container for a complete HTML document

 <BODY></BODY> This element contains the body of your website document. If a


<HEAD> section is present in the page then the body must be placed after this section.

 <HEAD></HEAD> Container for elements describing the current document. This section
contains no contents the browser should display in the body of the text.
The following elements are allowed inside the HEAD section:

BASE
BASEFONT
BGSOUND
ISINDEX
LINK
META
SCRIPT
STYLE
TITLE

 <FORM></FORM> HTML form tags. Create a form inside a document.

Code:-
<FORM method="post" action="_URL_" onreset="alert('The form is reset')">
<TABLE>
<TR><TD>Name </TD><TD><INPUT type="text" name="name"></TD></TR>
<TR><TD>E-mail</TD><TD><INPUT type="text" name="email"></TD></TR>
<TR><TD colspan="2">Where are you from?
<SELECT name="findout">
<OPTION>Australia
<OPTION>USA
<OPTION>Japan
</SELECT></TD></TR>
<TR><TD colspan="2" align="center">
<INPUT type="submit" value="Send values">
<INPUT type="reset" value="Reset form"></TD>
</TR>
</TABLE>
</FORM>

 <H1></H1> The elements H1, H2, H3, H4, H5 and H6 are used to create several levels
of headers, with H1 as the most important header and H6 as the least important.

Code:-
<H1 >Level 1 header</H1>
<H2 >Level 2 header</H2>
<H3 >Level 3 header</H3>
<H4>Level 4 header</H4>
<H5>Level 5 header</H5>
<H6>Level 6 header</H6>

 <HR> Draw a horizontal rule.

Code:-
<HR size="2" width="50%" align="left" color="red" noshade size="5">

 <I></I> Italic text .Change the text to italic. <italic></italic> can also be used.

Code:-
Change all or part <i>of you text to Italic</i>

 <IMG> Inserting an Image.

Code:-

<img src="C:/>images/horse.jpg" width="100" height="100" border="0" alt="Horse">

 <LI></LI>List tags Identify an item in a list

Code:-

<MENU>
<LI type="circle">The first item in the list.
<LI type="square">The second item.
<LI type="disc">And the last item.
</MENU>

 <MARQUEE></MARQUEE> HTML marquee tag. This element is a container that


enables you to create a scrolling text marquee.

Code:-

<MARQUEE bgcolor="yellow" direction="right" loop="20" width="75%">


<STRONG>This is cool!</STRONG></MARQUEE>

 <OPTION></OPTION> This describes an option in a listbox of a form.

Code:-

<FORM>
What beer would you like today Sir?:
<SELECT>
<OPTION selected value="Fosters" >Fosters
<OPTION value="XXXX">XXXX
<OPTION value="Red Dog">Red Dog
</SELECT>
</FORM>

 <S></S> Render text as strikethrough.

Code:-

This is the new craze where <s>you can strike out</s> text *smiles*

Example:-
This is the new craze where you can strike out text *smiles*

 <SELECT></SELECT> This element lets you create a listbox as an input field on a


form.

Code:-

<FORM>
What do you want on your pizza :
<SELECT>
<OPTION value="pepper">Extra peppers
<OPTION value="cheese" selected>Extra cheese
<OPTION value="pepper;cheese">Extra peppers & extra cheese
</SELECT>
</FORM>

 <STRONG></STRONG> Render the text with strong emphasis.

Code:-

This tag gives <strong>your text </strong>a strong look.

 <SPAN></SPAN> This element is used to create a structure in a document. By using


this element you can give a part of the document a name, or apply style sheet
information to the part.

Code:-

<span style="background-color: #FFFF00"> we will highlight this text.</span>.

 <SUB></SUB> This is a container for text that should be displayed as a subscript, and,
if practical, using a smaller font (compared with normal text).

Code:-

The <SUB> element lets you specify elements as


B<SUB>2</SUB>H<SUB>1</SUB>T<SUB>3</SUB>

Example:-
The <SUB> element lets you specify elements as B2H1T3.

 <SUP></SUP> Display the text as a superscript

Code:-

This <SUP> tag lets you specify a trademark <SUP>(TM)</SUP> correctly

Example:-

This tag lets you specify a trademark (TM) correctly.

 <TABLE></TABLE>
HTML table tags. Create a table layout which can contain cells in rows and columns.
The cells of a table are specified with the TR and TD elements.

Code:-

<TABLE border="5" width="50%" align="right" background="#FFFFFF">


<TR>
<TD><SPAN style="color: #000">Your TextHere.</SPAN></TD>
<TD><SPAN style="color: #000">Your Text Here.</SPAN></TD>
</TR>
</TABLE>

 <UL></UL>
Create an unordered list of items, where unordered means the individual items are not
numbered, but have a bullet in front of them. If you want numbered items use an ordered
list. The items in the list are identified with the LI element.

Code:-

Nested unordered lists with assigned types :


<UL type="square">
<LI>The first of the list.
<LI>The second of the list.
<UL type="disc">
<LI>The first of the nested list.
<LI>The second of the nested list.
</UL>
</UL>

 <U></U>
Underline your text.

 <TR></TR>
Define a row inside a table.
 <TD></TD>
HTML table tags. The container for a cell in a table. Inside this you can put all the HTML
coding
you want to appear in the cell.

 <SMALL></SMALL> Draw the text using a smaller font than the one that is used for
normal text.

 <Q></Q> This is used to enclose short quotations from other works in the page.

Example:

This tag is used to enclose short “quotations “from other works in the page.

 <PRE></PRE> This element allows you to show preformatted text as it is, using the
supplied whitespace of the text.

 <P></P> This indicates a paragraph in the document. It is a container but most browsers
allow you to omit the closing element.

 <META> This element supplies meta-information about the current document.

 <DIV></DIV> HTML DIV tags. This element is a general container for a part of the
contents of a page. Through the DIV element you can add attributes, like style
information, to this whole division. The DIV element will not show anything when used
without any other attribute. A division will terminate a paragraph opened with the P
element.
<DIV align="center"> is the same as the deprecated <CENTER> element.

 <COMMENT></COMMENT> Used to insert comments in the HTML source which will be


ignored by the browser. All HTML elements inside the comment will be ignored. You can
use this code to put comments in your pages, which can help you when you have to edit
the source later.
HTML generating programs sometimes store program-specific information inside
comments,
so they will not be visible, but still available to the program.
This code is not a container, but inside it you can put one or more comments,
by surrounding with "--". The end of the code is indicated with the sequence -->.

 <BR> Line Break. Break the current line and continue on the next line

 <BIG></BIG> Increase the current size of the font by 1. The maximum size is 7.

 <B></B> Change your website text to bold.

<bold></bold> or <strong></strong> can also be used.

S-ar putea să vă placă și