-
HTML Choosing Editors
-
HTML Basic Structure
-
HTML Head
-
HTML Element
-
HTML Attribute
-
HTML Headings
-
HTML Paragraphs
-
HTML Style
-
HTML Formatting
-
HTML Colors
-
HTML CSS
-
HTML Comments
-
HTML Links
-
HTML Images
-
HTML Table
-
HTML List
-
HTML Block and Inline
-
HTML Class & Id
-
HTML iFrames
-
HTML JavaScript
-
HTML File Paths
-
HTML Layout
-
HTML Responsive
-
HTML Style Guide
-
HTML Forms
Formatting Text with HTML
HTML provides various tags and attributes to format text on a web page. Text formatting allows you to control the appearance of your text, including text style, size, emphasis, and more. These formatting options help you create visually appealing and readable content.
HTML offers several tags to change the style of text. Here are some commonly used text style tags:
HTML Element | Description |
---|---|
<b> | The <b> element is a physical tag used to make text bold without any specific logical importance. |
<strong> | The <strong> element is a logical tag that displays text in bold and indicates its logical importance. |
<i> | The <i> element is a physical tag used to make text italic. |
<em> | The <em> element is a logical tag used to display content in italic. |
<mark> | The <mark> element is used to highlight text. |
<u> | The <u> element is used to underline text. |
<tt> | The <tt> element is used to display text in teletype (not supported in HTML5). |
Below are the examples for the first two elements:
<p><b>Write Your First Paragraph in bold text.</b></p>
<p><strong>This is an important content</strong>, and this is normal content</p>
<p>This is <i>italic</i> text.</p>
<p>This is <em>emphasized</em> text.</p>
<p>This is <u>underlined</u> text.</p>
<p>This is <mark>highlighted</mark> text. </p>
<p>This is <tt>teletype</tt> text.</p>
<p>This is <strike>strikethrough</strike> text.</p>
<p>This is <sup>superscript</sup> text.</p>
<p>This is <sub>subscript</sub> text.</p>
<p>This is some <del>deleted</del> text.</p>
<p>This is some <ins>added</ins> text.</p>
<p>This is <big>larger</big> text.</p>
<p>This is <small>smaller</small> text.</p>
These HTML text formatting elements provide a wide range of options to style and format text content on web pages. Text formatting in HTML allows you to enhance the visual appearance of your content. However, keep in mind that it’s often best to use CSS for styling to maintain a separation of content and presentation.
YouTube Reference :
#4 Paragraph, Bold, mark Tag in HTML Explained | | Web Development Tutorials