HTML PAGE-2

HTML Horizontal Rules
The <hr> tag creates a horizontal line in an HTML page.
The hr element can be used to separate content:
EXAMPLE:
<p>This is a paragraph.</p>
<hr>
<p>This is a paragraph.</p>

HTML Line Breaks
The HTML <br> element defines a line break.
Use <br> if you want a line break (a new line) without starting a new paragraph:
<p>This is<br>a para<br>graph with line breaks</p>

HTML Text Color
The color property defines the text color to be used for an HTML element:
EXAMPLE:
<h1 style="color:blue">This is a heading</h1>
<p style="color:red">This is a paragraph.</p>

HTML Fonts
The font-family property defines the font to be used for an HTML element:
EXAMPLE:
<h1 style="font-family:verdana">This is a heading</h1>
<p style="font-family:courier">This is a paragraph.</p>

HTML Text Size
The font-size property defines the text size to be used for an HTML element:
EXAMPLE:
<h1 style="font-size:300%">This is a heading</h1>
<p style="font-size:160%">This is a paragraph.</p>

HTML Text Alignment
The text-align property defines the horizontal text alignment for an HTML element:
EXAMPLE:
<h1 style="text-align:center">Centered Heading</h1>
<p>This is a paragraph.</p>

HTML Bold FORMATTING:
The HTML <b> element defines bold text
EXAMPLE:
<p>This text is normal.</p>
<p><b>This text is bold</b>.</p>

HTML Italic 
The HTML <i> element defines italic text
EXAMPLE:
<p>This text is normal.</p>
<p><i>This text is italic</i>.</p>

HTML Comments
Comment tags <!-- and --> are used to insert comments in HTML.
EXAMPLE:
<!-- Write your comments here -->
Comments are not displayed by the browser, but they can help document your HTML.

HTML Links 
Syntax:

In HTML, links are defined with the <a> tag:
<a href="url">link text</a>
EXAMPLE:
<a href="http:/WWW.KRMMC.com/html/">Visit our COLLEGE</a>
The href attribute specifies the destination address

HTML Links - The target Attribute
The target attribute specifies where to open the linked document.
This example will open the linked document in a new browser window or in a new tab:
<a href="http://www.KRMMC.com/" target="_blank">Visit KRMMC!</a>

_blank Opens the linked document in a new window or tab
_self Opens the linked document in the same frame as it was clicked (this is default)
_top Opens the linked document in the full body of the window

HTML Links - Image as Link

<p>The image is a link. You can click on it.</p>
<a href="XXX.HTM">
  <img src="smiley.gif" alt="HTML BASIC" style="width:42px;height:42px;border:0">
</a>

In HTML, images are defined with the <img> tag.
The <img> tag is empty, it contains attributes only, and does not have a closing tag.
The src attribute specifies the URL (web address) of the image

The alt Attribute
The alt attribute specifies an alternate text for an image, if the image cannot be displayed.
EXAMPLE:
<img src="car.gif" alt="Icon" style="width:128px;height:128px;">

Image Size - Width and Height
 use the style attribute to specify the width and height of an image.
The values are specified in pixels (use px after the value):
<img src="CAR.gif" alt="Icon" style="width:128px;height:128px;">

HTML table:
Tables are defined with the <table> tag.
Tables are divided into table rows with the <tr> tag.
Table rows are divided into table data with the <td> tag.
A table row can also be divided into table headings with the <th> tag.
Table data <td> are the data containers of the table.
They can contain all sorts of HTML elements like text, images, lists, other tables, etc.

EXAMPLE:
<table>
  <tr>
    <th>Month</th>
    <th>DAYS</th>
  </tr>
  <tr>
    <td>January</td>
    <td>31</td>
  </tr>
</table>

No comments:

Post a Comment