HTML Document
HTML Document
Creating HTML file does not require a server and it must end with the .htm or .html extension. It runs in
a web browser, having index.html as the root or homepage of a website.
Syntax: <tagname>content</tagname>
Heading provides a title for each section of an HTML document. It ranges from 1 to 6, 1 being the
highest and 6 being the lowest.
Example:
<h1>First Heading</h1>
<h2>Second Heading</h2>
<h3>Third Heading</h3>
<h4>Fourth Heading</h4>
<h5>Fifth Heading</h5>
<h6>Sixth Heading</h6>
Example:
Inline elements do not start on a new line and take only the necessary width. While, block elements
start on a new line and take full width available. Examples of block level elements are <div>, <h1>-<h6>,
<p>, <form>. Examples of inline level elements are <span>, <img>, <a>, <strong>, <em>.
Tag attributes provide additional information to elements. Every tag can have attributes that are placed
within the start tag after the element name with space in between. It is usually paired with a key/value;
it is possible to have a key only without value.
List is a series of items enclosed by either <ul> if unordered and <ol> if ordered. Each of the items within
the list is enclosed by <li>.
Example:
<ul>
<li>First Unordered Item</li>
<li>Second Unordered Item</li>
<li>Third Unordered Item</li>
</ul>
<ol>
<li>First Ordered Item</li>
<li>Second Ordered Item</li>
<li>Third Ordered Item</li>
</ol>