Formatting is the process of stylizing text in a document. Formatting text are like bold, italic, underline etc. Html offers a handful of special tags that can be utilized to stylize text.
|<b>||Defines text as bold.|
|<i>||Defines text as italic.|
|<u>||Defines text with underline.|
|<em>||Defines text as emphasized.|
|<small>||Defines text as smaller than other.|
|<strong>||Defines text as important with bold.|
|<sup>||Defines text as superscripted.|
|<sub>||Defines text as subscripted.|
|<ins>||Defines text as inserted.|
|<del>||Defines text as deleted.|
|<mark>||Defines text as highlighted.|
|<code>||Defines text as computer code.|
|<kbd>||Defines text as keyboard text.|
|<samp>||Defines text as sample computer code.|
|<var>||Defines text as variable.|
|<pre>||Defines text as preformatted.|
|<abbr>||Defines text as abbreviation or acronym.|
|<address>||Defines text as contact information for the author/owner of a document.|
|<bdo>||Defines text direction.|
|<blockquote>||Defines text section that is quoted from another source.|
|<q>||Defines text as short quotation.|
|<cite>||Defines text as title of a work.|
|<dfn>||Defines text as definition term.|
The <font> element provides no real functionality by itself, but with the help of a few attributes, this element is used to change the style, size, and color of Html text elements. The size, color, and face attributes can be used all at once or individually, providing users with the ability to create dynamic font styles for Html document. (Not supported in HTML 5.)
|face||Specifies the font type of the text.|
|size||Specifies the size of text.|
|color||Specifies the color of text.|
Comments are a great asset to new developers and a great way to place little notes to reminding what pieces of code are doing what. Comments are also great ways to troubleshoot bugs and code errors.
The line break is used in Html text elements, and it is the equivalent of pressing Enter or Return on keyboard. In short, a line break ends the line and resumes on the next line.
The <br /> tag use to break a line (a new line) without starting a new paragraph. This tag is an example of an empty element, where you do not need opening and closing tags, as there is nothing to go in between them.
The <br /> element has a space between the characters br and the forward slash. If we omit this space, older browsers will have trouble rendering the line break, while if we miss the forward slash character and just use <br> it is not valid XHTML