Complete HTML Tutorial: HTML Tags

HTML Tag is a most important part in HTML Language. An HTML Tag carries all about HTML contents and this the main thing to maintain all of the codes in a web page. HTML Tag is the mother of an HTML document.


  • What Is An HTML Tag?

HTML tags are the hidden keywords within a web page that define how your web browser must format and display the content.
Most tags must have two parts, an opening and a closing part. For example, <html> is the opening tag and </html> is the closing tag. Note that the closing tag has the same text as the opening tag, but has an additional forward-slash ( / ) character. I tend to interperet this as the "end" or "close" character. There are some tags that are an exception to this rule, and where a closing tag is not required. The <img> tag for showing images is one example of this. Each HTML file must have the essential tags for it to be valid, so that web browsers can understand it and display it correctly. The rest of the HTML file can contain as little or as many tags as you want to display your content.
Example: <html>, </html>, <head>, </head>, <body>, </body>, <br>, <hr>, <marquee> etc.
All of the HTML Tags are described bellow...

  • BASIC:


  1. <!DOCTYPE> Defines the document type
  2. <html>           Defines an HTML document
  3. <head>           Defines information about the document
  4. <title>           Defines a title for the document
  5. <body>           Defines the document's body
  6. <h1> to <h6>   Defines HTML headings
  7. <p>                   Defines a paragraph
  8. <br>           Inserts a single line break
  9. <hr>           Defines a thematic change in the content
  10. <!--...-->           Defines a comment
  • FORMATTING:
  1. <acronym>   Defines an acronym. (Not supported in HTML5. Use <abbr> instead.)
  2. <abbr>           Defines an abbreviation or an acronym
  3. <address>   Defines contact information for the author/owner of a document/article
  4. <b>                   Defines bold text
  5. <bdi>           Isolates a part of text that might be formatted in a different direction from other text outside it
  6. <bdo>           Overrides the current text direction
  7. <big>           Not supported in HTML5. Use CSS instead.
  8. Defines big text
  9. <blockquote>   Defines a section that is quoted from another source
  10. <center>           Not supported in HTML5. Use CSS instead.
  11. Defines centered text
  12. <cite>           Defines the title of a work
  13. <code>           Defines a piece of computer code
  14. <del>           Defines text that has been deleted from a document
  15. <dfn>           Represents the defining instance of a term
  16. <em>           Defines emphasized text 
  17. <font>           Defines font, color, and size for text. (Not supported in HTML5. Use CSS instead.)

  18. <i>                  Defines a part of text in an alternate voice or mood
  19. <ins>          Defines a text that has been inserted into a document
  20. <kbd>          Defines keyboard input
  21. <mark>          Defines marked/highlighted text
  22. <meter>          Defines a scalar measurement within a known range (a gauge)
  23. <pre>          Defines preformatted text
  24. <progress>  Represents the progress of a task
  25. <q>                  Defines a short quotation
  26. <rp>          Defines what to show in browsers that do not support ruby annotations
  27. <rt>                  Defines an explanation/pronunciation of characters (for East Asian typography)
  28. <ruby>          Defines a ruby annotation (for East Asian typography)
  29. <s>                  Defines text that is no longer correct
  30. <samp>          Defines sample output from a computer program
  31. <small>          Defines smaller text
  32. <strike>          Defines strikethrough text. (Not supported in HTML5. Use <del> or <s> instead.)

  33. <strong>           Defines important text
  34. <sub>           Defines subscripted text
  35. <sup>           Defines superscripted text
  36. <template>   Defines a template
  37. <time>           Defines a date/time
  38. <tt>                   Defines teletype text. (Not supported in HTML5. Use CSS instead.)
  39. <u>                   Defines text that should be stylistically different from normal text
  40. <var>           Defines a variable
  41. <wbr>           Defines a possible line-break
  • FORMS & INPUT:

  1. <frame>           Defines a window (a frame) in a frameset. (Not supported in HTML5.)
  2. <frameset>   Defines a set of frames. (Not supported in HTML5.)
  3. <noframes>   Defines an alternate content for users that do not support frames. (Not supported in HTML5.)
  4. <iframe>           Defines an inline frame

  • IMAGES:
  1. <img>            Defines an image
  2. <map>            Defines a client-side image-map
  3. <area>            Defines an area inside an image-map
  4. <canvas>            Used to draw graphics, on the fly, via scripting (usually JavaScript)
  5. <figcaption>    Defines a caption for a <figure> element
  6. <figure>            Specifies self-contained content
  7. <picture>    Defines a container for multiple image resources
  8. <svg>            Defines a container for SVG graphics
  • AUDIO/VIDEO:
  1. <audio>            Defines sound content
  2. <source>            Defines multiple media resources for media elements (<video>, <audio> and <picture>)
  3. <track>             Defines text tracks for media elements (<video> and <audio>)
  4. <video>             Defines a video or movie
  • LINKS:
  1. <a>                                Defines a hyperlink
  2. <link>                    Defines the relationship between a document and an external resource (most used to link to style sheets)
  3. <nav>                    Defines navigation links
  • LISTS:
  1. <ul>                    Defines an unordered list
  2. <ol>                    Defines an ordered list
  3. <li>                                Defines a list item
  4. <dir>                    Not supported in HTML5. Use <ul> instead.
  5. Defines a directory list
  6. <dl>                     Defines a description list
  7. <dt>                     Defines a term/name in a description list
  8. <dd>                     Defines a description of a term/name in a description list
  • TABLES:
  1. <table>                      Defines a table
  2. <caption>          Defines a table caption
  3. <th>                      Defines a header cell in a table
  4. <tr>                                  Defines a row in a table
  5. <td>                      Defines a cell in a table
  6. <thead>                      Groups the header content in a table
  7. <tbody>                      Groups the body content in a table
  8. <tfoot>                      Groups the footer content in a table
  9. <col>                      Specifies column properties for each column within a <colgroup> element
  10. <colgroup>          Specifies a group of one or more columns in a table for formatting
  • STYLES & SEMANTICS:
  1. <style>                       Defines style information for a document
  2. <div>                       Defines a section in a document
  3. <span>                       Defines a section in a document
  4. <header>                       Defines a header for a document or section
  5. <footer>                       Defines a footer for a document or section
  6. <main>                       Specifies the main content of a document
  7. <section>           Defines a section in a document
  8. <article>                       Defines an article
  9. <aside>                       Defines content aside from the page content
  10. <details>                       Defines additional details that the user can view or hide
  11. <dialog>                       Defines a dialog box or window
  12. <summary>           Defines a visible heading for a <details> element
  13. <data>                        Links the given content with a machine-readable translation
  • META INFORMATION:
  1. <head>                        Defines information about the document
  2. <meta>                        Defines metadata about an HTML document
  3. <base>                        Specifies the base URL/target for all relative URLs in a document
  4. <basefont>            Specifies a default color, size, and font for all text in a document. (Not supported in HTML5. Use CSS instead.)
  • PROGRAMMING:
  1. <script>                          Defines a client-side script
  2. <noscript>              Defines an alternate content for users that do not support client-side scripts
  3. <applet>                           Defines an embedded applet. (Not supported in HTML5. Use <embed> or <object> instead.)
  4. <embed>                           Defines a container for an external (non-HTML) application
  5. <object>                            Defines an embedded object
  6. <param>                            Defines a parameter for an object
Source: W3Shools


Post a Comment

0 Comments