Paragraphs
Paragraphs are defined with the
<p> tag.
<p>This
is a paragraph</p>
<p>This is another
paragraph</p>
|
Line Breaks
The <br> tag is used when
you want to break a line, but don't want to start a new
paragraph. The <br> tag
forces a line break wherever you place it.
<p>This
<br> is a para<br>graph with line breaks</p>
|
Comments in HTML
The comment tag is used to insert
a comment in the HTML source code. A comment
will be ignored by the browser.
You can use comments to explain your code, which
can help you when you edit the
source code at a later date.
<!-- This
is a comment -->
|
Examples
Text formatting
This example demonstrates how you
can format text in an HTML document.
Program 1:
<html>
<body>
<b>This
text is bold</b>
<br>
<strong>
This text is strong
</strong>
<br>
<big>
This text is
big
</big>
<br>
<em>
This text is
emphasized
</em>
<br>
<i>
This text is
italic
</i>
<br>
<small>
This text is
small
</small>
<br>
This text
contains
<sub>
subscript
</sub>
<br>
This text
contains
<sup>
superscript
</sup>
</body>
</html>
|
Text Formatting Tags
Tag
|
Description
|
<acronym>
|
Defines an acronym
|
<abbr>
|
Defines an abbreviation
|
<address>
|
Defines contact information for
the author/owner of a document
|
<b>
|
Defines bold text
|
<bdo>
|
Defines the text direction
|
<big>
|
Defines big text
|
<blockquote>
|
Defines a long quotation
|
<center>
|
Deprecated. Defines centered text
|
<cite>
|
Defines a citation
|
<code>
|
Defines computer code text
|
<del>
|
Defines deleted text
|
<dfn>
|
Defines a definition term
|
<em>
|
Defines emphasized text
|
<font>
|
Deprecated. Defines font, color,
and size for text
|
<i>
|
Defines italic text
|
<ins>
|
Defines inserted text
|
<kbd>
|
Defines keyboard text
|
<pre>
|
Defines preformatted text
|
<q>
|
Defines a short quotation
|
<s>
|
Deprecated. Defines strikethrough
text
|
<samp>
|
Defines sample computer code
|
<small>
|
Defines small text
|
<strike>
|
Deprecated. Defines strikethrough
text
|
<strong>
|
Defines strong text
|
<sub>
|
Defines subscripted text
|
<sup>
|
Defines superscripted text
|
<tt>
|
Defines teletype text
|
<u>
|
Deprecated. Defines underlined
text
|
<var>
|
Defines a variable part of a text
|
<xmp>
|
Deprecated. Defines preformatted
text
|
<head>
|
Defines information about the
document
|
<title>
|
Defines the document title
|
<meta>
|
Defines metadata about an HTML
document
|
<base />
|
Defines a default address or a
default target for all links on a page
|
<basefont />
|
Deprecated. Defines a default
font, color, or size for the text in a page
|
No comments:
Post a Comment