Tuesday, April 28, 2015

style tag in HTML

Hi Everyone,

Good day. Last time we discussed about the <title> tag. Now we will talk about the <style> tag.

The <style> tag is used to define style information for an HTML document. Inside the <style> element you specify how HTML elements should render in a browser. Each HTML document can contain multiple <style> tags. To know more about <style> tag, click here.

Let's see the code below:
 <html>  
 <head>  
   <style>  
     h1 {color:green;}  
     p {color:blue;}  
   </style>  
 </head>  
 <body>  
  <h1>Some heading..</h1>  
  <p>Some paragraph . . .</p>  
 </body>  
 </html>  

This code will result something like below:

The <style> tag gives design to whatever elements in HTML you specify. This is commonly known as CSS - Cascading Style Sheets. More info.
CSS is another big topic that will surely interest you. We will tackle this CSS sooner. But first we will just focus on the elements that composes an HTML document.

Hope you learn new today. On the next post, we will tackle to our next tag, it is <base> tag.
Thanks for visiting. Have a nice day.

Courtesy to:

No comments:

Post a Comment