AIIT - L
1
AIIT - L
2
AIIT - L
What is the HTML document structure?
An HTML 5 document is composed of three parts: a line containing HTML
version information, a declarative header section (delimited by the HEAD
element), a body, which contains the document's actual content.
What is the main use of HTML?
HTML is heavily used for creating pages that are displayed on the world
wide web. Every page contains a set of HTML tags, including hyperlinks
which are used for connecting to other pages. Every page that we witness
on the world wide web is written using a version of HTML code
3
AIIT - L
Block-level Elements
•A block-level element always starts on a new line.
•A block-level element always takes up the full width available (stretches out
to the left and right as far as it can).
•A block level element has a top and a bottom margin,
<html>
<body>
<div style="border: 1px solid black">Hello World</div>
<p>The DIV element is a block element, and will always start on a new line and take
up the full width available (stretches out to the left and right as far as it can).</p>
</body>
</html>
4
AIIT - L
Hello World
The DIV element is a block element, and will always start on a new line and
take up the full width available
5
AIIT - L
Inline Elements
•An inline element does not start on a new line.
•An inline element only takes up as much width as
necessary.
<html>
<body>
<p>This is an inline span <span style="border: 1px solid black">Hello
World</span> element inside a paragraph.</p>
<p>The SPAN element is an inline element, and will not start on a new line and
only takes up as much width as necessary.</p>
</body>
</html>
6
AIIT - L
This is an inline span Hello World element inside a
paragraph.
The SPAN element is an inline element and will not start on
a new line and only takes up as much width as necessary.