HTML Links: Example
HTML Links: Example
Example
Example
<!DOCTYPE html>
<html>
<body>
<h2>HTML Links</h2>
</body>
</html>
HTML Images
HTML images are defined with the <img> tag.
The source file (src), alternative text (alt), width, and height are provided as
attributes:
Example
<!DOCTYPE html>
<html>
<body>
<h2>HTML Images</h2>
</body>
</html>
HTML Buttons
HTML buttons are defined with the <button> tag:
Example
<!DOCTYPE html>
<html>
<body>
<h2>HTML Buttons</h2>
<button>Click me</button>
</body>
</html>
HTML Lists
HTML lists are defined with the <ul> (unordered/bullet list) or
the <ol> (ordered/numbered list) tag, followed by <li> tags (list items):
Example
<!DOCTYPE html>
<html>
<body>
<ul>
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ul>
<ol>
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ol>
</body>
</html>
Empty HTML Elements
HTML elements with no content are called empty elements.
<br> is an empty element without a closing tag (the <br> tag defines a line
break):
<!DOCTYPE html>
<html>
<body>
</body>
</html>
<tagname style="property:value;">
<!DOCTYPE html>
<html>
<body>
<p>I am normal</p>
</body>
</html>
HTML also defines special elements for defining text with a special meaning.
HTML uses elements like <b> and <i> for formatting output,
like bold or italic text.
<!DOCTYPE html>
<html>
<body>
</html>
<!DOCTYPE html>
<html>
<body>
<blockquote cite="http://www.worldwildlife.org/who/index.html">
For nearly 60 years, WWF has been protecting the future of nature. The world's leading conservation
organization, WWF works in 100 countries and is supported by more than one million members in the
United States and close to five million globally.
</blockquote>
</body>
</html>
CSS Starting
<!DOCTYPE html>
<html>
<head>
<style>
body {background-color: powderblue;}
h1 {color: blue;}
p {color: red;}
</style>
</head>
<body>
<h1>This is a heading</h1>
<p>This is a paragraph.</p>
</body>
</html>