HTML PARAGRAPHS, HTML STYLES & HTML FORMATTING
Hello guys myself Harshith.G.B. Today we are going to continue our journey of learning HTML. Today we will be learning 3 more topics, that are :
HTML paragraphs
HTML styles
HTML formatting
HTML paragraphs
The HTML <p> element defines a paragraph. A paragraph always starts on a new line, and browsers automatically add some white space (a margin) before and after a paragraph.
Example :
<p>
This is paragraph 1
</p>
<p>
This is paragraph 2
</p>
Note : You cannot be sure how HTML will be displayed. Large or small screens, and resized windows will create different results. With HTML, you cannot change the display by adding extra spaces or extra lines in your HTML code. The browser will automatically remove any extra spaces and lines when the page is displayed.
HTML styles
The HTML style attribute is used to add styles to an element, such as color, font, size, and more. Setting the style of an HTML element can be done by using this attribute. The HTML style attribute has the following syntax :
<tagname style=”property:value;”>
Note : This is a CSS property. The value is a CSS value. (Which we will learn after a few modules)
HTML formatting
Formatting elements were designed to display special types of text. Some types of formatting elements are :
<b>- Bold text<strong>- Important text<i>- Italic text<em>- Emphasized text<mark>- Marked text<small>- Smaller text<del>- Deleted text<ins>- Inserted text<sub>- Subscript text<sup>- Superscript text
The HTML <b> element defines bold text, without any extra importance.
Example :
<b>
This text is bold
</b>
The HTML <strong> element defines text with strong importance. The content inside is typically displayed in bold.
Example :
<strong>
This text is important!
</strong>
The HTML <i> element defines a part of text in an alternate voice or mood. The content inside is typically displayed in italic.
Tip: The <i> tag is often used to indicate a technical term, a phrase from another language, a thought, a ship name, etc.
Example :
<i>
This text is italic
</i>
The HTML <em> element defines emphasized text. The content inside is typically displayed in italic.
Tip: A screen reader will pronounce the words in <em> with an emphasis, using verbal stress.
Example :
<em>
This is emphasized
</em>
