index
HTML Hyper Text Markup Language
HTML Hyper Text Markup Language
An HTML element is everything from the start tag to the end tag.
Attributes come in name/value pairs like:
name = "value"
URL - Uniform Resource Locator
scheme://host.domain:port/path/filename
scheme - defines the type of Internet service. The most common type is http
host - defines the domain host (the default host for http is www)
domain - defines the Internet domain name, like w3schools.com
port - defines the port number at the host (the default port number for http is 80)
path - defines a path at the server (If omitted, the document must be stored at the root directory of the web site)
filename - defines the name of a document/resource
A URL can be composed of words, such as "w3schools.com", or an Internet Protocol (IP) address: 192.68.20.50
https Secure HyperText Transfer Protocol
ftp File Transfer Protocol
ISP Internet Service Provider
<html> <head> <title> Title of the document </title> </head> <body> </body> </html>
<!-- comment -->
Anchor
<a href = http://www.w3schools.com >
Visit W3Schools.com! </a>
---------------------------------
The <abbr title = "World Health Organization">
WHO </abbr> was founded in 1948.
-------------------------------
Can I get this <acronym title="as soon as possible">
ASAP </acronym> ?
--------------------------------
<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>
----------------------------------
<html><body>
<p> Click on the sun or on one of the planets to watch it closer: </p>
<img src = "planets.gif" width = "145" height = "126" alt = "Planets" usemap = "#planetmap" />
<map name="planetmap">
< area shape = "rect" coords = "0,0,82,126"
alt = "Sun" href = "sun.htm" />
<area shape = "circle" coords = "90,58,3" alt = "Mercury" href="mercur.htm" />
<area shape = "circle" coords = "124,58,8" alt = "Venus" href = "venus.htm" />
</map>
</body></html>
-----------------------------
Link to the same page
<a href="#C4"> See also Chapter 4 </a>
<a name="C4"> Chapter 4 </a>
----------------------------------
<h1>BiggestHeading</h1>
<h2>BiggerHeading</h2>
<h6>small</h6>
----------------------------------
horizontal line <hr>
----------------------------------
<form name="input" action="Some URL" method="get" >
<input type="button" value="Hello world!">
First name:<input type="text" name="firstname">
Password:<input type="password" name="pwd">
<input type="radio" name="sex" value="male" > Male
<input type="radio" name="sex" value="female" > Female
<input type="checkbox" name="vehicle" value="Bike"> I have a bike
<input type="checkbox" name="vehicle" value="Car">
I have a car
<select name="cars">
<option value="volvo"> Volvo </option>
<option value="saab"> Saab </option>
</select>
<textarea rows = "10" cols = "30">
The cat was playing in the garden.
</textarea>
<input type="submit" value="Submit">
</form>
----------------------------------
<table border="1" cellpadding="10" >
<caption>Monthly savings</caption>
<tr><th>header1</th><th>header2</th></tr>
<tr><td>a1</td><td>a2</td></tr>
<tr><td>b1</td><td>b2</td></tr>
</table>
----------------------------------
<b>bold</b> <strong>strong</strong>
<big>big</big> <i>italic</i>
<em>emphasized</em>
<code>computer output</code>
<sub>subscript</sub>
<sup>superscript</sup>
<del>deleted</del> <ins> inserted </ins>
--------------------------------------------------
<body style="background-color:yellow;">
<h2 style="background-color:red;">heading</h2>
<p style="background-color:green;">paragraph.</p>
</body>
--------------------------------------------------
<h1 style="text-align:center;">Center-aligned</h1>
------------------------------------------------
<a href = "http://something" target = "_blank"> somewebsite </a>
link will open in a new browser
------------------------------------------------
<img src="url" alt = "some_text"/>
------------------------------------------------
ordered list
<ol> <li>Coffee</li> <li>Milk</li> </ol>
1. Coffee
2. Milk
------------------------------------------------
unordered list
<ul> <li>Coffee</li> <li>Milk</li> </ul>
------------------------------------------------
<frameset cols="25%,50%,25%">
<frame src="frame_a.htm" />
<frame src="frame_b.htm" />
<frame src="frame_c.htm" />
</frameset>
------------------------------------------------
display a web page within a web page
<iframe src="URL"> </iframe>
------------------------------------------------
<script type="text/javascript">
document.write("Hello World!") </script>
<noscript>Sorry, your browser does not support JavaScript!</noscript>
------------------------------------------------
& nbsp ; space
------------------------------------------------
External Style Sheet
<head> <link rel = "stylesheet" type = "text/css"
href = "mystyle.css" /> </head>
Internal Style Sheet
<head> <style type="text/css">
body {background-color:yellow;}
p {color:blue;}
</style> </head>
Inline Styles
<p style = "color:blue; margin-left:20px;" >
This is a paragraph.</p>
No comments:
Post a Comment