Docstoc

More familiar with HTML

Document Sample
More familiar with HTML Powered By Docstoc
					More familiar with HTML



After reading the material in Chapter 1 of this you are expected to know about:



  understanding HTML

 Using tags in HTML

 Knowing the list of tags in HTML



  understanding HTML



As explained earlier, HTML (Hyper Text Markup Language) is

symbols or tags that are written in a file that is intended to

display page in web browser. HTML tags always begin and end with <x>

by </ x> where x HTML tags such as b, i, u, and so forth. But there is also a tag that

not end with a </ x> as tag <br>, <input> and others.



A web page will be flanked by tag <html> ... </ html>. HTML files are always

ending with the extension *. htm or *. html. So if you type a text and

save with the extension *. html then you create a formatted HTML file.



  Using tags in HTML



Some examples of the use of HTML tags,

examples of results

This <b> bold </ b> This is bold
<i> italics </ i> This is italics

<u> This is underlined text </ u> This is underlined text

This is line 1 line 2 This <br> line 1

  This is line 2

This horizontal line is a horizontal line <hr>

There are some tags that have attributes in it, such as tag <font>, <table>, <input> and

so on. In the font tag it has several attributes including attributes: color, size, face.

To better understand the attributes see the following example.



<font color="red" face="Arial" size="12"> This is red Arial font and size 12

pt </ font>



This results in red Arial font size 12 pt and



  Color attribute is used to specify the text color.

  The face attribute is used to determine the type of letter.

  Size attribute is used to determine the size of the font.



If you see that the attributes of color are at the beginning, then the second is the face and the

Last is the size. You do not need to care about the order of attributes such as browser

just read the contents of the order of attributes properi not.



   List of Tag in HTML



Here is a table HTML tags and functions:
Key tag



Tag Attribute Description

<html>

</ html> The top line of each HTML file

<head>

</ head> General information from a web page

<title>

</ title> The title of the page. Contained in the head

background

bgcolor

bgsound

font

link

<body>

alink attribute setting for the entire document.

</ body>

vlink

topmargin

leftmargin

marginheight

marginwidth
 Modify Text



Tag Description Example

<b> </ b> Bold text Bold text

Addons </ i> Italic text Italic text

<u> </ u> text underline text underline

<pre> </ pre> Preformatted text Sample text

<h1> </ h1> Header 1 Header 1

<h2> </ h2> Header 2 Header 2

<h3> </ h3> Header 3 Header 3

<h4> </ h4> Header 4 Header 4

<h5> </ h5> Header 5 Header 5

<h6> </ h6> Header Header 6 6

<sub> </ sub> Subscript Subscript

<sup> </ sup> Superscript Superscript




Font



Tag Attribute Description

 color

<font>

Changing the style of a font size.

</ font>

name
Links




Tag Attribute Description

href

target

style

<a> </ a> Creates a link to a document or other sites.

class

name

id



picture



Tag Attribute Description

 src

alt

name

Displaying an image <img>

border

height

width
Formatting



Tag Description Example

 used for

<blockquote>

Sample of text and set text in a block quote format

</ blockquote>

images in a tag

 A. item 1

<ol> </ ol> Ordered List (used

with <li>)

 unordered List

 • Item 1

<ul> </ ul> (used by

<li>)

<li> Element List

<dd> </ dd> Definition List Sample text

Sample text <dt> Term Definition

Definition Description Sample text <dd>

 sample

<p> </ p> Paragraph

text

Replace line <br> Sample

text
The horizontal line <hr>

<center>

 sample

</ center> To centered element



Table



Tag Attribute Description

border

cellpadding

cellspacing

width

height

name

<table> </ table> Set all table elements

id

title

bgcolor

background

align

valign

 height

bgcolor

background

<tr> </ tr> Creating a new line
align

valign

title

 height

width

bgcolor

background

<td> </ td> Making align columns

valign

title

colspan

rowspan

 height

width

bgcolor

background

<th> </ th> align Header (head table). Automatically to the middle and thick.

valign

title

colspan

rowspan

 height

width

<tbody> align

Applicable to the cell format is flanked tag.
</ tbody> valign

bgcolor

background

 height

width

align

<colgroup>

valign format applicable to the column

</ colgroup>

bgcolor

background

colspan



Form



Tag Attribute Description

<form>

 method

</ form>

Set the action elements of the form

name



 text

password

hidden
radio

<input type=> variation of the form element type

checkbox

submit

image

reset

 name

value

 sample tex

text

width

MaxLength

 name

value

 ***********

password

width

MaxLength

hidden name

value is used to create a hidden variable.



 radio 1

radio name

value

radio 2
 name

 Check one

checkbox value

checked

Check 2

submit button value

 src

height

width

image

alt

name

border

value reset Reset

<select> name

</ select> Create a combo-box size. Used together with the option

 selected

 option 1

<option> name

value

 <f ont f ace = "Arial, Helvetic a,

 name

erif sans-s "> Tex t

<textarea> rows

box area. Tex t is betw ee ty ped
</ textarea> cols

the tags </ font>

wrap



no wrap wrap off



virtual word wrap, sent as one line

physical word wrap, sent with breaks



You do not need to memorize all those tags, I'll even break even your head!. enough

memorize the essentials just like <table> <form> <input> <ul>. Did not know was not

okay we can see the list if not forget, it is important we understand, right?.

				
DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
views:1
posted:6/15/2012
language:English
pages:12