HTML TOPICS

HTML FORMATTING

HTML provides us ability to format text without using CSS. There are many formatting tags in HTML. These tags are used to make text bold, italicized, or underlined. There are almost 14 options available that how text appears in HTML and XHTML.

Bold Text

 If you write anything within <b>….</b> element, is shown in bold letters.

<!DOCTYPE html>
<html>
<head>
<title>BOLD </title>
</head>
<body>

<p><b>This is an important content</b>, and this is normal content</p>
</body>
</html>

Output

boldtext

Italic Text

 If you write anything within <i>….</i> element, is shown in italic letters.

<!DOCTYPE html>
<html>
<head>
<title>BOLD </title>
</head>
<body>

<p><i>This is an important content</i>, and this is normal content</p>
</body>
</html>

Output

italic

Underlined Text

Anything within <u>………</u> element, is shown in underlined text

<!DOCTYPE html>
<html>
<head>
<title>WebPage</title>
</head>
<body>
<h1><u>UNDERLINED</u></h1>
<h2> NORMAL CONTENT</h2>
</body>
</html>

Output

DOWNLOAD LATEST PROJECTS

FORMATING

USE

EXAMPLE

<b>....</b>

Displayed in Bold Text

<p >HELLO<b>Bold</b></p>

<i>.....</i>

Displayed in italized form

<h1 >HELLO<i>Italics</i></h1>

<u>...</u>

Underlined Text

<h1 >hello<u>Underline</u></h1>

<strike>...</strike>

Strike Text

<p ><strike>content</strike></p>

<sup>...</sup>

Superscript Text

<p>This is <sup>superscript</sup></p>

<sub...</sub>

Subscript Text

<p>This is<sub>Subscript</sub></p>

IMAGE ATTRIBUTES <img/>

USE

EXAMPLE

Src

Image url

<img src="image.png" alt="Test Image"/>

Width,Height

Set image width and height in pixels

<img src="image.png" width="100" height="100"/>

Border

Set image border.0 means No border.

<img src="image.png" border="2"/>

Align

Image Alignment-Left,Center or Right.

<img src="image.png align="right"/>