Tuesday, October 17, 2017

CLASS 11 - HOW TO CREATE DIV ELEMENT AND SPAN ELEMENT IN HTML OR BLOCK LEVEL ELEMENTS AND INLINE ELEMENTS IN HTML

What is Div element/Block level elements, Span element/Inline elements in html? How we create those things in HTML?

<div>, <span> elements/tags are used in HTML as a block level or inline elements in HTML.

File Name:  "span.html"

<html>
<head>
<title>Demo on <span> element</title>
</head>
<body>
<div>

In the HTML language, div element is a block level element that can be used as a container for grouping other HTML elements.

The div element has no special meaning. Except that, because it is a block level element, the browser will display a line break before and after it.

<span style="color:blue">Another common use of the div element, is for document/page layout. It replaces the "old way" of defining layout using tables.</span> the same text is used to see the change with div now...

<div style="color:blue">Another common use of the div element, is for document/page layout. It replaces the "old way" of defining layout using tables.</div>

Using table elements for layout is not the correct use of table.

The purpose of the table element is to display tabular data.

</div>
</body>
</html>

OUTPUT:



Watch the below video for more details on the above program:



*************************************************************************

No comments:

Post a Comment