Anda di halaman 1dari 10

Tag <!--...--> <!

DOCTYPE> <a> <abbr> <acronym> <address> <applet> <area> <article>New <aside>New <audio>New <b> <base> <basefont> <bdi>New <bdo> <big> <blockquote> <body> <br> <button> <canvas>New <caption> <center> <cite> <code> <col> <colgroup> <command>New <datalist>New <dd> <del> <details>New <dfn> <dialog>New <dir> <div> <dl> <dt> <em>

Description Defines a comment Defines the document type Defines a hyperlink Defines an abbreviation Not supported in HTML5. Defines an acronym Defines contact information for the author/owner of a document Not supported in HTML5. Deprecated in HTML 4.01. Defines an embedded applet Defines an area inside an image-map Defines an article Defines content aside from the page content Defines sound content Defines bold text Specifies the base URL/target for all relative URLs in a document Not supported in HTML5. Deprecated in HTML 4.01. Specifies a default color, size, and font for all text in a document Isolates a part of text that might be formatted in a different direction from other text outside it Overrides the current text direction Not supported in HTML5. Defines big text Defines a section that is quoted from another source Defines the document's body Defines a single line break Defines a clickable button Used to draw graphics, on the fly, via scripting (usually JavaScript) Defines a table caption Not supported in HTML5. Deprecated in HTML 4.01. Defines centered text Defines the title of a work Defines a piece of computer code Specifies column properties for each column within a <colgroup> element Specifies a group of one or more columns in a table for formatting Defines a command button that a user can invoke Specifies a list of pre-defined options for input controls Defines a description of an item in a definition list Defines text that has been deleted from a document Defines additional details that the user can view or hide Defines a definition term Defines a dialog box or window Not supported in HTML5. Deprecated in HTML 4.01. Defines a directory list Defines a section in a document Defines a definition list Defines a term (an item) in a definition list Defines emphasized text

<embed>New <fieldset> <figcaption>New <figure>New <font> <footer>New <form> <frame> <frameset> <h1> to <h6> <head> <header>New <hgroup>New <hr> <html> <i> <iframe> <img> <input> <ins> <kbd> <keygen>New <label> <legend> <li> <link> <map> <mark>New <menu> <meta> <meter>New <nav>New <noframes> <noscript> <object> <ol> <optgroup> <option> <output>New <p>

Defines a container for an external (non-HTML) application Groups related elements in a form Defines a caption for a <figure> element Specifies self-contained content Not supported in HTML5. Deprecated in HTML 4.01. Defines font, color, and size for text Defines a footer for a document or section Defines an HTML form for user input Not supported in HTML5. Defines a window (a frame) in a frameset Not supported in HTML5. Defines a set of frames Defines HTML headings Defines information about the document Defines a header for a document or section Groups heading (<h1> to <h6>) elements Defines a thematic change in the content Defines the root of an HTML document Defines a part of text in an alternate voice or mood Defines an inline frame Defines an image Defines an input control Defines a text that has been inserted into a document Defines keyboard input Defines a key-pair generator field (for forms) Defines a label for an <input> element Defines a caption for a <fieldset>, < figure>, or <details> element Defines a list item Defines the relationship between a document and an external resource (most used to link to style sheets) Defines a client-side image-map Defines marked/highlighted text Defines a list/menu of commands Defines metadata about an HTML document Defines a scalar measurement within a known range (a gauge) Defines navigation links Not supported in HTML5. Defines an alternate content for users that do not support frames Defines an alternate content for users that do not support client-side scripts Defines an embedded object Defines an ordered list Defines a group of related options in a drop-down list Defines an option in a drop-down list Defines the result of a calculation Defines a paragraph

<param> <pre> <progress>New <q> <rp>New <rt>New <ruby>New <s> <samp> <script> <section>New <select> <small> <source>New <span> <strike> <strong> <style> <sub> <summary>New <sup> <table> <tbody> <td> <textarea> <tfoot> <th> <thead> <time>New <title> <tr> <track>New <tt> <u> <ul> <var> <video>New <wbr>New

Defines a parameter for an object Defines preformatted text Represents the progress of a task Defines a short quotation Defines what to show in browsers that do not support ruby annotations Defines an explanation/pronunciation of characters (for East Asian typography) Defines a ruby annotation (for East Asian typography) Defines text that is no longer correct Defines sample output from a computer program Defines a client-side script Defines a section in a document Defines a drop-down list Defines smaller text Defines multiple media resources for media elements (<video> and <audio>) Defines a section in a document Not supported in HTML5. Deprecated in HTML 4.01. Defines strikethrough text Defines important text Defines style information for a document Defines subscripted text Defines a visible heading for a <details> element Defines superscripted text Defines a table Groups the body content in a table Defines a cell in a table Defines a multiline input control (text area) Groups the footer content in a table Defines a header cell in a table Groups the header content in a table Defines a date/time Defines a title for the document Defines a row in a table Defines text tracks for media elements (<video> and <audio>) Not supported in HTML5. Defines teletype text Defines text that should be stylistically different from normal text Defines an unordered list Defines a variable Defines a video or movie Defines a possible line-break

Attribute

Description

accesskey class contenteditableNew contextmenuNew dir draggableNew dropzoneNew hiddenNew id lang spellcheckNew style tabindex title translateNew

