Learn HTML by Examples : 3rd Tutorial

Posted on:
tags: , , ,

The Third HTML Code:
<html>
<head>
            <title>College Official site</title>
</head>
<body text="RED">
           
            <h2>Dept Of Science</h2>
           
            <p>
            <ol TYPE="A">
                        <li>Student
                        <ol>
                                    <li>boys
                                    <li>girls
                        </ol>
            </ol>

            <ul>
                        <li>STAFF
                        <ul>
                                    <li>male
                                    <li>female
                        </ul>
            </ul>
</body>
</html>

The Output:

Example Explained
  • The text between <html> and </html> describes the web page
  • The text between <body text=”RED”> and </body> is the visible page content and content will be color with RED
  • The text between <title> and </title> describes the title of the web page
  • The text between <h2> and </h2> is displayed as a heading
  • The text between <p> and </p> is displayed as a paragraph
  • The text between <ol> and </ol> is displayed as a ordered list used when the sequence of items is important.
  • The text between <li> and </li> is displayed as a list item
  • The text between <ul> and </ul> is displayed as a unordered list
Ordered list has three attributes<ol>:
1.    START: Change the start value of the list.
2.    TYPE: Set the numbering style to A,a,I,I,1.
3.    VALUE: The value of the list item in the ordered list can be changed at any point.  You can change the sequence by setting new value(As I did in the above code).

Unordered list has attributes <ul>:
<ul TYPE :’’CIRCLE/DISC/SQUARE”>
(above <ul> type is circle by default).

NESTED LIST: Nesting of lists means placling of one list within another. They can be used to present informartion as a menu or if the document has to be indented to show some kind of relationship.


No comments:

Post a Comment

< >