Scanner class Methods in Java

Formatting HTML Elements

Formatting Elements

Formatting means to make the look of element beautiful and remarkable. HTML can be used to format elements . HTML has certain tags that can modify the look and feel of elements. These tags helps the programmers to style the elements.

for example, the code shown below is to format the text in certain ways.

The HTML:

<html>
<head>
<title>First Page</title>
</head>
<body>
<p>This is a regular text.</p>
<p><b>Bold Text</b></p>
<p><big>Big Text</big></p>
<p><i>Italic Text</i></p>
<p><small>Small Text</small></p>
<p><strong>Strong Text</strong></p>
<p><sub>Subscripted Text</sub></p>
<p><sup>Superscripted Text</sup></p>
<p><ins>Inserted Text</ins></p>
<p><del>Deleted Text</del></p>
</body>
</html>
Tags that are indicated with Red color are Text Formatting Tags.

Result:

Each paragraph in the example is formatted differently to demonstrate what each Tag does :
formatting text in HTML
Note : Browsers display <strong> as <b>, and <em> as <i>.
However, the meanings of these tags differ, <band <i> define Bold and Italic Text respectively, while <strong> and <em> indicate that the text is "important".

Comments