` Tag Tutorial The HTML `` (Quotation) element is used to indicate that the enclosed text is a short, inline quotation. Unlike block-level quotations, inline quotations do not require a new line or paragraph break. Modern web browsers automatically wrap the text inside a `` tag with language-appropriate quotation marks. --- ## Syntax and Usage The `` tag is an inline element. It should be used within block-level elements (such as `` or `
`) to wrap the quoted text. ```htmlSome text
``` ### Browser Support The `This is a short quotesome more text.` tag is fully supported by all modern web browsers, including Google Chrome, Mozilla Firefox, Apple Safari, Microsoft Edge, and Opera. --- ## Code Examples ### Example 1: Basic Inline Quotation This example demonstrates how to mark up a short quote within a paragraph. ```htmlWWF's goal is to:
``` ### Example 2: Using the `cite` Attribute You can use the `cite` attribute to point to the source of the quotation. This is useful for search engines and screen readers, though it is not visible to the user by default. ```htmlBuild a future where people live in harmony with nature.We hope they succeed.According to Mozilla, the HTML q element
``` --- ## Attributes The `is intended for short quotations that don't require paragraph breaks.` tag supports both element-specific attributes and global/event attributes. ### Element-Specific Attributes | Attribute | Value | Description | | :--- | :--- | :--- | | `cite` | *URL* | Specifies the source URL of the quoted text. | ### Global and Event Attributes * **Global Attributes:** The `` tag supports all (https://www.w3schools.com/tags/ref_standardattributes.asp) (e.g., `class`, `id`, `style`, `lang`). * **Event Attributes:** The `` tag supports all (https://www.w3schools.com/tags/ref_eventattributes.asp) (e.g., `onclick`, `onmouseover`). --- ## Considerations and Best Practices ### 1. `` vs. `` * Use the **``** tag for **short, inline quotations** that fit naturally within a paragraph. * Use the **``** tag for **long, block-level quotations** that require their own paragraph breaks and are typically indented. ### 2. Do Not Manually Add Quotation Marks Do not type quotation marks (like `"` or `'`) inside the `` tag. Browsers automatically insert the correct quotation marks based on the document's language (defined by the `lang` attribute on the `` tag). For example, a browser will render `Β« Β»` for French text and `β β` for English text if the language is set correctly. ### 3. Styling with CSS If you want to customize or disable the automatic quotation marks generated by the browser, you can use the CSS `quotes` property: ```css /* Customizing quotation marks */ q { quotes: "Β«" "Β»"; } /* Removing quotation marks entirely */ q { quotes: none; } ```
Tag Q
## HTML `
YouTip