0% found this document useful (0 votes)
0 views

Module 1 Lecture 1

An HTML 5 document consists of three parts: a version information line, a header section, and a body containing content. HTML is primarily used to create web pages, utilizing tags for structure and hyperlinks for navigation. The document also explains block-level and inline elements, highlighting their characteristics and usage in HTML.

Uploaded by

drshantanushahi
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
0 views

Module 1 Lecture 1

An HTML 5 document consists of three parts: a version information line, a header section, and a body containing content. HTML is primarily used to create web pages, utilizing tags for structure and hyperlinks for navigation. The document also explains block-level and inline elements, highlighting their characteristics and usage in HTML.

Uploaded by

drshantanushahi
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 7

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.

You might also like