Specifies a shortcut key to activate/focus an element Specifies one or more classnames for an element (refers to a class in a style sheet) Specifies whether the content of an element is editable or not Specifies a context menu for an element. The context menu appears when a user right-clicks on the element Specifies the text direction for the content in an element Specifies whether an element is draggable or not Specifies whether the dragged data is copied, moved, or linked, when dropped Specifies that an element is not yet, or is no longer, relevant Specifies a unique id for an element Specifies the language of the element's content Specifies whether the element is to have its spelling and grammar checked or not Specifies an inline CSS style for an element Specifies the tabbing order of an element Specifies extra information about an element Specifies whether an element's value are to be translated when the page is localized, or not.

HTML Text Formatting Tags


Tag Description <b> Defines bold text <em> Defines emphasized text <i> Defines a part of text in an alternate voice or mood <small> Defines smaller text <strong> Defines important text <sub> Defines subscripted text <sup> Defines superscripted text <ins> Defines inserted text <del> Defines deleted text

HTML "Computer Output" Tags


Tag Description <code> Defines computer code text <kbd> Defines keyboard text <samp> Defines sample computer code <var> Defines a variable <pre> Defines preformatted text

HTML Citations, Quotations, and Definition Tags


Tag Description <abbr> Defines an abbreviation or acronym <address> Defines contact information for the author/owner of a document <bdo> Defines the text direction <blockquote> Defines a section that is quoted from another source <q> Defines an inline (short) quotation <cite> Defines the title of a work <dfn> Defines a definition term

HTML Table Tags


<tfoot> Groups the footer content in a table

Tag <table> <th>

Description Defines a table Defines a header cell in a table Defines a row in a table Defines a cell in a table Defines a table caption Specifies a group of one or more columns in a table for formatting Specifies column properties for each column within a <colgroup> element Groups the header content in a table

<tr> <td> <caption>

<colgroup>

<col>

<thead>

<tbody>

Groups the body content in a table

<tfoot>

Groups the footer content in a table

The following example uses five div elements to create a multiple column layout, creating the same result as in the previous example:

Example
<!DOCTYPE html> <html> <body> <div id="container" style="width:500px"> <div id="header" style="background-color:#FFA500;"> <h1 style="margin-bottom:0;">Main Title of Web Page</h1></div> <div id="menu" style="backgroundcolor:#FFD700;height:200px;width:100px;float:left;"> <b>Menu</b><br> HTML<br> CSS<br> JavaScript</div> <div id="content" style="backgroundcolor:#EEEEEE;height:200px;width:400px;float:left;"> Content goes here</div> <div id="footer" style="background-color:#FFA500;clear:both;textalign:center;"> Copyright W3Schools.com</div> </div> </body> </html>

The HTML code above will produce the following result:

Main Title of Web Page

Menu HTML CSS JavaScript Content goes here Copyright W3Schools.com

The following example uses a table with 3 rows and 2 columns - the first and last row spans both columns using the colspan attribute:

Example
<!DOCTYPE html> <html> <body> <table width="500" border="0"> <tr> <td colspan="2" style="background-color:#FFA500;"> <h1>Main Title of Web Page</h1> </td> </tr> <tr> <td style="background-color:#FFD700;width:100px;"> <b>Menu</b><br> HTML<br> CSS<br> JavaScript </td> <td style="background-color:#EEEEEE;height:200px;width:400px;"> Content goes here</td> </tr> <tr> <td colspan="2" style="background-color:#FFA500;text-align:center;"> Copyright W3Schools.com</td> </tr> </table> </body> </html>

The HTML code above will produce the following result:

Main Title of Web Page

Menu HTML CSS JavaScript

Content goes here

Copyright W3Schools.com

Fieldset around form-data. <!DOCTYPE html> <html><body> <form action=""> <fieldset> <legend>Personal information:</legend> Name: <input type="text" size="30"><br> E-mail: <input type="text" size="30"><br> Date of birth: <input type="text" size="10"> </fieldset> </form></body></html>

How to create a border around elements in a form.

Personal information: Name: E-mail: Date of birth:


Form with text fields and a submit button How to create a form with two text fields and a submit button.

<!DOCTYPE html> <html><body> <form name="input" action="html_form_action.asp" method="get"> First name: <input type="text" name="FirstName" value="Mickey"><br> Last name: <input type="text" name="LastName" value="Mouse"><br> <input type="submit" value="Submit"> </form> <p>If you click the "Submit" button, the form-data will be sent to a page called "html_form_action.asp".</p> </body></html>

First name: Last name:

Mickey Mouse

If you click the "Submit" button, the form-data will be sent to a page called "html_form_action.asp".

Send e-mail from a form <!DOCTYPE html> <html><body>

How to send e-mail from a form.

<h3>Send e-mail to someone@example.com:</h3> <form action="MAILTO:someone@example.com" method="post" enctype="text/plain"> Name:<br> <input type="text" name="name" value="your name"><br> E-mail:<br> <input type="text" name="mail" value="your email"><br> Comment:<br> <input type="text" name="comment" value="your comment" size="50"><br><br> <input type="submit" value="Send"> <input type="reset" value="Reset"> </form></body></html>

Send e-mail to someone@example.com: Name:


your name

E-mail:
your email

Comment:
your comment

New : New tags in HTML5.


Tag <form> <input> <textarea> <label> <fieldset> <legend> <select> <optgroup> <option> <button> Description Defines an HTML form for user input Defines an input control Defines a multiline input control (text area) Defines a label for an <input> element Groups related elements in a form Defines a caption for a <fieldset> element Defines a drop-down list Defines a group of related options in a drop-down list Defines an option in a drop-down list Defines a clickable button

<datalist>New Specifies a list of pre-defined options for input controls <keygen>New Defines a key-pair generator field (for forms) <output>New Defines the result of a calculation

Anda mungkin juga menyukai