HTML Lesson: Basic Syntax
HTML adalah singkatan bagi Hyper Text Markup Language.
Basic HTML Syntax
<!DOCTYPE html> <html> <head> <title>Page Title</title> </head> <body> <h1>My First Heading</h1> <p>My first paragraph.</p> </body> </html>
- The DOCTYPE declaration defines the document type to be HTML
- The text between <html> and </html> describes an HTML document
- The text between <head> and </head> provides information about the document
- The text between <title> and </title> provides a title for the document
- The text between <body> and </body> describes the visible page content
- The text between <h1> and </h1> describes a heading
- The text between <p> and </p> describes a paragraph
The HTML <br> element defines a line break.
<p>This is<br>a para<br>graph with line breaks</p>
The HTML <b> element defines bold text, without any extra importance.
<p>This text is normal.</p> <p><b>This text is bold</b>.</p>
The HTML <i> element defines italic text, without any extra importance.
<p>This text is normal.</p> <p><i>This text is italic</i>.</p>
The HTML <small> element defines small text.
<h2>HTML <small>Small</small> Formatting</h2>
The HTML <mark> element defines marked or highlighted text.
<h2>HTML <mark>Marked</mark> Formatting</h2>
The HTML <del> element defines deleted (removed) text.
<p>My favorite color is <del>blue</del> red.</p>
The HTML <ins> element defines inserted (added) text.
<p>My favorite <ins>color</ins> is red.</p>
The HTML <sub> element defines subscripted text.
<p>This is <sub>subscripted</sub> text.</p>
The HTML <sup> element defines superscripted text.
<p>This is <sup>superscripted</sup> text.</p>
Contoh: http://shahrulnizam.com/web/basic_syntax.html
Penerangan lanjut di
Leave a Reply