HTML I Notes
Horizontal Rule
The <HR> tag
produces a horizontal line spread across the width of the browser window.
Attributes of <HR> tag
|
Attribute |
Value |
|
Align |
Left Center right |
|
Noshade |
Noshade |
|
Size (Thickness) |
pixels |
|
Width (length of the horizontal rule) |
pixels% |
Prog1. Write html
code to display 2D and 3D horizontal rules using all its attributes.
<HTML>
<HEAD>
<TITLE> Horizontal Rules </TITLE>
</HEAD>
<BODY>
The <HR> tag produces a horizontal line spread across the width
of the browser window.
The following rules have absolute widths of 80 and 150
<HR SIZE=36 WIDTH=80 align= left> <BR>
<HR SIZE=50 WITH=200 noshade>
</BODY>
</HTML>
Comments
<!-- and -->
Comments are one type of textual content which appear in
HTML code, but are not rendered by user’s browser.
Prog2. Write HTML
code to display the usage of comments.
<HTML>
<HEAD>
<TITLE> Horizontal Rules </TITLE>
</HEAD>
<BODY>
<!-- This command will not be rendered by the browser -->
Honesty is the best policy.
Honesty is the best policy.
Honesty is the best policy.
Honesty is the best policy.
</BODY>
</HTML>
LOGICAL AND PHYSICAL
TEXT STYLES
HTML has two types of
styles for individual words or sentences: Logical and physical styles.
Logical text styles-
|
<DFN> for a word being
defined. |
Typically displayed in italics |
|
<EM> for emphasis |
Typically displayed in italics |
|
<CITE> for titles of books, films etc. |
Typically displayed in italics |
|
<CODE> for computer code |
Displayed in a fixed width
font |
|
<KBD> for user keyboard
entry |
Typically displayed in plain
fixed-width font |
|
<SAMP> for a sequence of
literal characters |
Displayed in a fixed-width
font |
|
<STRONG> for strong
emphasis |
Typically displayed in bold |
|
<VAR> for a variable |
Typically displayed in italics |
Physical Text
Styles-
<B> Bold text
<I> italic text
<TT> Typewriter text e.g.,
fixed-width font
<U> Underlined text
Special Characters-
Three ASCII characters- the left angle
bracket (<), the right angle bracket (>) and the ampersand (&) have
special meanings in HTML and therefore cannot be used as it is in text.
< the escape sequence for <
> the escape sequence for <
& the escape sequence for &
Comments
Post a Comment