HTML5 - HTML TAGS part2

Namaste friends..!!! I am back with my fresh post. In this post I will be discussing with you guys about the HTML fonts <font> tag and also about the HTML lists.

First, We will be starting with the HTML fonts.

> HTML Fonts<Font> Tag
 
  Font face and color depends entirely on the computer and browser that is being used to view your page but you can use HTML <font> tag to add style,size, and color to the text on your website. You can set content font size using size attribute. The range of accepted values is from 1(smallest) to 7(largset). The default of a font is 3.

Example:



Output:



>Relative Font Size

 You can specify how many sizes larger or how many sizes smaller than the preset font size should be. You can specify it like<font size="+n"> or <font size="-n">.

Example:



Output:


>Setting Font Face

 You can set font face using face attribute but be aware that if the user viewing the page doesn't have the font installed, they will not be able to see it. Instead user will see the default font face appicable to the user's computer.

Example:




Output:





>Setting font color

 You can set any font color you like using color attribute. You can specify the color that you want by either the color name or hexadecimal code for that color.

Example:





Output:



HTML Lists

>Unordered HTML lists

 An unordered list starts with the <ul> tag. Each list item starts with the <li> tag.
 The list items will be marked with bullets(small black circles):

 Example:

 <ul>
    <li>Coffee</li>
    <li>Tea</li>
    <li>Milk</li>
 </ul>

>Unordered HTML lists - The Style Attribute


style                            |    Description
-------------------------------------------------------------------------------------------------------------------------------
list-style-type:disc      | The list items will be marked with bullets (default)
------------------------------------------------------------------------------------------------------------------------
list-style-type:circle    | The list items will be marked with circles
------------------------------------------------------------------------------------------------------------------------
list-style-type:square | The list items will be marked with squares
------------------------------------------------------------------------------------------------------------------------
list-style-type:none    | The list items will not be marked
------------------------------------------------------------------------------------------------------------------------




Example:
<ul style="list-style-type:disc">
  <li>coffee</li>
  <li>Tea</li>
  <li>Milk</li>
</ul>


>Ordered HTML lists

An ordered list starts with the<ol> tag. Each list item starts with the <li>tag.
The list items will be marked with numbers:

Example:
<ol>
   <li>coffee</li>
   <li>Tea</li>
   <li>Milk</li>
</ol>


Output:
      1. coffee
      2. Tea
      3. Milk



>Ordered HTML lists

TYPE          |        description                                            
---------------------------------------------------------------------------------------------------------------------------------
type="1"    | The list items will be numbered with numbers(default)
---------------------------------------------------------------------------------------------------------------------------------
type="A"    | The list items will be numbered with uppercase letters
---------------------------------------------------------------------------------------------------------------------------------
type="a"    | The list items will be numbered with lowercase letters
---------------------------------------------------------------------------------------------------------------------------------
type="I"     | The list items will be numbered with uppercase roman numbers
----------------------------------------------------------------------------------------------------------------------------------
type="i"     | The list items will be numbered with lowercase roman numbers
----------------------------------------------------------------------------------------------------------------------------------

Example:

<ol type="A">
  <li>Coffee</li>
  <li>Tea</li>
  <li>Milk</li>
</ol>


output:

  A. Coffee
  B. Tea
  C. Milk


So, guys this was all for this post. In the coming posts I will be giving you more knowledge regarding html5. Till then miss me...just kidding. Have fun...Thank you.. :) ;)








Comments