Cera Production

Lomba Review Percetakan CeraProduction.com

Tridinamika

Tridinamika Blog Kontes 2013

Sunday 14 July 2013

Heading and Horizontal Rule Tags

1. Heading Tag (<h1>...</h1>)

     Generally, this tag is used when we want to make a page, chapter, or section titles. And this tag will make the font to be big and bold dependent on the used tag because this tag have some kind of Heading tag like <h1>, <h2>, until <h6> and then if heading tag is higher then font size will smaller. 
     These tag is block. 
example: 


...
<body>
  <div>
    <h1>the following is a &lt;h1&gt; tag</h1>
    <h2>the following is a &lt;h2&gt; tag</h2>
    <h3>the following is a &lt;h3&gt; tag</h3>
    <h4>the following is a &lt;h4&gt; tag</h4>
    <h5>the following is a &lt;h5&gt; tag</h5>
    <h6>the following is a &lt;h6&gt; tag</h6>
  </div>
</body>
...

result: 














     &lt; sign is used to show the less than character and &gt; sign is used to show the more than character. Mostly, the used heading tag are <h1>, <h2> and <h3>.

2. Horizontal Rule (<hr/>) 
     This tag is used to show a horizontal rule. and generally, to split the one section with another sections. And also, this tag isn't have ending tag so that before ending tag must be given slash character.  
     These tag is block. and also it is have three attributes although these tags isn't used in HTML5 but still functionate. Following are the three attributes:
1. align
     This attribute have function to set the rule alignment against container of this tag. By default center align that will  be applied. There are some value that can be inputted to this attribute, including:
 
1. left: this value have function to set the alignment of rule to the left of container this tag. 
2. right: this value have function to set the alignment of rule to the right of container this tag. 
3. center: this value have function to set the alignment of rule to the center of container this tag. 

 2. size
     This attribute have function to set the rule thickness. The unit of the rule thickness that is pixel (px). And by default the size of the rule thickness is 1px.

3. width
     This attribute is used to set the rule length. There are two ways to insert the rule length that is by using pixel and percentage units. Still by default of the rule length is 100% of the container against the container of this tag.
 
For example: 
...
<body>
  <div style='width:550px;'>
    following the example for defaults of width and size attribut are 100% and   1px:
    <hr />
    and then following the example for default of align atribut is left:
    <hr width='200px'/>
    following the example for left and right align:
    <hr width='200px' align='left'/><hr /><hr width='200px' align='right'/>
following the example for size more than 1px and percentage less than 100%:
    <hr size='10px' width='50%'/>
  </div>
</body>
... 
 
result:








     For the width property of style above is CSS code that have function to set the container length (<div> tag)  as big as 500px. And then for horizontal rule that stand between the left and the right aligns is a separator to make it look that horizontal rule is block.

No comments:

Post a Comment

Silahkan beri komentar tentang artikel kami...