Html entity for quote

HTML Quotation and Citation Elements

In this chapter we will go through the , , , , , and HTML elements.

Example

Here is a quote from WWF’s website:

For 60 years, WWF has worked to help people and nature thrive. As the world’s leading conservation organization, WWF works in nearly 100 countries. At every level, we collaborate with people around the world to develop and deliver innovative solutions that protect communities, wildlife, and the places in which they live.

HTML for Quotations

The HTML element defines a section that is quoted from another source.

Browsers usually indent elements.

Example

Here is a quote from WWF’s website:

For 60 years, WWF has worked to help people and nature thrive. As the world’s leading conservation organization, WWF works in nearly 100 countries. At every level, we collaborate with people around the world to develop and deliver innovative solutions that protect communities, wildlife, and the places in which they live.

HTML for Short Quotations

The HTML tag defines a short quotation.

Browsers normally insert quotation marks around the quotation.

Example

WWF’s goal is to: Build a future where people live in harmony with nature.

HTML for Abbreviations

The HTML tag defines an abbreviation or an acronym, like «HTML», «CSS», «Mr.», «Dr.», «ASAP», «ATM».

Marking abbreviations can give useful information to browsers, translation systems and search-engines.

Tip: Use the global title attribute to show the description for the abbreviation/acronym when you mouse over the element.

Example

HTML for Contact Information

The HTML tag defines the contact information for the author/owner of a document or an article.

The contact information can be an email address, URL, physical address, phone number, social media handle, etc.

The text in the element usually renders in italic, and browsers will always add a line break before and after the element.

Example

HTML for Work Title

The HTML tag defines the title of a creative work (e.g. a book, a poem, a song, a movie, a painting, a sculpture, etc.).

Note: A person’s name is not the title of a work.

The text in the element usually renders in italic.

Example

The Scream by Edvard Munch. Painted in 1893.

HTML for Bi-Directional Override

BDO stands for Bi-Directional Override.

The HTML tag is used to override the current text direction:

Example

HTML Exercises

Test Yourself with Exercises!

HTML Quotation and Citation Elements

Tag Description
Defines an abbreviation or acronym
Defines contact information for the author/owner of a document
Defines the text direction
Defines a section that is quoted from another source
Defines the title of a work
Defines a short inline quotation

For a complete list of all available HTML tags, visit our HTML Tag Reference.

Источник

Common HTML entities used for typography

This part of the Web Standards Curriculum looks at the different codes that can be used to represent text characters when there is a need to escape them. There are a number of HTML entities that come in handy when there’s a need for first-rate typesetting. Many of those listed in Table 1 are useful only when used in foreign language copy (and copy written in specific dialects of English), so context should be taken into account before the choice is made to use them.

For the sake of portability, Unicode entity references should be reserved for use in documents certain to be written in the UTF-8 or UTF-16 character sets. In all other cases, the alphanumeric references should be used.

Character(s) Literal(s) Alphanumeric value(s) Unicode value(s) Prefer to
Cent (currency) ¢ ¢ ¢
Pound (currency) £ £ £
Section 1 § § §
Copyright © © © (c)
Guillemets 2 « » « » « » "
Registered trademark ® ® ® (R)
Degree(s) ° ° °
Plus/minus ± ± ± +/-
Pilcrow (paragraph) 3
Middle dot 4 · · ·
Fractional half 5 ½ ½ ¼ 1/2
En dash 6, 7 — for ranges
Em (long) dash 7, 8 — enclosed by spaces, or —
Single quotes 9, 10 ‘ ’ ‘ ’ ‘ ’ ‘ or '
Single low quote 11 ‘ or comma
Double quotes 9 “ ” “ ” “ ” «, " , , or «
Double low quote 11 " or ,,
Single & double daggers † ‡ † ‡ † ‡ * and **
Bullet *
Ellipsis 12 .
Prime & double prime 13 ′ ″ ′ ″ ′ ″ ‘ , , ' , " , minutes:seconds elapsed
Euro sign
Trademark (tm)
Almost equal to ~
Not equal to !=
Less/greater than or equal to ≤ ≥ ≤ ≥ ≤ ≥ =
Less/greater than < > > <

Table 1: HTML entities useful for proper typesetting, listed in order by decimal Unicode position.

Note that guillemets are used for quotes in certain European languages (such as French and Norsk); in these situations, you should always use q elements instead.

