Preformatted Text
HTML PRE element is used to show preformatted text. IT will show the text as it is without formatting it.
ex:
<!Doctype Html>
<html>
<body>
<h1>Preformatted Text</h1>
<pre>
+
+++
+++++
+++++++
+++++++++
+++++++
+++++
+++
+
</pre>
</body>
</html>
HTML Lists
Html allows you to show data in the form of list.
There are three type of list
HTML PRE element is used to show preformatted text. IT will show the text as it is without formatting it.
Attributes of PRE element
- class- indicates a class name for an element
- dir- indicates direction of text, like left-to-right or right-to-left
- id- indicates unique id for an element
- lang- indicates language code for the content in an element
- style- indicates an inline style for an element
- title- title for an element
<!Doctype Html>
<html>
<body>
<h1>Preformatted Text</h1>
<pre>
+
+++
+++++
+++++++
+++++++++
+++++++
+++++
+++
+
</pre>
</body>
</html>
HTML Lists
Html allows you to show data in the form of list.
There are three type of list
- Ordered list (OL)
- Unordered List (UL)
- Definition List (DL)
Ordered list show data in some order like numeric, roman etc.
Definition list allows you to include description of items.
Ordered List Ex:
<!Doctype Html>
<html>
<body>
<h1>Ordered List</h1>
<OL>
<Li>Wake up</li>
<li>get ready</li>
<li>go for work</li>
</ol>
</body>
</html>
Unordered list ex:
<!Doctype Html>
<html>
<body>
<h1>Unordered List</h1>
<UL>
<Li>Wake up</li>
<li>get ready</li>
<li>go for work</li>
</Ul>
</body>
</html>
Definition List Ex:
Use Of Ordered List Type Attribute:
<!Doctype Html>
<html>
<body>
<h1>Ordered List</h1>
<OL type="I">
<Li>Wake up</li>
<li>get ready</li>
<li>go for work</li>
</ol>
</body>
</html>
0 comments:
Post a Comment