Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Example
<a href="http://www.iqbal.com/">Visit
IQbaL</a>
Example
<a href="http://www.iqbal.com/"
target="_blank">Visit IQbaL</a>
Example
An anchor with an id inside an HTML document:
<a id="tips">Useful Tips Section</a>
Create a link to the "Useful Tips Section" inside the same document:
<a href="#tips">Visit the Useful Tips Section</a>
Or, create a link to the "Useful Tips Section" from another page:
<a href="http://www.iqbal.com/html_links.htm#tips">
Visit the Useful Tips Section</a>
<body>
The content of the document......
</body>
</html>
<head>
<link rel="stylesheet" type="text/css"
href="mystyle.css">
</head>
However, in this HTML tutorial we will introduce you to CSS using the
style attribute. This is done to simplify the examples. It also makes it
easier for you to edit the code and try it yourself.
Inline Styles
Example :
<!DOCTYPE html>
<html>
<body style="background-color:yellow;">
<h2 style="background-color:red;">This is a heading</h2>
<p style="background-color:green;">This is a paragraph.</p>
</body>
</html>
The results :
Example :
<!DOCTYPE html>
<html>
<body>
<h1 style="font-family:verdana;">A heading</h1>
<p style="font-family:arial;color:red;font-size:20px;">A
paragraph.</p>
</body>
</html>
Example :
<!DOCTYPE html>
<html>
<body>
<h1 style="text-align:center;">Center-aligned heading</h1>
<p>This is a paragraph.</p>
</body>
</html>
<head>
<style type="text/css">
body {background-color:yellow;}
p {color:blue;}
</style>
</head>
Try it yourself