DOCTYPE html
DOCTYPE html
This is heading 6
<h1>My First Heading</h1>
HTML Links
This is heading 3
HTML links are defined with the a tag:
This is a link
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<body> <body>
<a
href="https://www.w3schools.com">Visit
W3Schools</a>
</body>
</html>
<!DOCTYPE html> You cannot omit quotes around an
<html> attribute value if the value contains
<body> spaces.
If you move the mouse over the
<a paragraph above, your browser will only
href=https://www.w3schools.com>This is display the first word from the title.
a link</a>
<!DOCTYPE html>
</body> <html>
</html> <body>
</body> Heading 6
</html>
About W3Schools
<!DOCTYPE html> <p>Meta data is data about the HTML
<html> document.</p>
<body>
</body>
<h1>This is heading 1</h1> </html>
<p>This is some text.</p>
<hr> The HTML head element contains meta
data.
<h2>This is heading 2</h2> Meta data is data about the HTML
<p>This is some other text.</p> document.
<hr>
<!DOCTYPE html>
<h2>This is heading 2</h2> <html>
<p>This is some other text.</p> <body>
This paragraph contains a lot of lines in My Bonnie lies over the sea.
the source code, but the browser ignores
it. My Bonnie lies over the ocean.
This paragraph contains a lot of spaces in
the source code, but the browser ignores Oh, bring back my Bonnie to me.
it.
The number of lines in a paragraph </p>
depends on the size of the browser
window. If you resize the browser </body>
window, the number of lines in this </html>
paragraph will change. In HTML, spaces and new lines are
ignored:
<!DOCTYPE html> My Bonnie lies over the ocean. My
<html> Bonnie lies over the sea. My Bonnie lies
<body> over the ocean. Oh, bring back my Bonnie
to me.
<p style="color:blue;">I am blue</p>
<p style="font-size:50px;">I am big</p>
<!DOCTYPE html>
<html> </body>
<body> </html>
</body> </body>
</html> </html>
<!DOCTYPE html>
heading
<html>
<body> This is a paragraph
<h1 style="font-family:verdana;">This is a <!DOCTYPE html>
heading</h1> <html>
<p style="font-family:courier;">This is a <body>
paragraph.</p>
<h1 style="text-align:center;">Centered
</body> Heading</h1>
</html> <p style="text-align:center;">Centered
paragraph.</p>
This is a </body>
heading </html>
<h1 style="font-size:300%;">This is a
heading</h1>
<!DOCTYPE html> <p><i>This text is italic.</i></p>
<html>
<body> </body>
</html>
<p>This text is normal.</p>
This text is normal.
<p><b>This text is bold.</b></p>
This text is italic.
</body>
</html> <!DOCTYPE html>
<html>
This text is normal. <body>
</body> </body>
</html> </html>
Do not forget to buy milk today.
<!DOCTYPE html>
<html>
<body>
<img src="img_the_scream.jpg"
width="220" height="277" alt="The The Scream by Edvard Munch. Pa
Scream">
<p><cite>The Scream</cite> by Edvard <!DOCTYPE html>
Munch. Painted in 1893.</p> <html>
<body>
</body>
</html> <p>If your browser supports bi-
directional override (bdo), the next line
will be written from right to left (rtl):</p>
The HTML cite element defines
the title of a work. <bdo dir="rtl">This line will be written
from right to left</bdo>
Browsers usually display cite
elements in italic. </body>
</html>
</body>
</html>
A Blue Heading
Isi kosong
A red paragraph.
<!DOCTYPE html>
<!DOCTYPE html>
<html>
<html>
<body>
<head>
<style>
body {background-color: powderblue;} color: blue;
h1 {color: blue;} font-family: verdana;
p {color: red;} font-size: 300%;
</style>
</head> }
<body> p {
color: red;
<h1>This is a heading</h1> font-family: courier;
<p>This is a paragraph.</p> font-size: 160%;
}
</body> </style>
</html> </head>
<body>
<!DOCTYPE html>
<html> <!DOCTYPE html>
<head> <html>
<style> <head>
p{ <style>
border: 2px solid powderblue; p{
padding: 30px; border: 2px solid powderblue;
} margin: 50px;
</style> }
</head> </style>
<body> </head>
<body>
<h1>This is a heading</h1>
<h1>This is a heading</h1>
<p>This is a paragraph.</p>
<p>This is a paragraph.</p> <p>This is a paragraph.</p>
<p>This is a paragraph.</p> <p>This is a paragraph.</p>
<p>This is a paragraph.</p>
</body>
</html> </body>
</html>
This is a heading
This is a heading
This is a paragraph.
This is a paragraph.
This is a paragraph. </div>
</div>
</body>
This is a paragraph. </html>
<!DOCTYPE html>
<html>
CSS = Styles and
<body> Colors
<div style="position:relative;"> M a n i p u l a t e
<div T e x t
style="opacity:0.5;position:absolute;left:5 C o l o r s , B o x e s
0px;top:-
30px;width:300px;height:150px;backgrou <!DOCTYPE html>
nd-color:#40B3DF"></div> <html>
<div <body>
style="opacity:0.3;position:absolute;left:1
20px;top:20px;width:100px;height:170px; <h1>HTML Links</h1>
background-color:#73AD21"></div>
<div style="margin- <p><a
top:30px;width:360px;height:130px;paddi href="https://www.w3schools.com/">Visi
ng:20px;border-radius:10px;border:10px t W3Schools.com!</a></p>
solid #EE872A;font-size:120%;">
<h1>CSS = Styles and Colors</h1> </body>
<div style="letter-spacing:12px;font- </html>
size:15px;position:relative;left:25px;top:2
5px;">Manipulate Text</div> HTML Links
<div style="color:#40B3DF;letter- Visit W3Schools.com!
spacing:12px;font-
size:15px;position:relative;left:25px;top:3 <!DOCTYPE html>
0px;">Colors, <html>
<span style="background- <body>
color:#B4009E;color:#ffffff;"> Boxes</spa
n></div> <h2>Absolute URLs</h2>
<p><a href="https://www.w3.org/" a:visited {
target="_blank">W3C</a></p> color: pink;
<p><a href="https://www.google.com/" background-color: transparent;
target="_blank">Google</a></p> text-decoration: none;
}
<h2>Relative URLs</h2> a:hover {
<p><a href="html_images.asp">HTML color: red;
Images</a></p> background-color: transparent;
<p><a href="/css/default.asp">CSS text-decoration: underline;
Tutorial</a></p> }
a:active {
</body> color: yellow;
</html> background-color: transparent;
text-decoration: underline;
}
</style>
Absolute URLs </head>
<body>
W3C
<h2>Link Colors</h2>
Google
<p>You can change the default colors of
Relative URLs links</p>
<a href="https://www.w3schools.com/"
target="_blank">Visit W3Schools!</a> Image as a Link
<p>If target="_blank", the link will open
The image below is a link. Try to
in a new browser window or tab.</p>
click on it.
</body>
</html>