big tag in html with examples




  1. The big element is a text formatting control that increases the enclosed text by one size increment, based on the old HTML font sizes 1 through 7.
  2. Each nested big element will further increase the size by one increment.
  3. This element isn’t deprecated, but it’s used less and less frequently, as there are now better methods for controlling text size (through CSS), and the big element provides no semantic value for any enclosed text— it simply states that the text needs to be bigger.
  4. The big tag is supported in all major browsers.


Example :

<html>
<head><title>Big</title>
</head>
<body>
<p>Normal Text</p>
<big>99codingexamples</big>
</body>
</html>
     

Demo :





The big element renders the text in bigger font.



Nested Big Element :



<html>
<head><title>Nested Big</title>
</head>
<body>
<big>This<big> is<big>20Fingers2Brains</big></big></big>
</body>
</html>
     

Demo :






Big and Style :



<html>
<head>
<title>Big</title>
<style type="text/css">
big
{
color:red;
font-style:italic;
}
</style>
</head>
<body>
<big>20Fingers2Brains</big>
</body>
</html>
     

Demo :






Using style with big tag we can apply font-style, can provide color and much more.



Big and Javascript :



<html>
<head><title>BigJavascript</title>
<style type="text/css">
big
{
color:red;
font-style:italic;
}
</style>
<script type="text/javascript">
function big()
{
var elebig=document.createElement("big");
var text=document.createTextNode("This is 20Fingers2Brains");
elebig.appendChild(text);
document.getElementById("big").appendChild(elebig);
}
</script>
</head>
<body>
<div id="big">
</div>
<input type="button" id="b1" value="Press" onclick="big()">
<input type="button" id="b1" value="Reset" onclick="location.reload();">
</body>
</html>
     

Demo :





In the above example, we have created a big element and append in div element using javascript.



0 comments:

Post a Comment