March 18, 2017

HTML Blocks # 14

HTML Blocks # 14

HTML Blocks.

HTML blocks means the portions of HTML such as you for example write a <div> HTML tag and put a white coloured heading and paragraph in that , then by css you defined its background color to black then you will see that only the that block of HTML  where that <div> tag ends will have black background and the other portion will have normal color.

Example

Consider this as an example
you defined a div  portion as footer horizontal coloumn with forms and other elements inside it with a background picture.You will do it as .

<div> 
<img />
<form>

</form>
</div>

In div tag you can define your own properties for that block or section.

Live Example.

Luqman Ali Nawaz

This is a div block with white coloured font and black coloured background.

SPAN  <span> element.

<span> element is an inline element that describes some text or small portion of a paragraph as given below.

Example.

This is luqmanalinawaz website.
You probably got the use of span tag.in this i got luqmanalinawaz in span and defined a whole property for it ( style="color:red;")

Grouping tags.

So Span and div are grouping tags that group some material
Span defines an inline small portion while the div defines large block or portion of webpage.

No comments:

Post a Comment