Latest Updates:
Upcoming notes on: Java and Android


HTML5

HTML5 - CONTENTS




BACKGROUND



ALIGNMENT & FONT


PARAGRAPH & HEADINGS


FORMATTING TAGS


IMAGE


LISTS


LINK


TABLE 


FORM CONTROLS



FRAMES
       

CANVAS









Heading Tags
Any document starts with a heading. You can use different sizes for your headings. HTML also has six levels of headings, which use the elements <h1>, <h2>, <h3>, <h4>, <h5>, and <h6>
Example 
<h1> My first heading </h1>

Paragraph Tag
The <p> tag offers a way to structure your text into different paragraphs. Each paragraph of text should go in between an opening <p> and a closing </p> tag as shown below in the example:
Example 
<p> A simple example of 
paragraph </p>

Line Break Tag
Whenever you use the <br /> element, anything following it starts from the next line. This tag is an example of an emptyelement, where you do not need opening and closing tags, as there is nothing to go in between them.
The <br /> tag has a space between the characters br and the forward slash. If you omit this space, older browsers will have trouble rendering the line break, while if you miss the forward slash character and just use <br> it is not valid in XHTML
Example 
<html>
<body>
My first line  
<br>
My second line
</body>
</html>

Center Tag
You can use <center> tag to put any content in the center of the page or any table cell.
 Example 
<center> Hello world </center> 

Horizontal Lines
Horizontal lines are used to visually break up sections of a document. The <hr> tag creates a line from the current position in the document to the right margin and breaks the line accordingly.
 Example 
<hr color red=Red width=500>

Preserve Formatting
Sometimes you want your text to follow the exact format of how it is written in the HTML document. In those cases, you can use the preformatted tag <pre>.
Any text between the opening <pre> tag and the closing </pre> tag will preserve the formatting of the source document.
Example 
<pre> 
Name                       Address
</pre> 


Comments in HTML
HTML comments are placed in between <!-- ... --> tags. So any content placed with-in <!-- ... --> tags will be treated as comment and will be completely ignored by the browser.
Example 
<!--       
An simple example of comment in html        
--> 


Next Page>>

No comments:

Post a Comment