Posts

HTML Comments

Image
HTML Comments: • Comment is a piece of code which is ignored by the web browser. • Comment help you & others understand your code and increases code readability. • HTML comment are placed in between <!--……-->tags, within the tags the content will be treated as comment. Example: <!DOCTYPE html> <html> <head> <!-Document Header Start-> <title>This is document title</title> </head> <!-Document Header Stop-> <body> <p>Document content goes here………</p> </body> </html> OUTPUT: Document content goes here………

Subscript Text on HTML

Image
Subscript Text: • The content of a <sub>…….</sub> element is written in subscript. • The font size used is the same size as the characters surrounding it but it displayed half a character’s height beneath the other character. Example: <!DOCTYPE html> <html> <head> <title Formatting Example</title> </head> <body> <p>The following word uses a <sub> subscript </sub>typeface.</p>  </body> </html> OUTPUT :

Superscript Text on HTML

Image
Superscript Text: • The content of a <sup>…….</sup> element is written in superscript. • The font size used is the same size as the characters surrounding it but it displayed half a character’s height above the other character. Example: <!DOCTYPE html> <html> <head> <title Formatting Example</title> </head> <body> <p>The following word uses a <sup> superscript </sup>typeface.</p> </body> </html> OUTPUT:

Strike Text on HTML

Image
Strike Text: Anything that appear within <strike>…….</strike>element, is displayed with strikethrough. Example : <!DOCTYPE html> <html> <head> <title Formatting Example</title> </head> <body> <p>The following word uses a <strike>strikethrough</strike>typeface.</p> </body> </html> OUTPUT: The following word uses a strikethrough typeface.

Underlined Text on HTML

Underlined Text: Anything that appear within <u>…….</u>element, is displayed with underline. Example: <!DOCTYPE html> <html> <head> <title Formatting Example</title> </head> <body> <p>The following word uses a <u>underlined</u>typeface.</p>  </body> </html> OUTPUT: The following word uses an underlined typeface.

Italic Text on HTML

Italic Text: Anything that appear within <i>…….</i>element, is displayed in italic. Example: <!DOCTYPE html> <html> <head> <title Formatting Example</title> </head> <body> <p>The following word uses a <i>italicized</i>typeface.</p>  </body> </html> OUTPUT: The following word uses an italicized typeface.

HTML Formatting

Image
HTML Formatting: • If you use a word processor , you must be familiar with the ability to make the text   bold, italicized, or underlined . • These are just three of the ten options available to indicate how text can appear    in HTML & XHTML.. Bold Text: Anything that appear within <b>…….</b>element, is displayed in bold. Example: <!DOCTYPE html> <html> <head> <title Formatting Example</title> </head> <body> <p>The following word uses a <b>bold</b>typeface.</p>  </body> </html> OUTPUT: The following word uses a bold typeface.