Pages

Thursday, May 19, 2011

HTML #8: Styles

<html>
<body style="background-color:PowderBlue;">

<h2 style="background-color:red;">This is a heading</h2><p style="font-size:30px;">This text is 30 pixels high</p>
<h1 style="text-align:center;">Center-aligned heading</h1></body>
</html>

HTML #7: Fonts

<h1 style="font-family:verdana"
style="font-size:110%"
style="color:blue">
This is a heading</h1>


<p style="font-family:verdana;font-size:110%;color:red">
This is a paragraph with some text in it.</p>


This is a heading

This is a paragraph with some text in it.

Monday, May 16, 2011

HTML #6: Formattting

<html>
<body>

<p><b>This text is bold</b></p>
<p><strong>This text is strong</strong></p>
<p><big>This text is big</big></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>


<pre>
This is
preformatted text.
It preserves      both spaces
and line breaks.
</pre>


<address>
Written by W3Schools.com<br />
<a href="
mailto:us@example.org">Email us</a><br />
Address: Box 564, Disneyland<br />
Phone: +12 34 56 78
</address>


<p>The <abbr title="World Health Organization">WHO</abbr> was founded in 1948.</p>
<p>The title attribute is used to show the spelled-out version when holding the mouse pointer over the acronym or abbreviation.</p>

<bdo dir="rtl">
Here is some Hebrew text
</bdo>


A long quotation:
<blockquote>
This is a long quotation. This is a long quotation. This is a long quotation. This is a long quotation. This is a long quotation.
</blockquote>

<p><b>Note:</b> The browser inserts white space before and after a blockquote element. It also inserts margins.</p>
A short quotation:
<q>This is a short quotation</q>

<p><b>Note:<b> The browser inserts quotation marks around the short quotation.</p>

<p>My favorite color is <del>blue</del> <ins>red</ins>!</p>
<p>Notice that browsers will strikethrough deleted text and underline inserted text.</p>
</body>
</html>


This text is bold
This text is strong
This text is big
This text is italic
This text is emphasized
This is computer output
This is subscript and superscript

This is
preformatted text.
It preserves      both spaces
and line breaks.
Written by W3Schools.com
Email us
Address: Box 564, Disneyland
Phone: +12 34 56 78

The WHO was founded in 1948.
The title attribute is used to show the spelled-out version when holding the mouse pointer over the acronym or abbreviation.

txet werbeH emos si ereH

A long quotation:
This is a long quotation. This is a long quotation. This is a long quotation. This is a long quotation. This is a long quotation.
Note: The browser inserts white space before and after a blockquote element. It also inserts margins.
A short quotation: This is a short quotation
Note: The browser inserts quotation marks around the short quotation.

My favorite color is blue red!
Notice that browsers will strikethrough deleted text and underline inserted text.

Sunday, May 15, 2011

HTML #5: Line Breaks

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

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

This is
a para
graph with line breaks

HTML #4: How to View HTML Source

Have you ever seen a Web page and wondered "Hey! How did they do that?"

To find out, right-click in the page and select "View Source" (IE) or "View Page Source" (Firefox), or similar for other browsers. This will open a window containing the HTML code of the page.

HTML #3: Comments

Comments can be inserted into the HTML code to make it more readable and understandable. Comments are ignored by the browser and are not displayed.

<!-- This is a comment -->

HTML #2: HTML Lines

The <hr /> tag creates a horizontal line in an HTML page.

<html>
<body>
<p>The hr tag defines a horizontal rule:</p>
<hr />
</body>
</html>


The hr tag defines a horizontal rule: