Professional Documents
Culture Documents
Lecture 3
Lecture 3
<h1>This is a heading</h1>
<p>This is a paragraph.</p>
</body>
</html>
• The <table> tag defines an HTML table.
• The <tr> element defines a table row, the <th> element defines a
table header, and the <td> element defines a table cell.
The <div> tag is used as a container for HTML elements - which is then styled
with CSS or manipulated with JavaScript.
Note: By default, browsers always place a line break before and after the
<div> element.
Example
<div class="myDiv">
<h2>This is a heading in a div element</h2>
<p>This is some text in a div element.</p>
</div>
</body>
</html>
Frame & Frameset
Not Supported in HTML5.
</body>
</html>
Definition and Usage
Note: You can have several <header> elements in one HTML document. However,
<header> cannot be placed within a <footer>, <address> or another <header>
element.
Example
The <span> tag is much like the <div> element, but <div> is
a block-level element and <span> is an inline element.
Example
Preformatted text:
<pre>
Text in a pre element
is displayed in a fixed-width
font, and it preserves
both spaces and
line breaks
</pre>
Definition and Usage
The <a> tag defines a hyperlink, which is used to link from one page to
another.
The most important attribute of the <a> element is the href attribute, which
indicates the link's destination.
Tip: Use CSS to style links: CSS Links and CSS Buttons.
Example
To embed video or audio, it is better to use the <video> and <audio> tags
Example
An embedded image:
<object data="pic_trulli.jpg" width="300"
height="200"></object> Example
An embedded video:
<object data="video.mp4" width="400"
height="300"></object>