You are on page 1of 11

HTML SAGUSANOV

http://www.w3schools.com/html/default.asp
HTML Headings
Headings are defined with the <h1> to <h6> tags.
<h1> defines the most important heading. <h6> defines the least important
heading.

<h1>This is heading 1</h1>


<h2>This is heading 2</h2>
<h3>This is heading 3</h3>
<h4>This is heading 4</h4>
<h5>This is heading 5</h5>
<h6>This is heading 6</h6>
HTML Paragraphs
Tag Description
<p> Defines a paragraph
<br> Inserts a single line break
<pre> Defines pre-formatted text

<p>This is<br>a paragraph<br>with line breaks.</p>


HTML Images
<!DOCTYPE html>
<html>
<body>

<h2>Spectacular Mountain</h2>
<img src="pic_mountain.jpg" width=“100%">

</body>
</html>
HTML Tables
<table style="width:100%">
<tr>
<th>Firstname</th>
<th>Lastname</th>
<th>Age</th>
</tr>
<tr>
<td>Jill</td>
<td>Smith</td>
<td>50</td>
</tr>
<tr>
<td>Eve</td>
<td>Jackson</td>
<td>94</td>
</tr>
</table>
HTML Links
In HTML, links are defined with the <a> tag:

<a href=“bab1.html">Bab 1</a>


<a href=“soal1.html">Soal 1</a>
The HTML <audio> Element
<audio controls>
<source src="horse.ogg" type="audio/ogg">
<source src="horse.mp3" type="audio/mpeg">
Your browser does not support the audio element.
</audio>
HTML5 Video
<video width=“100%" controls>
<source src="movie.mp4" type="video/mp4">
<source src="movie.ogg" type="video/ogg">
Your browser does not support the video tag.

HTML YouTube Videos


<iframe width=“100%" src="https://www.youtube.com/embed/XGSy3_Czz8k">
</iframe>
HTML Text Formatting
In the previous chapter, you learned about
the HTML style attribute.
<b> - Bold text
<strong> - Important text
<i> - Italic text <!DOCTYPE html>
<em> - Emphasized text <html>
<mark> - Marked text <body>
<small> - Small text <p><b>This text is bold</b></p>
<del> - Deleted text <p><i>This text is italic</i></p>
<ins> - Inserted text <p>This is<sub> subscript</sub> and
<sub> - Subscript text <sup>superscript</sup></p>

<sup> - Superscript text </body>


</html>
HTML Background Color
The background-color property defines the background color for an HTML
element.
This example sets the background color for a page to powderblue:

<body style="background-color:powderblue;">

<h1>This is a heading</h1>
<p>This is a paragraph.</p>

</body>
Style HTML Text
The color property defines the text color for an HTML element:
<h1 style="color:blue;">This is a heading</h1>
<p style="color:red;">This is a paragraph.</p>

<h1 style="font-family:verdana;">This is a heading</h1>


<p style="font-family:courier;">This is a paragraph.</p>

<h1 style="font-size:300%;">This is a heading</h1>


<p style="font-size:160%;">This is a paragraph.</p>

<h1 style="text-align:center;">Centered Heading</h1>


<p style="text-align:center;">Centered paragraph.</p>

You might also like