Horje

Full Example of The <span> Element in HTML

When used together with CSS, the <span> element can be used to style parts of the text:
index.html
Example: HTML
<!DOCTYPE html>
<html>
<body>

<h1>The span element</h1>

<p>My mother has <span style="color:blue;font-weight:bold;">blue</span> eyes and my father has <span style="color:darkolivegreen;font-weight:bold;">dark green</span> eyes.</p>

</body>
</html>

Output should be:

Full Example of The <span> Element in HTML



Single Articles
Basic Example of The <span> Element in HTMLHTML Block and Inline Elements
Full Example of The <span> Element in HTMLHTML Block and Inline Elements


Related Articles
What is HTML Block and Inline Elements HTML Block and Inline Elements
How to create HTML Block-level Elements HTML Block and Inline Elements
How to create HTML Inline Elements HTML Block and Inline Elements
How to crearte The <div> Element in HTML HTML Block and Inline Elements
How to create The <span> Element in HTML HTML Block and Inline Elements

Type:
Html
Category:
Web Tutorial
Sub Category:
HTML Block and Inline Elements
Uploaded by:
Admin