ComputerCode in HTML

Some time during the coding of html there are some elements are used for describing the parts of technical documents, such as code   code  , variables   var   , program samples   samp  ,and user-entered keyboard strokes kbd. For me, it’s a quaint reminder of HTML’s origins in the scientific world Code, sample, and keyboard elements typically render in a constant-width (also called monospace) font such as Courier by default. Variables usually render in italics.

The syntax for citation:

The cite element is used to identify a reference to another document, such as a book, magazine, article title, and so on. Citations are typically rendered in italic text by default

<p>  <cite> Manual of Typography </cite>  by James Felici.  </p>.

Explaination of cite tag.

When we write an article or some other type of ducument where it becomes necessory to know the owner of that article.In HTML the element where the name of the owner,writer or composer is mentioned is called cite tag.This is usefull and very important tag which some time saves you from copyright act.So don't forget to use the cite tag using some article of others.

The syntax for the Program code elements.

The syntax for code:

 a = "name";
 b = "address";
 c = "age";

Explaination of code tag

To display some computer codes in html output are done by using code tag.It font style is according to the browers. But make the code unique in display and user can understand that, the shown text is code.

The syntax for variables:

<var>    show Variable    </var>

Explaination of variables

If you are a programmer than we will be aware of variables in programming.To show variables in html there is variable tag.This make varibles look unique so that the user can easily understand the variables shown in html documnet.These are mostly shown in italic style while they depend on browser default font.

The syntax for sample:

<samp>    warnings!    </samp>

Explaination of sample tag.

When the user want to show some samples, quoted text to make it's look unique then he use samp tag. It's font style is according to the browser's default font style.

The syntax for kbd:

<kbd>    ctrl + c    </kbd>
<kbd>    ctrl + x    </kbd>
<kbd>    ctrl + s    </kbd>

kbd tag's explainations

There are many keybord shortcuts and buttons in keyboard. When user want to show some keyboard shortcut or some keyboards buttons in the html output the he use "kbd" tag. For example "Ctrl + c" is used to copy text.When we show it in html output as a plain text user will be little confused, but when we make it's looks unique by showning it through the "kbd" tag, than it will be very easy for user to understand that is the keyboard shortcut or any button.

The Best

Comment here

If you have any query, if you want to know something about any of technical course related to computer science field, if you have any suggestion about relevant to uploaded content or if you anything wrong here (any mistake in content) than please contact us. Keep in mind, comment should be according to community guidelines.