HTML Paragraphs & Text Formatting


HTML Paragraphs

html paragraphs and line break :: futureX

Paragraphs are defined with the <p> tag.

Example

<p>This is a paragraph</p>
<p>This is another paragraph</p>

Note: Browsers automatically add an empty line before and after a paragraph.


  • Most browsers will display HTML correctly even if you forget the end tag:

Example

<p>This is a paragraph
<p>This is another paragraph

The example above will work in most browsers, but don't rely on it. Forgetting the end tag can produce unexpected results or errors.

Note: Future version of HTML will not allow you to skip end tags.

HTML Line Breaks


Use the <br> tag if you want a line break (a new line) without starting a new paragraph:

Example

<p>This is<br>a para<br>graph with line breaks</p>

The <br> element is an empty HTML element. It has no end tag.

HTML Text Formatting



<!DOCTYPE html>
<html>
<body>

<p><b>This text is bold</b></p>
<p><strong>This text is strong</strong></p>
<p><i>This text is italic</i></p>
<p><em>This text is emphasized</em></p>
<p><code>This is computer output</code></p>
<p>This is<sub> subscript</sub> and <sup>superscript</sup></p>

</body>
</html>


HTML Text Formatting Example :: futureX



HTML Formatting Tags

HTML uses tags like <b> and <i> for formatting output, like bold or italic text.


« Previous Chapter                                                                                                                                          Next Chapter »



0 comments:

Related Posts Plugin for WordPress, Blogger...
Copyright © 2013 futureX | Blogger Template by Clairvo