91-9990449935 0120-4256464 |
HTML FormattingHTML FormattingHTML Formatting is a process of formatting text for better look and feel. There are many formatting tags in HTML. These tags are used to make text bold, italicized, or underlined. There are almost 12 options available that how text appears in HTML and XHTML. Here, we are going to learn 12 HTML formatting tags. 1) Bold TextIf you write anything within <b>............</b> element, is shown in bold letters. See this example: Test it NowOutput: Write Your First Paragraph in bold text. 2) Italic TextIf you write anything within <i>............</i> element, is shown in italic letters.See this example: Test it NowOutput: Write Your First Paragraph in italic text. 3) HTML Marked formattingIf you want to mark or highlight a text, you should write the content within <mark>.........</mark>. See this example: Test it NowOutput: I want to put a Mark on your face4) Underlined TextIf you write anything within <u>.........</u> element, is shown in underlined text. See this example: Test it NowOutput: Write Your First Paragraph in underlined text. 5) Strike TextAnything written within <strike>.......................</strike> element is displayed with strikethrough. It is a thin line which cross the statement. See this example: Test it NowOutput: 6) Monospaced FontIf you want that each letter has the same width then you should write the content within <tt>.............</tt> element. Note: We know that most of the fonts are known as variable-width fonts because different letters have different width. (for example: 'w' is wider than 'i'). Monospaced Font provides similar space among every letter. See this example: Test it NowOutput: Hello Write Your First Paragraph in monospaced font. 7) Superscript TextIf you put the content within <sup>..............</sup> element, is shown in superscript ; means it is displayed half a character's height above the other characters. See this example: Test it NowOutput: Hello Write Your First Paragraph in superscript. 8) Subscript TextIf you put the content within <sub>..............</sub> element, is shown in subscript ; means it is displayed half a character's height below the other characters. See this example: Test it NowOutput: Hello Write Your First Paragraph in subscript. 9) Deleted TextAnything that puts within <del>..........</del> is displayed as deleted text. See this example: Test it NowOutput: Hello 10) Inserted TextAnything that puts within <ins>..........</ins> is displayed as inserted text. See this example: Test it NowOutput: 11) Larger TextIf you want to put your font size larger than the rest of the text then put the content within <big>.........</big>. It increase one font size larger than the previous one. See this example: Test it NowOutput: Hello Write the paragraph in larger font. 12) Smaller TextIf you want to put your font size smaller than the rest of the text then put the content within <small>.........</small>tag. It reduces one font size than the previous one. See this example: Test it NowOutput: Hello Write the paragraph in smaller font.
Next TopicHTML Heading
|