Help page to write
HTML tags
with PHP
For a better understanding you
can download this helper
http://www.idiap.ch/~carron/classes/html.class/docs.zip
By Tristan Carron
Html.class.php V1.6
A
PHP A($url, $txtLinks)
// The <A HREF tag is used to link pages together
// It must contain both parameteres
Abbr
PHP Abbr($text, $class)
// The abbreviation tag defines an abbreviation.
// It is typically displayed just like normal text,
// but is used by automatic indexers
Acronym
PHP Acronym($text, $class)
// The acronym tag defines an acronym. It is
// typically displayed just like normal text, but
// is used by automatic indexers
Address
PHP Address($text, $class)
// The address tag defines text that gives an address
// information. It is typically displayed in italics,
// slightly indented, and is used by automatic indexers
Anchor
PHP Anchor($url, $text, $class)
// The anchor tag defines a link or an anchor in a document.
// The anchor tag must contain either a NAME
// attribute or an HREF attribute, or both.
Applet
PHP Applet($code, $name, $codeBase, $width, $height, $alt, array $param, array $paramData, $class)
// The Java applet tag runs a Java applet referred to by a URL.
// applet-content consists of optional PARAM tags, ordinary text
// and markup to be displayed by browsers that cannot run Java
// applets, and a TEXTFLOW tag if no ordinary text and markup is
// included WARNING does not work with all the browser...
Au
PHP Au($text, $class)
// The au tag defines text that names the author
// of a document. It is typically displayed just like
// normal text, but is used by automatic indexers
Author
PHP Author($text, $class)
// The author tag defines text that names the author
// of a document. It is typically displayed just like
// normal text, but is used by automatic indexers
Base
PHP Base($url, $target)
// The base tag, which is valid only in the HEAD section,
// defines the base address of an HTML document, which is used
// to determine the full address of relative URL"s that appear
// in the document. The typical use for this is to move an HTML
// document to another site without moving all the images and
// related documents with it: the base URL can be set to the
// directory where those images and documents remain. The
// “default target” will become
// the target for all links unless specified explicitly
// the different target are : _parent, _top, _self, _blank
BaseFont
PHP BaseFont($face, $color, $size)
// The base font tag defines the base that
// relative FONT changes are based on. (Default is 3.)
// WARNING this tag as to be put in the head section
Bdo
PHP Bdo($text, $direction, $lang, $class)
// function to invert a texte with the prams.
// rtl : right to left
// ltr : left to right
BgSound
PHP BgSound($url, $loop)
// The background sound tag identifies a .wav, .au, or .mid
// resource that will be played when the page is opened.
// The optional LOOP attribute will cause the resource to
// be played n times. LOOP="INFINITE" will cause the resource
// to be played continuously as long as the page is open
// WARNING works only with Internet Explorer
Big
PHP Big($text, $class)
// The big text tag defines text that should
// be displayed in a larger font than usual
Blink
PHP Blink($text, $class)
// The blink tag highlights the text
// by having it blink on and off
BlockQuote
PHP BlockQuote($text, $class)
// The <blockquote> tag is supposed to contain
// only block-level elements within it, and not
// just plain text.
Body
PHP Body()
// The body tag introduces the body of the document.
// It should appear after the head section and
// occupy the remainder of the document
BodyEnd
PHP BodyEnd()
// the function to close the <BODY> tag
Bold
PHP Bold($text)
// to put the text in bold
Br
PHP Br()
// to do a line return
Button
PHP Button($text, $type, $name, $value, $action, $nameAction, $disabled, $class)
// Defines a push button. Inside a button
// element you can put content, like text or images.
// This is the difference between this element
// and buttons created with the input element.
// the type can be : submit, reset, button
Caption
PHP Caption($text, $class)
// This element defines a table caption.
// The <caption> tag must be inserted immediately after
// the <table> tag. You can specify only one caption per
// table. Usually the caption will be centered above the table.
Center
PHP Center($text, $class)
// The center tag defines text that should be centered
Cite
PHP Cite($text, $class)
// The citation tag defines text that cites a
// book or other work -- most browsers will
// display it in italics
Code
PHP Code($text, $class)
// The code tag defines text that should be
// shown in a fixed width font. It can be nested
// with other idiomatic or typographic tags but some
// browsers will respect only the innermost tag. Many
// browsers use the same font for the KBD, SAMP, TT and CODE
// tags. For many lines of fixed width text, with the line
// breaks and other whitespace specified by the page author, use
// the PRE tag
ColGroup
PHP ColGroup($span, array $width)
// Defines the attribute values for one or more
// columns in a table. You can only use this element
// inside a colgroup. Use this element when you want
// to specify different attribute values to a column
// inside a colgroup. Without a col element a column
// will inherit all its attribute values from the
// column group.
Comment
PHP Comment($text)
// The comment tag includes the actual comment text
Dd
PHP Dd($text)
// The <dd> tag defines the description of a
// term in a definition list.
Del
PHP Del($text, $class)
// The deleted text tag marks text that has been
// deleted, for example in a group authoring situation
// or a legal document
The deleted text tag marks text that has been deleted, for example in a group authoring situation or a legal document
Dfn
PHP Dfn($text, $class)
// The definition tag defines text that defines a
// term -- many browsers will display it in italics,
// though others will ignore it. It can be nested with
// other idiomatic or typographic tags but some browsers
// will respect only the innermost tag
Div
PHP Div($align)
// function to open a div tag to align or put classes
DivEnd
PHP DivEnd()
// function to close the div tag
DlEnd
PHP DlEnd()
// The </dl> tag defines the end of a definition list.
DlStart
PHP DlStart($compact)
// The <dl> tag defines a definition list.
Dt
PHP Dt($text)
// The <dt> tag defines the start of
// a term in a definition list.
Embed
PHP Embed($url, $width, $height, $loop, $play, $quality, $scale)
// The embed element is used to embed a
// plugin into a document. The OBJECT tag
// can also be used to embed objects
// the loop arameter will be false if anything is set
// the play arameter will be false if anything is set
// the different quality are : Low, Auto Low, Auto High, High
// scale arameter are : Default(show all), No border, Exact fit
FieldSetEnd
PHP FieldSetEnd()
// The fieldSetEnd() close the fieldset tag
FieldSetStart
PHP FieldSetStart($class)
// The fieldset element draws a box
// around its containing elements.
Font
PHP Font($text, $face, $color, $size)
// The font tag defines text with a smaller or larger
// font than usual. The normal font size corresponds to 3;
// smaller values of number will produce a smaller font,
// and larger values of number will produce a larger font
// the ypescrip fonts are : Times, Arial, Courier, Verdana,
// Geneva and Georgia
Form
PHP Form($action, $method)
// The form tag introduces a form, which is made up
// of INPUT elements, described in the sections that follow.
// A form may be inside HTML tags and may also contain
// structural tags. Using tables and other elements a form
// can take on various shapes and look
FormEnd
PHP FormEnd()
// to close the tag form
Frame
PHP Frame($url, $name, $noresize, $scrolling, $frameborder, $longdesc, $marginheight, $marginwidth)
// the frame tag to define the page to load
// the scrolling tag must by : ‘YES’, ‘NO’, ‘AUTO’
FrameSetCols
PHP FrameSetCols(array $cols)
// the framesetCols tag define a new set of frame sort by cols
FrameSetEnd
PHP FrameSetEnd()
// the tag to close the frameset
FrameSetRows
PHP FrameSetRows(array $rows)
// the framesetrows tag define a new set of frame sort by rows
H
PHP H($text, $size)
// The heading tag defines a level heading.
// It is typically shown in a very large bold
// font with several blank lines around it
Head
PHP Head($title, $typeScript, $script)
// The head tag introduces text that describes
// an HTML document. Most documents have only a
// TITLE tag in the head section
// you can add a script too example : JavaScript
HeadEnd
PHP HeadEnd()
// the function to close the <HEAD> tag
Hr
PHP Hr($align, $width, $size, $shade, $color, $class)
// The horizontal rule tag causes a horizontal
// line to be drawn across the screen. There is no </HR> tag
HtmlEnd
PHP HtmlEnd()
// the </HTML> tag should be the last of the entire document
HtmlStart
PHP HtmlStart()
// The HTML tag defines an HTML document.
// The <HTML> tag should be the first in the entire
// document
I
PHP I($text)
// The italic tag defines text that should be shown in italics
Iframe
PHP Iframe($url, $align, $frameborder, $width, $height, $longdesc, $marginheight, $marginwidth, $name, $scroll)
// define the Frame and frameset tag
// to create multiple pages
// the scrolling param must 'YES', 'NO', 'AUTO'
Image
PHP Image($url, $width, $height, $border, $alt, $map, $class)
// The inline image tag displays an image referred
// to by a URL. It must contain at least an SRC attribute.
Input
PHP Input($type, $name, $value, $size, $maxLength, $checked, $alt, $id, $class)
// the input tag must be between to form tags and it must
// contain the type, text, password, checkbox, radio
// submit, reset, file, hidden, image or button
Ins
PHP Ins($text, $class)
// The inserted text tag marks text that
// has been inserted, for example in a group
// authoring situation or a legal document
Kbd
PHP Kbd($text, $class)
// The keyboard tag defines text that should be shown
// in a fixed width font. It can be nested with other
// idiomatic or typographic tags but some browsers will
// respect only the innermost tag
Label
PHP Label($text, $for, $class)
// Defines a label to a control.
// If you click the text within the
// label element, it is supposed to toggle
// the control.
Legend
PHP Legend($text, $align, $class)
// The legend element defines a caption for a fieldset.
// pram align = center, left, right
Map
PHP Map($name, $shape, $coords, $url, $alt, $title, $target, $class)
// The map tag defines a client side image map
// It gives a name to a collection of AREA tags
// that are superimposed over an inline image
// to connect user clicks with URLs
// the different shape for the area are : rect, circle, poly
// and the target are : _self, _blank, _parent, _top
Meta
PHP Meta($author, array $keywords, $descr, $lang, $robots, $reply)
// The meta tag, which is only valid in a HEAD section,
// declares HTTP meta name/value pairs that are associated
// with the HTML document. These are used to extend the
// HTTP header information returned by the HTTP server.
// The support of the meta information is HTTP server specific.
// If a name attribute is not specified the HTTP-EQUIV attribute
// is used as the name. This tag can also be used
// to trigger client side behaviour
NoBr
PHP NoBr($text, $class)
// The no break tag defines a block of text
// which will have no line breaks except
// those explicitly requested with BR or suggested with WOBR
NoFrame
PHP NoFrame()
// The NOFRAMES tag specifies HTML that can be
// used by browsers that do not support
// frames. Everything between the start and
// end tag is ignored by browsers that understand frames
// should be put before the <body> tag
NoFrameEnd
PHP NoFrameEnd()
// function to close the <NOFRAME> tag
// should be put after the closed </body> tag
NoScript
PHP NoScript($text)
// The noscript element is used to define
// an alternate content (text) if a script is NOT executed.
// This tag is used for browsers that recognizes the <script>
// tag, but does not support the script in it.
Ol
PHP Ol($type, array $text, $start, $value, $class)
// The ordered list tag introduces an ordered (numbered)
// list, which is made up of List Item (LI) tags
// the type of bullets are 1, a, i, A, I
P
PHP P($text, $class)
// The <p> tag defines a paragraph.
Pre
PHP Pre($text, $width, $class)
// The pre element defines preformatted text. The text enclosed
// in the pre element usually preserves spaces and
// line breaks. The text renders in a fixed-pitch font.
Q
PHP Q($text, $class)
// The <q> tag defines the start of a short quotation.
S
PHP S($text, $class)
// The strikethrough tag defines text that
// should be shown with a horizontal line through it
Samp
PHP Samp($text, $class)
// Defines sample computer code
Script
PHP Script($text, $type)
// Defines a script, such as a JavaScript.
Select
PHP Select(array $text, $name, $selected, $size, $id, $class)
// The select tag specifies a multiple line selection
// box field within the form that contains it. User can select
// one or more lines if the attribute MULTIPLE is specified.
// The NAME attribute is a required and is used to identify the
// data for the field. The SIZE attribute specifies the number
// of lines of selections that are to be displayed
Small
PHP Small($text, $class)
// The small text tag defines text that should
// be displayed in a smaller font than usual
Sp
PHP Sp($nbr) // These escape sequences are used to
// enter characters such as <, >, &, and “ into HTML documents
Span
PHP Span($text, $style, $class)
// The <span> tag is used to group inline-elements in a
// document. one way to put color in document :
// style="color:#FF0000"
Strike
PHP Strike($text, $class)
// The strikethrough tag defines text that
// should be shown with a horizontal line through it
Strong
PHP Strong($text, $class)
// The strong tag defines text that should be
// strongly emphasized most browsers will display it in boldface
Style
PHP Style($url)
Sub
PHP Sub($text, $class)
// The subscript tag defines text that should be
// displayed in a smaller font than usual, lower
// on the line than usual
Sup
PHP Sup($text, $class)
// The superscript tag defines text that should
// be displayed in a smaller font than usual
// higher on the line than usual
TblCell
PHP TblCell($contenu, $width, $height, $bg, $align, $nbLig, $nbCol, $class)
// TblCell : easy to use to insert a new cell, open and close it
TblEnd
PHP TblEnd()
// TblEnd : end of the table, we close the tag
TblEndCell
PHP TblEndCell()
// TblEndCell : end of the cell, we close the tag </TD>
TblEndLine
PHP TblEndLine()
// TblEndLine : end of the line, we close the tag </TR>
TblEntete
PHP TblEntete($content, $bg, $nbLig, $nbCol)
// TblEntete : it is made to set up the title of the table
TblStart
PHP TblStart($bordure, $width, $height, $espCell, $rempCell, $bordercolor, $class)
// TblsStart : start of the table, we open the tag
TblStartCell
PHP TblStartCell($width, $height, $bg, $align, $nbLig, $nbCol, $class)
// TblStartCell : start a new cell with the tag <TD>
TblStartLine
PHP TblStartLine($align, $bg, $class)
// TblStartLine : start of a new line with the <TR>
TextArea
PHP TextArea($text, $name, $cols, $rows, $wrap, $class)
// The text area tag specifies a multiple line text area
// field within the form that contains it. The NAME attrib. is a
// required field and is used to identify data for the field.
// The COLS attribute specifies the width of the text area.
// The ROWS attribute specifies the number of lines.
// The content is used as an initial value for the field.
// The field can be scrolled beyond the COLS and ROWS size to
// allow for larger amounts of
// text to be entered. The wrap attribute can have values of
// OFF, SOFT and HARD
Tt
PHP Tt($text, $class)
// The teletype tag defines text that should be
// shown in a fixed width font
U
PHP U($text, integer $class)
// The underlined tag defines text that
// should be shown with a line underneath it
Ul
PHP Ul($type, array $text, $value, $class)
// The unordered list tag introduces an unordered
// (bulleted) list, which is made up of List Item (LI) tags
V
PHP V($text, $class)
// Defines a variable
|