HTML PARAGRAPHS
- HTML paragraphs are mainly used to group sentences.
- The <p> element defines HTML Paragraphs
- HTML Paragraphs are block-level elements.
Example:
<! DOCTYPE html> <html> <head> <title> paragraphs </title> </head> <body> <p> 1. This is an HTML paragraph. </p> <p> 2. This is an HTML paragraph. </p> <body> <html> |
Output:
1. This is an HTML paragraph.
2. This is an HTML paragraph.
HTML nbsp:
- HTML nbsp or Non-Breaking Space is a character entity used to keep two or more words stick together or not break into a new line.
- This is useful for situations like these where breaking the words may be disruptive:
- Another use of it is to prevent browsers from removing necessary spaces that we want to be rendered.
Example:
<!-- only a single space will be rendered by th
<p> They are so far away. </p>
<!-- all ten spaces will be rendered by the bro
<p> They are so for away</p>
Output:
They are so far away.
They are so far away.
HTML Quotes
HTML quotes are used to put a short quotation on your website. To do so, you need to use HTML q tag and HTML blockquote tag.
HTML q tag
HTML q tag is used to put small quotation. To do so, write your text within <q>.............</q> tag.
<! DOCTYPE html> <html> <head> <title> paragraphs </title> </head> <body> <p> 1. This is an HTML paragraph. </p> <p> 2. <q>This is an HTML Quatation paragraph. </q></p> <body> <html> |
OUTPUT:
1. This is an HTML paragraph. 2. "This is an HTML Quatation paragraph." |
HTML blockquote tag
HTML blockquote tag is used to define a large quoted section. If you have a large quotation then put the entire text within <blockquote>.............</blockquote> tag.
<! DOCTYPE html> <html> <head> <title> paragraphs </title> </head> <body> <p>This is an HTML paragraph. </p> <blockquote>This is an HTML Quatation paragraph. </blockquote> <body> <html> |
OUTPUT:
This is an HTML paragraph. This is an HTML Block Quatation paragraph." |
HTML <bdo> for Bi-Directional Override
BDO stands for Bi-Directional Override.
The HTML<bdo> tag is used to override the current text direction:
dir="rtl": Direction of text Right to Left (rtl).
<! DOCTYPE html> <html> <head> <title> paragraphs </title> </head> <body> <bdo dir="rtl">HTML </bdo> <body> <html> |
OUTPUT:
LMTH |
HTML <abbr> for Abbreviations
The HTML <abbr> tag defines an abbreviation or an acronym, like "HTML", "CSS", "Mr.", "Dr.", "ASAP", "ATM".
<! DOCTYPE html> <html> <head> <title> paragraphs </title> </head> <body> <p>This is an <abbr title="hyper Text Markup Language">HTML</abbr> paragraph. </p> <body> <html> |
OUTPUT:
This is an HTML paragraph. |
HTML <address> for Contact Information
The HTML <address> tag defines the contact information for the author/owner of a document or an article.
The contact information can be an email address, URL, physical address, phone number, social media handle, etc.
The text in the <address> element usually renders in italic, and browsers will always add a line break before and after the <address> element.
HTML <cite> for Work Title
The HTML <cite> tag defines the title of a creative work (e.g. a book, a poem, a song, a movie, a painting, a sculpture, etc.).
The text in the <cite> element usually renders in italic.