HTML entity usage notes

  1. Citations of statute law, eg, “29 USC § 794 (d),” are the matter most likely to reference this character.
  2. Guillemets often enclose the names of stories, songs, films, public accommodations (eg, «Rick’s Café Americain»), and popular toponyms in European languages, particularly those of the Romance sub-family. They are also used for quotes in certain European languages (such as French and Norsk); in these situations, you should always use q elements instead.
  3. The pilcrow, used to mark the beginning of paragraphs that might otherwise be ambiguous, is useful when setting teaser copy. The print distribution of Rolling Stone magazine has often used such an approach. In technical writing, it might also be useful for marking an orphaned first line of a paragraph. ¶ Paragraphs marked with this symbol will most often be assigned a display value of inline , which will be explained in the introduction to the CSS layout model.
  4. The middle dot is an anachronistic analogue to the decimal point, still used by some designers to enumerate amounts of decimalized currency.
  5. HTML also provides references to the code positions for one-quarter and three-quarters fractions.
  6. The en dash is used between two quantities or dates to suggest a range, and is indistinguishable from a proper minus sign ( − / − ). However, it should always be distinguished from a hyphen ( - ), which is used to separate the parts of an ad hoc compound word.
  7. Browsers create soft linebreaks after hyphens (see above), but not after en dashes or em dashes.
  8. The exclusive use of the em dash in English is to mark one or both ends of a dependent clause in lieu of parentheses, and to indicate that if spoken aloud the clause should be preceded and followed by uninflected pauses. In several other languages — particularly those of the Slavic sub-family — em dashes indicate dialogue from the beginning of a paragraph. Tradition dictates that this character not be enclosed itself by spaces, but the thoughtful user of markup may wish to do just that in order to avoid an especially ragged line.
  9. These are the members of the automated “Smart Quotes” set of characters incorporated into most popular word processing platforms. They are often encoded at vendor-specific code positions rather than Unicode or ISO Latin code positions, which can cause problems when they are copied into a Web document.
  10. The single close quote character is also used in English as the apostrophe.
  11. Low quotes are used in several Central and Eastern European langauges in preference to the analogous English opening quote characters.
  12. Since the ellipsis is a single character, the tracking of its constituent glyphs will not be affected by any value set for the letter-spacing or text-align properties.
  13. Primes are used to denote minutes (of both time elapsed and arc) and feet as units of measurement; the double prime in its turn denotes seconds and inches. The use of these characters in relation to units of time elapsed has decreased in popularity in recent years, a decrease that correlates strongly with the increased availability of word processing systems (and their common use by non-specialist operators). Many fonts use prime and double prime characters indistinguishable from single and double close quotes, but for reasons of portability these entities should still be used when called for, notwithstanding the characteristics of the intended display face.

Note: This material was originally published as part of the Opera Web Standards Curriculum, available as Supplementary: Common HTML entities used for typography, written by Ben Henick. Like the original, it is published under the Creative Commons Attribution, Non Commercial — Share Alike 2.5 license.

Источник

HTML Entities

Reserved characters in HTML must be replaced with character entities.

HTML Entities

Some characters are reserved in HTML.

If you use the less than (<) or greater than (>) signs in your text, the browser might mix them with tags.

Character entities are used to display reserved characters in HTML.

A character entity looks like this:

Advantage of using an entity name: An entity name is easy to remember.
Disadvantage of using an entity name: Browsers may not support all entity names, but the support for entity numbers is good.

Non-breaking Space

A commonly used entity in HTML is the non-breaking space:  

A non-breaking space is a space that will not break into a new line.

Two words separated by a non-breaking space will stick together (not break into a new line). This is handy when breaking the words might be disruptive.

Another common use of the non-breaking space is to prevent browsers from truncating spaces in HTML pages.

If you write 10 spaces in your text, the browser will remove 9 of them. To add real spaces to your text, you can use the   character entity.

Tip: The non-breaking hyphen (‑) is used to define a hyphen character (‑) that does not break into a new line.

Some Useful HTML Character Entities

Result Description Entity Name Entity Number Try it
non-breaking space     Try it »
less than < < Try it »
> greater than > > Try it »
& ampersand & & Try it »
« double quotation mark " " Try it »
single quotation mark (apostrophe) ' ' Try it »
¢ cent ¢ ¢ Try it »
£ pound £ £ Try it »
¥ yen ¥ ¥ Try it »
euro Try it »
© copyright © © Try it »
® registered trademark ® ® Try it »

Note: Entity names are case sensitive.

Combining Diacritical Marks

A diacritical mark is a «glyph» added to a letter.

Some diacritical marks, like grave ( ̀) and acute ( ́) are called accents.

Diacritical marks can appear both above and below a letter, inside a letter, and between two letters.

Diacritical marks can be used in combination with alphanumeric characters to produce a character that is not present in the character set (encoding) used in the page.

Mark Character Construct Result Try it
̀ a Try it »
́ a Try it »
̂ a Try it »
̃ a Try it »
̀ O Try it »
́ O Try it »
̂ O Try it »
̃ O Try it »

You will see more HTML symbols in the next chapter of this tutorial.

Источник

Читайте также:  Php скорость загрузки скрипта
Оцените статью