YouTip LogoYouTip

Tag Cite

# HTML `` Tag: Comprehensive Reference The HTML `` element is an inline semantic tag used to define the title of a creative work. This work could be a book, a song, a movie, a TV show, a painting, a sculpture, a play, an opera, a research paper, or any other creative medium. By default, most modern web browsers render the content inside a `` tag in *italics*. --- ## Syntax & Basic Usage To use the `` tag, wrap the title of the creative work within the opening `` and closing `` tags. ```html

The Scream by Edvard Munch. Painted in 1893.

``` ### Browser Support The `` tag is fully supported by all major modern web browsers: * Google Chrome * Mozilla Firefox * Microsoft Edge / Internet Explorer * Apple Safari * Opera --- ## Code Examples ### Example 1: Citing a Painting ```html

One of the most famous expressionist artworks is The Starry Night by Vincent van Gogh.

``` ### Example 2: Citing a Book and a Movie ```html

The movie Blade Runner is loosely based on Philip K. Dick's science fiction novel Do Androids Dream of Electric Sheep?.

``` ### Example 3: Combining `` with `
` When quoting a source using the `
` or `` tags, you can use the `` tag to reference the title of the source work. ```html
"To be, or not to be, that is the question."
β€” William Shakespeare, Hamlet
``` --- ## HTML 4.01 vs. HTML5 The semantic definition of the `` tag changed slightly between HTML specifications: | Specification | Definition & Usage | | :--- | :--- | | **HTML 4.01** | Defined a general citation or a reference to another source (which could include the author's name). | | **HTML5** | Strictly defines the **title of a work** (books, songs, movies, etc.). A person's name is explicitly excluded from this definition. | --- ## Key Considerations & Best Practices ### 1. Do Not Use `` for People's Names According to the HTML5 specification, **a person's name is not the title of a work** and must not be wrapped in a `` tag. * **Incorrect:** `Albert Einstein once said...` * **Correct:** `Albert Einstein once said in his paper On the Electrodynamics of Moving Bodies...` ### 2. Styling with CSS By default, browsers display `` in italics. If you want to change this behavior to match your website's design, you can easily override it using CSS: ```css cite { font-style: normal; color: #0066cc; font-weight: bold; } ``` --- ## Attributes The `` tag does not have any unique element-specific attributes. However, it fully supports: * **Global Attributes:** Such as `class`, `id`, `style`, `title`, `lang`, etc. * **Event Attributes:** Such as `onclick`, `onmouseover`, `onmouseout`, etc.
← Tag CodeHtml Keyboardshortcuts β†’