- HTML Tutorial
- HTML - Home
- HTML - History and Evolution
- HTML - Overview
- HTML - Editors
- HTML - Basic Tags
- HTML - Elements
- HTML - Attributes
- HTML - Formatting
- HTML - Headings
- HTML - Paragraphs
- HTML - Quotations
- HTML - Comments
- HTML - Phrase Tags
- HTML - Meta Tags
- HTML - Style Sheet
- HTML - CSS Classes
- HTML - CSS IDs
- HTML - Images
- HTML - Image Map
- HTML Tables
- HTML - Tables
- HTML - Headers & Caption
- HTML - Table Styling
- HTML - Table Colgroup
- HTML - Nested Tables
- HTML Lists
- HTML - Lists
- HTML - Unordered Lists
- HTML - Ordered Lists
- HTML - Definition Lists
- HTML Links
- HTML - Text Links
- HTML - Image Links
- HTML - Email Links
- HTML - Iframes
- HTML - Blocks
- HTML Backgrounds
- HTML - Backgrounds
- HTML Colors
- HTML - Colors
- HTML - RGB
- HTML - HEX
- HTML - HSL
- HTML Forms
- HTML - Forms
- HTML - Form Attributes
- HTML - Form Control
- HTML - Input Attributes
- HTML Media
- HTML - Video Element
- HTML - Audio Element
- HTML - Embed Multimedia
- HTML Header
- HTML - Head Element
- HTML - Adding Favicon
- HTML - Javascript
- HTML Layouts
- HTML - Layouts
- HTML - Layout Elements
- HTML - Layout using CSS
- HTML - Responsiveness
- HTML - Symbols
- HTML - Emojis
- HTML - Style Guide
- HTML Graphics
- HTML - SVG
- HTML - Canvas
- HTML APIs
- HTML - Geolocation API
- HTML - Drag & Drop API
- HTML - Web Workers API
- HTML - WebSocket
- HTML - Web Storage
- HTML - Server Sent Events
- HTML Miscellaneous
- HTML - MathML
- HTML - Microdata
- HTML - IndexedDB
- HTML - Web Messaging
- HTML - Web CORS
- HTML - Web RTC
- HTML Demo
- HTML - Audio Player
- HTML - Video Player
- HTML - Web slide Desk
- HTML Tools
- HTML - Velocity Draw
- HTML - QR Code
- HTML - Modernizer
- HTML - Validation
- HTML - Color Code Builder
- HTML References
- HTML - Tags Reference
- HTML - Attributes Reference
- HTML - Events Reference
- HTML - Fonts Reference
- HTML - ASCII Codes
- ASCII Table Lookup
- HTML - Color Names
- HTML - Entities
- MIME Media Types
- HTML - URL Encoding
- Language ISO Codes
- HTML - Character Encodings
- HTML - Deprecated Tags
- HTML Resources
- HTML - Quick Guide
- HTML - Useful Resources
- HTML - Color Code Builder
- HTML - Online Editor
HTML - Phrase Elements
Function
Phrase elements add structural information to text fragments. The usual meanings of phrase elements are following −
<abbr> | Indicates an abbreviated form like pvt. inc. etc. |
<acronym> | Indicates an acronym (e.g., WAC, radar, etc.). |
<em> | Indicates emphasis. |
<strong> | Indicates stronger emphasis. |
<cite> | Contains a citation or a reference to other sources. |
<dfn> | Indicates that this is the defining instance of the enclosed term. |
<code> | Designates a fragment of computer code. |
<samp> | Designates sample output from programs, scripts, etc. |
<kbd> | Indicates text to be entered by the user. |
<var> | Indicates an instance of a variable or program argument. |
Difference between HTML and XHTML
NONE
Example
<abbr>pvt. or inc.</abbr><br /> <acronym>HTML</acronym><br /> <cite>Citation</cite><br /> <em>Emphasized text</em><br /> <strong>Strong text</strong><br /> <dfn>Definition term</dfn><br /> <code>Computer code text</code><br /> <samp>Sample computer code text</samp><br /> <kbd>Keyboard text</kbd><br /> <var>Variable</var><br />
This will produce following result −
Standard Attributes
Sr.No | Attribute & Description |
---|---|
1 | class
Document wide identifier |
2 | dir
Specifies the direction of the text |
3 | id
Document wide identifier |
4 | title
Specifies a title to associate with the element. |
5 | style
Helps to include inline casecadubf style sheet. |
6 | lang
Sets the language code. |
Event Attributes
Sr.No | Attribute & Description |
---|---|
1 | onclick
Script runs when a mouse click |
2 | ondblclick
Script runs when a mouse double-click |
3 | onmousedown
Script runs when mouse button is pressed |
4 | onmouseup
Script runs when mouse button is released |
5 | onmouseover
Script runs when mouse pointer moves over an element |
6 | onmousemove
Script runs when mouse pointer moves |
7 | onmouseout
Script runs when mouse pointer moves out of an element |
8 | onkeypress
Script runs when key is pressed and released |
9 | onkeydown
Script runs when key is pressed |
10 | onkeyup
Script runs when key is released |
Browser Support
Chrome | Firefox | IE | Opera | Safari | Android |
---|---|---|---|---|---|
Yes | Yes | Yes | Yes | Yes | Yes |