span tags of html

 

What is html span tags?

The <span> tag is an inline container used to mark up a part of a text, or a part of a document. The <span> tag is easily styled by CSS or manipulated with Javascript using the class or id attribute. The<span> tag is much like the <div> is a block-level element and <span> is an inline element.

When to use span tag in  HTML?

You should use span when you want to style a particular part of your content differently or manipulate it with Javascript. You can also use it as a container for inline elements 

List of span tags :-

<a>

<abbr>

<acronym>

<b>

<bdo>

<big>

<br>

<button>

<cite>

<code>

<dfn>

<em>

<i>

<img>

<input>

<kbd>

<label>

<map>

<object>

<tt>

<var>

<output>

<q>

<samp>

<script>

<select>

<small>

<span>

<strong>

<sub>

<textarea>

<time>

 

Tables in HTML :-

Defining Tables in HTML : An HTML table is defined with the “table” tag. Each table row is defined with the “tr” tag. A table header is defined with the “th” tag. By default. Table headings are bold and centered.

Tables are used to represent real life table data,

<tr> :- used to display table row.

<td> :- used to display table data.

<th> :- used to display table header.

Ex:- table in html

<table>

  <tr>

<th> name </th>

<th> roll no </th>

</tr>

<tr>

<th> shinde </th>

<th> 2004 </th>

</tr>

</table>

Comments

Popular Posts