Cera Production

Lomba Review Percetakan CeraProduction.com

Tridinamika

Tridinamika Blog Kontes 2013

Friday 28 June 2013

Comment, Break, and Paragraph Tags

1. Comment Tag ( <!--...--> )
     This tag is used for making a comment on HTML coding and will not displayed in browser. And usually the comment is inserted into explanation of HTML codes. For example:
<html>
<head></head>
<body>
  <!-- This section is show of body tag content --></body>
</html>
Result:


 
     There is nothing that displayed at browser although there are comments in HTML codes.

2. Break Tag ( <br /> )
     This tag is used for adding the enter character on the Blog page. Moreover, this tag can added more than one and also is haven't an ended tag. For example: 
...
<body> 
  <!-- Break tag is inserted before the other tag (div tag) -->
  <br />
  <div>there is break character before this text</div> 
  <!-- Break tag is inserted between beginning and ending tag (div tag) -->
  <div>break character is inserted before <br /> this text </div> 
  <!-- Break tag is inserted after ending tag (div tag)-->
  <div>break character is inserted after this text</div><br />
</body> 
... 

Result:

   


     
     And for the last is this tag haven't an attribute (attribute is parameter for tag, parameter is container that will set tag view and others). 

3. Paragraph Tag ( <p>...</p> )
    This tag is used for making a sign to HTML code reader that text between this tag is a paragraph.
     This tag is block which means before and after this tag will added a margin automatically as big as 16px by browser. And also this tag only have one attribute, that is: 
~ Align attribute
    That useful for setting the align of the text. and this attribute has some value, including:
1. Left : is used for setting align of the text to the left of paragraph tag container.
2. Right : is used for setting align of the text to the right of paragraph tag container.
3. Center : is used for setting align of the text to the center of paragraph tag container.
4. Justify : is used for setting align of the text to the left and right of paragraph tag container. 
 
Example: 
...
<body>
  <!-- text with align attribute is left -->
  <p align='left'>this text in paragraph tag with align attribute is left</p>
  <!-- text with align attribute is right -->
  <p align='right'>this text in paragraph tag with align attribute is right</p>
  <!-- text with align attribute is center -->
  <p align='center'>this text in paragraph tag with align attribute is center</p>
  <!-- text with align attribute is justify -->
  <p align='justify'>this text in paragraph tag with align attribute is justify</p>
</body>
... 

Result:


No comments:

Post a Comment

Silahkan beri komentar tentang artikel kami...