Ad

html heading tag, html div tag

Body Tag



1] html - Font face, Size & Colour 


 <font> tag is the  use to change the format of the text on  web page. The HTML <Font> tag  supports following  tag additional .Font face and color depends entirely  the computer and browser that is the  being used to view your page  you can use HTML <font> tag to add style, size, and color to  text on your website. You can be use a <font> tag to set all of your text to same size, face, and color.


Color 

Attribute 

Value  - rgb(x,x,x) Colorname

Description 

 color tag Specifies the color of text. Either the color name  the six character color code may be to the  used to specify color


 font

font tag this is a face attribute allows the author to define one Roman", or more different font to be displayed the browser will display  first font specified but if that  not present on the computer the browser will try the next one of  the list .


font Value tag use  example of the font   font_family or "Times New "Verdana", and "Helvetica."

font size  display It Specifies the size of text. This can be absolute (0.. 6), or relative ("+1", "+2","+3",... or "-1", "-2", "_3" ...) 



<!DOCTYPE html>
<html>
<body>
<p><font size="3" color="red">This is some text! </font></p>
<p><font size="2" color="blue">This is some text ! </font></p> <p><font face="verdana" color="green">This is some text!</font></p>
<p><strong>Note:</strong> The font element is not supported in HTML5. Use CSS instead.</p>
</body>
 </html>


OUTPUT IN FONT FACE SIZE & COLOUR

This is some text!

This is some text !

This is some text!

Note: The font element is not supported in HTML5. Use CSS instead.H


2] Heading tag


Heading elements implement six levels of document headings, <h1> is the highest level and <h6> is the lowlest level.  heading element briefly describe the topic of the section it introduces  . Heading information  used by users, for example, to construct a table of contents for a document automatically.

 


 <!DOCTYPE html>

 <html><body>
<h1>Heading 1</h1>
 <h2>Heading 2</h2>
 <h3>Heading 3</h3>
<h4>Heading 4</h4>
<h5>Heading 5</h5>
 <h6>Heading 6</h6> 
</body>

</html>


OUTPUT IN HEADING TAG 


Heading 1

Heading 2

Heading 3

Heading 4

Heading 5
Heading 6


3] Div


The <div> tag define is the  division or  section in  HTML document The <div> element is often used as  container for other HTML elements to style them with CSS and  perform certain tasks with JavaScript.

The <div> element is very often used together with CSS, to layout a web page. 


<!DOCTYPE html>

 <html>
 <p>This is some text.</p>
 <div style="background-color:lightblue"> 
 <h3>This is a heading in a div element</h3>
 <p>This is some text in a div element.</p>
</div>
 <p>This is some text.</p>
 </body>

</html>


OUTPUT IN DIV TAG

This is some text.

This is a heading in a div element

This is some text in a div element.

This is some text.

4] Pre Tag  

The <pre> tag defines preformatted text.Text in a <pre> element is displayedto the fixed-width font usually Courier and it is preserves both spaces and line breaks. Use the <pre> element when displaying text with unusual formatting, or some sort of computer code.

·        ·  <pre> stands for preformatted  is used to display text exactly as it is written in the HTML code.

·  It preserves both spaces and line breaks 

<!DOCTYPE html>

<html>
 <body>
 <pre>
 Text in a pre element 
is displayed in a fixed-width
 font, and it preserves
 both spaces and
 line breaks
 </pre> 
 </body>

 </html>


OUTPUT IN PRE TAG 


Text in a pre element 
is displayed in a fixed-width
 font, and it preserves
 both spaces and
 line breaks


5] Line Break

A line break ends the line you are currently and resumes on the next line. Placing <br /> tag within the code to break the line. Use the <br /> tag within the <p> use to paragraph tag.

A line break is marked up as follows:

The <br> tag inserts a single line break. 

The <br> tag is an empty tag which means that it has no end tag.

The <br> tag is and empty tag which means that it has no end tag. 

The <br> tag is useful for the writing addresses or poems.

<br> tag to enter line breaks,is  not to separate paragraphs.


<!DOCTYPE html>

<html>
 <body>
<p>
 To break lines<br>in a text,<br>use the br element.
 </p>
</body>

 </html>


OUTPUT IN LINE BREAK TAG


To break lines
in a text,
use the br element


Related Post

css position property

css table property

css menu design


No comments

Powered by Blogger.