Professional Documents
Culture Documents
Example
<!DOCTYPE html>
<html>
<body>
<p>Browsers usually insert quotation marks around the q element.</p>
<p>WWF's goal is to: <q>Build a future where people live in harmony
with nature.</q></p>
</body>
</html>
HTML <blockquote> for Quotations
Example
<!DOCTYPE html>
<html>
<body>
<p>Browsers usually indent blockquote elements.</p>
<blockquote cite="http://www.worldwildlife.org/who/index.html">
For 50 years, WWF has been protecting the future of nature.
The world's leading conservation organization,
WWF works in 100 countries and is supported by
1.2 million members in the United States and
close to 5 million globally.
</blockquote>
</body>
</html>
HTML <abbr> for Abbreviations
Example
<!DOCTYPE html>
<html>
<body>
<p>The <abbr title="World Health Organization">WHO</abbr> was
founded in 1948.</p>
<p>Marking up abbreviations can give useful information to browsers,
translation systems and search-engines.</p>
</body>
</html>
HTML <address> for Contact Information
Example
<!DOCTYPE html>
<html>
<body>
<p>The HTML address element defines contact information
(author/owner) of a document or article.</p>
<address>
Written by John Doe.<br>
Visit us at:<br>
Example.com<br>
Box 564, Disneyland<br>
USA
</address>
</body>
</html>
HTML <cite> for Work Title
Example
<!DOCTYPE html>
<html>
<body>
<p>The HTML cite element defines the title of a work.</p>
<p>Browsers usually display cite elements in italic.</p>
<img src="img_the_scream.jpg" width="220" height="277" alt="The
Scream">
<p><cite>The Scream</cite> by Edvard Munch. Painted in 1893.</p>
</body>
</html>
HTML <bdo> for Bi-Directional Override
Example
<!DOCTYPE html>
<html>
<body>
<p>If your browser supports bi-directional override (bdo), the next line
will be written from right to left (rtl):</p>
<bdo dir="rtl">This line will be written from right to left</bdo>
</body>
</html>
HTML Comments
Comment tags are used to insert comments in the HTML source code.
You can add comments to your HTML source by using the following
syntax:
Notice that there is an exclamation point (!) in the opening tag, but not in
the closing tag.
Note: Comments are not displayed by the browser, but they can help
document your HTML source code.
Example
<!DOCTYPE html>
<html>
<body>
<!-- This is a comment -->
<p>This is a paragraph.</p>
<!-- Comments are not displayed in the browser -->
</body>
</html>
Comments are also great for debugging HTML, because you can
comment out HTML lines of code, one at a time, to search for errors:
Example
<!DOCTYPE html>
<html>
<body>
<!-- Do not display this at the moment
<img border="0" src="pic_mountain.jpg" alt="Mountain">
-->
</body>
</html>
Conditional Comments
<!--[if IE 9]>
.... some HTML here ....
<![endif]-->
Conditional comments defines some HTML tags to be executed by
Internet Explorer only.
HTML Colors
Color Names
Example
<!DOCTYPE html>
<html>
<body>
<h2 style="background-color:red">
Background-color set by using red
</h2>
<h2 style="background-color:orange">
Background-color set by using orange
</h2>
<h2 style="background-color:yellow">
Background-color set by using yellow
</h2>
<h2 style="background-color:blue;color:white">
Background-color set by using blue
</h2>
<h2 style="background-color:cyan">
Background-color set by using cyan
</h2>
</body>
</html>
RGB Value
Each parameter (red, green, and blue) defines the intensity of the color
between 0 and 255.
To display the color black, all color parameters must be set to 0, like
this: rgb(0,0,0).
To display the color white, all color parameters must be set to 255, like
this: rgb(255,255,255).
Experiment by mixing the RGB values below:
Example
<!DOCTYPE html>
<html>
<body>
<h2 style="background-color:rgb(255,0,0)">
Background-color set by using rgb(255,0,0)
</h2>
<h2 style="background-color:rgb(0,255,0)">
Background-color set by using rgb(0,255,0)
</h2>
<h2 style="background-color:rgb(0,0,255)">
Background-color set by using rgb(0,0,255)
</h2>
<h2 style="background-color:rgb(255,255,0)">
Background-color set by using rgb(255,255,0)
</h2>
<h2 style="background-color:rgb(255,0,255)">
Background-color set by using rgb(255,0,255)
</h2>
<h2 style="background-color:rgb(0,255,255)">
Background-color set by using rgb(0,255,255)
</h2>
</body>
</html>
Shades of gray are often defined using equal values for all the 3 light
sources:
Example
<!DOCTYPE html>
<html>
<body>
<h2 style="background-color:rgb(0,0,0);color:white">
Background-color set by using rgb(0,0,0)
</h2>
<h2 style="background-color:rgb(90,90,90);color:white">
Background-color set by using rgb(90,90,90)
</h2>
<h2 style="background-color:rgb(128,128,128);color:white">
Background-color set by using rgb(128,128,128)
</h2>
<h2 style="background-color:rgb(200,200,200);color:white">
Background-color set by using rgb(200,200,200)
</h2>
<h2 style="background-color:rgb(255,255,255);">
Background-color set by using rgb(255,255,255)
</h2>
</body>
</html>
HEX Value
Example
<!DOCTYPE html>
<html>
<body>
<h2 style="background-color:#FF0000">
Background-color set by using #FF0000
</h2>
<h2 style="background-color:#00FF00">
Background-color set by using #00FF00
</h2>
<h2 style="background-color:#0000FF">
Background-color set by using #0000FF
</h2>
<h2 style="background-color:#FFFF00">
Background-color set by using #FFFF00
</h2>
<h2 style="background-color:#FF00FF">
Background-color set by using #FF00FF
</h2>
<h2 style="background-color:#00FFFF">
Background-color set by using #00FFFF
</h2>
</body>
</html>
Shades of gray are often defined using equal values for all the 3 light
sources:
Example
<!DOCTYPE html>
<html>
<body>
<h2 style="background-color:#000000;color:white">
Background-color set by using #000000
</h2>
<h2 style="background-color:#808080;color:white">
Background-color set by using #808080
</h2>
<h2 style="background-color:#FFFFFF;">
Background-color set by using #FFFFFF
</h2>
</body>
</html>