Control
The br
label is now overused, when the label is used to p
represent the paragraph. You should use a label when you represent a paragraph p
. In the same way, there are many tags that should be used to define reliable text elements, such as quotations, abbreviations abbreviations, and computer code computer codes.
It's important to note that while browsers can implement these tags in a variety of way, it's important to keep in mind that regardless of what each element looks like, be sure to be semantically correct.
Abbreviations abbreviations and acronyms only initials
abbr
Used for abbreviations, for acronyms that acronym
take only the first letter
An abbreviation is an abbreviation of a phrase, which is very general, and an abbreviation that takes only the first letter is made up of the first letter of a phrase. So CSS is the correct acronym for just the initials, and HTML and XHTML are not (if ' Hypertext Markup Language ' takes the initials acronym IS ' HML ' the same XHTML is ' EHML ').
Apply the most appropriate usability, using the title
abbreviation of the expression phrase, or just the initials of the first letter.
<abbr title="HyperText Markup Language">HTML</abbr><acronym title="Cascading Style Sheets">CSS</acronym>.</p>
For some inexplicable reason, ie browser does not support abbr
tags, a friend named Marek Prokop use JavaScript to make it work, clever JavaScript workaround
There is a lot of controversy about the way the two are used. Lars Holst's article mentions the most detailed insight
Quotations the language of introduction
blockquote
, p
and cite
used in reference language. blockquote
is a block element for a large reference, and q
a row element for a small reference. The cite
same is the line element, q
more semantic than the future may be replaced q
.
title
Property can be used to indicate where the reference comes from.
q
Tags usually do not change the appearance of the text above, if you want to change can use CSS.
<cite>I know as much about quotations as I do about pigeon fancying</cite>. Luckily, I found HTML Dog and it said...</p><blockquote title="From HTML Dog, http://www.htmldog.com/"><p>blockquote, q and cite are used for quotations. blockquote is block-line and used for large or citations, whereas q is in-line and used for smaller phrases. cite is also in-line and preferable to q for its semantic nature and possible future deprecation of q.</p></blockquote>
Code codes
There are many tags, code
and the var
designation is used to represent the computer code. pre
and samp
, they are also primarily used in code.
code
For computer code.
var
A description of the variables used in the code.
<code><var>ronankeatingisbland</var> = true;</code>
samp
is similar to code, but it assumes an example of the output code.
pre
is a preformatted text that, in HTML tags, is unique in that it provides a white restricted area for code block display.
<pre><div id="intro"></pre>
Definition terms Define Terms
dfn
Is the definition term used to highlight the first use of terminology. Like abbr
and acronym
, title
attributes are used to describe terms.
<dfn title="Dog">canine</dfn><dfn title="Horse">equine</dfn><dfn title="A mutation that combines two or more sets of chromosomes from different species">allopolyploid</dfn> organism.</p>
Addresses address
address
Used to represent an address.
<address>HMTL Dog House<br />HTML Street<br />Dogsville<br />HT16 3ML</address>
Obscure and rare label
Some labels are noteworthy but rarely used due to their own specificity.
bdo
You can invert the text and use it to show Right-to-left languages. Property dir
Property Value ltr
(left to right) or rtl
(right to left) is required.
<bdo dir= "RTL" >god lmth</bdo>
kbd
Used to display text that needs to be typed.
<kbd>woo hoo</kbd></p>
ins
and del
used to show the insertion and deletion of edited text, respectively. They have datetime
attributes (YYYYMMDD format) and cite
(a link to explain the reason for the insert deletion).
ins
Elements usually display underscores, and del
elements usually show strikethrough.
<del datetime="20030522">nonsense</del><ins cite="http://www.htmldog.com">very informative stuff</ins> that I've written.</p>
Performance elements
b,i,sub,big,small
are expressive elements that, through their definition, know that separation of semantics and expression should not be used again. The b
definition is bold, without any semantics, and these tags are defined purely for visual features, those that can be replaced with CSS. The correct label is semantic, for example strong
, and em
represents a phrase element. If you want to copy the style of these labels by yourself and do not use any semantic tags, you should label them with CSS span
.