Skip to main content

learn html for intermediate :Text: Abbreviations, Quotations, and Code








The basics of defining text using paragraphs (as well as emphasis and line breaks) and headingswas covered in the HTML Beginner Tutorial. As, ad computer codend for the same reason we use p and h1h2, etc, there are a number of other tnags we should also use to specifically represent other text-types, such as abbreviationsquotation

.Abbreviations

abbr is used to markup an abbreviation, a shortened form of a word or phrase.
The expanded phrase that the abbreviation represents can be defined in the value of thetitle attribute. This is optional but recommended.
<p>This web site is about <abbr title="HyperText Markup Language">HTML</abbr> and <abbr title="Cascading Style Sheets">CSS</abbr>.</p>

Quotations

blockquote and q are used for quotations.blockquote is generally used for standalone often multi-line quotations whereas q is used for shorter, in-line quotations.
If the source of the quotation can be found on the Web, the cite attribute can be used to point to its origin.

<p>So I asked Bob about quotations on the Web and he said <q>I know as much about quotations as I do about pigeon fancying</q>. Luckily, I found HTML Dog and it said:</p>

<blockquote cite="http://www.htmldog.com/guides/html/intermediate/text/">
    <p>blockquote and q are used for quotations. blockquote is generally used for standalone often multi-line quotations whereas q is used for shorter, in-line quotations.</p>
</blockquote>

Citations

Just to make things nice and confusing, as well as a cite attribute, there is also a cite tag. This can be used to define the title of a work, such as a book.

<p>According to <cite>the Bible</cite>, after six days God said <q>screw this for a lark, I'm having a nap</q>.</p>

Code

code is used to represent any form of computercode. Further, var can be used for variables(which could be a variable in anything, not just in code - it could be a variable in an equation, for example), samp for sample output, and kbd(keyboard) for user input.

<p>If you add the line <code><var>givevaderachuckle</var> = true;</code> to the <code>destroy_planet</code> subroutine and then type <kbd>ilovejabba</kbd> into the console, the big bad green Death Star laser will etch <samp>Slug Lover!</samp> on the planet's surface.</p>

Preformatted text

pre is preformatted text and is unusual in HTML tags that it takes notice of every character in it, including the white space (whereas other elements will ignore a consecutive space or a line-break, for example). It is most commonly used for blocks of code, where spacing, such as indentations, can be relevant.

<pre><code>
&lt;div id="intro"&gt;
    &lt;h1&gt;Some heading&lt;/h1&gt;
    &lt;p&gt;Some paragraph paragraph thing thing thingy.&lt;/p&gt;
&lt;/div&gt;
</code></pre>

Popular posts from this blog

Free tips to save yourself from phishing

Free tips to save yourself from phishing Phishing is a type of social building method utilized by programmers to assemble delicate data, for example, usernames, passwords and Visa points of interest by acting like a trustworty individual/association. Since most online clients are ignorant of the methods utilized as a part of completing a phishing assault, they regularly fall exploited people

html intermediate tutorial Text: Addresses, Definitions, Bi-directional, and Editorial

Addresses address  should be used specifically for the contact details  relating either to the entire web page (and so only used once) or to an  article element . It’s isn’t, as it might at first appear, for marking up any old address willy-nilly. < h3 > Author contact details </ h3 > < address > < ul > < li > 0123-456-7890 </ li > < li > author_dude@noplaceinteresting.com </ li > < li > http://www.noplaceinteresting.com/contactme/ </ li > </ ul > </ address > Definition terms dfn  is a  definition  term and is used to highlight the first use of a term. Like  abbr , the  title attribute can be used to describe the term. < p > Bob's < dfn title = "Dog" > canine </ dfn > mother and < dfn title = "Horse" > equine </ dfn > father sat him down and carefully explained that he was an < dfn title = "A mutation that comb...