Basic of HTML
ABOUT HTML
- HTML is the Standard Markup Language for creating web pages.
- HTML stands for HYPER TEXT MARKUP LANGUAGE.
- HTML describes the structure of a web page.
- HTML elements tell the browser how to display the content such as "heading", "paragraph", "table", and so on.
- Browsers do not display the HTML tags, but use them to render the content of the page.
A Simple HTML Document
- The <html> element is the root element of an HTML page.
- The <head> element contains meta information about the document.
- The <title> element specifies a title for the document.
- The <body> element contains the visible page content.
- The <h1> element defines a large heading.
- The <p> element defines a paragraph.
#HTML Text Formatting
- <b> : Bold Text
- <strong> : Important Text
- <i> : Italic Text
- <em> : Emphasized Text
- <mark> : Marked Text
- <small> : Small Text
- <del> : Deleted Text
- <ins> : Inserted Text
- <sub> : Subscript Text
- <sup> : Superscript Text
# HTML Headings
HTML headings are defined with the <h1> to <h6> tags.
- <h1> defines the most important heading.
- <h6> defines the least important heading.
Paragraphs:
Paragraph are defined with the <p> tag. Think of a paragraph as a block of text.
You can use the align attribute with a paragraph tag as well.
Example:-
<P align="left">This is a paragraph</p>
Line Breaks:
The <br> tag is used when you want to start a new line, but don't want to start a new paragraph.
The <br> tag forces a line break wherever you place it. It is similar to single spacing in a document.
Example:-
<p>This <br> is a paragraph<br> with the line breaks</p>
Note:- The <br> tag has no closing tag.
Horizontal Rule:
The <hr> element is used for horizontal rules that act as dividers between sections, like this:
The horizontal Rule does not have a closing tag. It takes attributes such as align and width.
Example:-
<hr width="50%" align="center">
Comments in HTML:
The comment tag is used to insert a comment in the HTML source code. You can use comments to write notes to yourself, or write a helpful message to someone looking at your source code.
Example:-
<p> This html comment would<!-- This is a comment -->be displayed like this. </p>
Note:- You don't see the text between the tags <!--and-->. If you look at the source code, you would see the comment. To view the source for this page, in your browser window, select View and then select Source.
HTML Background:
The <body> tag has two attributes where you can specify backgrounds. The background can be a color or an image.
Bgcolor:-
The bgcolor attribute specifies a background-color for an HTML page.
The value of this attribute can be a hexadecimal number, an RGB value,
or a color name:
<body bgcolor=<"#000000">
<body bgcolor="rgb(0,0,0)">
<body bgcolor="black">
The lines above all set the background-color to black.
Comments
Post a Comment