ad

Tuesday, August 30, 2022

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


Thursday, August 25, 2022

HTML tag

Head section  





1]  <BODY>  </BODY> TAG :-

The HTML <body> tag defines  main content of the HTML document to the section of the HTMI. document that will be directly visible on your web page. This tag is also commonly referred to as the <body> element. All those content which we write inside the <BODY> tag appear on the web browser.The <body> element contains all the contents of an HTML document, such as headings, paragraphs, images, hyperlinks, tables, lists, etc. Note: There can only be one <body> 


HTML syntax for body tag


<BODY>

<h1> This is body tag </h1>

</BODY>


Attributes Use Body Tag:-

 Bgcolor  :- To change the background color of the web document.

Background   :- To set the background image on the body of the web document

Text  :- To set the Foreground color of text.

Left Margin  :- To set the Left Margin of the web document. 

Top Margin :- To set the Top Margin of the web document. 

Link :- To set the Color of text for unvisited hyperlinks.

 VLink  :-To set the color of text for visited hyperlinks.

ALink  :- To set the color of text for selected hyperlinks.


For example

<!doctype html>

<html>

<head>

<title> Example of Body Tag</title> 

</head>

<body>

<h1>This is the Body of the web document </h1><p> This is the content </p>

</body>

 </html>



Body tag
Output in body tag









2]  Formatting Tags 

Html formatting tags are used to make some text on your web pages to appear differently that normal text for better look and feel. In computer application, formatting data may associated with text data to create formatted text or we can say that formatting tags are used to change the style of text on a webpage there are following formatting elements were designed to designed to display special type of text. 


<b>- Bold text

<strong>- Important text

<i>- Italic text

<em>- Emphasized text

<mark > Marked text

<small>- Smaller text 

<del> Deleted text

<ins> • Inserted text

<sub> Subscript text

<sup>- Superscript text


Example of Formatting tags


<!DOCTYPE html>




<html>

<body><center><strong><u>All Formating tag</u></strong> </center>

<p>This text is normal.</p>                                                                    

<br><i>This text is italic.</i>

<br><em>This text is emphasized.</em>

<br><b>This text is Bold.</b>

<br><strong>This text is Stong.</strong>

 <br>This <sup>text is superscript</sup><br>H <sub>2</sub>

<br><small>This is some smaller</small>

<br><big>This is some smaller</Big> 

<br><Mark>This is some smaller/Mark>

<p>My favorite color is <del>blue</del> red.</p>

 <p>My favorite color is <del>blue</del> <ins>red</ins>.</p>

</html>


Formatting Tag

Output Formatting tag









3]  Bold  Tag

The HTML <b> tag which represent bold text in  HTML webpage.<b> and <strong> Elements The <b> tag should  used to markup text as the bold without conveying any extra importance.The <b> tag is written as <b> .....</b> with the text to be bold inserted between the start and end tags..

The HTML <strong> element defines text with strong importance. The content is inside is type.<strong>This text is important!</strong>

Example 

<! Doctype html>

</html>  <head>                                        

         <title>Bold Body Tag </title>

</head> 

<body>

<b>This is  BOLD Body Tag</b>

<strong>Element defines text with strong importance content inside</strong>

</body>

</Html>


Output in Bold Tag
Output in Bold Tag



 

4]  Itelic Tag

 <i> and <em> Elements

The <i> element is used for presentational purposes only i.e.  style text in italic.

The <i> tag is written as <i>.......</i>  the text inserted between the start and end tags.


<!IDOCTYPE html>

<html>                                                  

 <body>                                  

</h2> Itelic tag</h2>

 <i>Some italic text</i>

</body>

 </html>


Italic tag html  output

Output Itelic tag








5]  Underlined Tag

The <u> tag represent some text that is unarticulated or styled differently from normal text, such as the misspell words and proper names in Chinese text.

The <u> HTML element is the represents a span of inline text which should be rendered in  way that indicates that  has a non-textual annotation.


<!DOCTYPE html>

 <html>                                   

      <head>

<title>Underlined Text Example</title>

</head>

<body>

 <p>The following word uses an <u>underlined</u> typeface.</p>

</body>

 </html>


Output in Underline
Output in Underline Tag








Related Post :-

Dynamic website

html link tag

html q tag

Saturday, August 20, 2022

html script tag attributes

html script Element 



The SCRIPT element  use to declare script, such JavaScript, within  HTML document  embedded external javascript file through src attribute. You can use the SCRIPT element for validating Web forms and manipulating the content and images present on these forms. 

<script>

document.getElementById("demo").innerHTML = "Hello JavaScript!";

</script>

 The SCRIPT element is used inside the HEAD element, which uses the type attribute. 


1 Introduction to scripts

client-side script is the program that the may accompany HTML document or be embedded directly. The program executes on client machine document loads, or some other time such as a link is activated. HTML support for independent scripting language.

Script offer authors is  extend HTML documents is highly active and interactive way.  example Script may  evaluated as document loads to the modify the contents of the document.

Scripts  accompany a form to process input  is entered. Designers may dynamically fill  parts form based on the values of other fields. They  ensure that input data conforms to predetermined ranges values, fields are mutually consistent, Script may be triggered by event that affect the document, such  loading, unloading, element focus, mouse movement, etc.

Attribute 

1. Async 

Value :- true, false

Description :-

classic scripts is the async attribute is present, the classic script will be fetched in parallel to parsing and evaluated available. For module scripts the async attribute is present  the scripts and all their dependencies will be executed . get fetched in parallel to parsing to evaluated soon as they are available.

This attribute allows  elimination of parser-blocking JavaScript browser would have load and evaluate scripts  continuing to parse. defer has a similar effect in this case. This is a boolean attribute: the presence of a boolean attribute on an element represents the true value, and the absence of the attribute represents the false value.


2.  NOSCRIPT element


The NOSCRIPT element is used to the  display the alternate content  Web browser that does not support JavaScript or has JavaScript disabled. JavaScript is enabled to supported by  Web browser NOSCRIPT element not considered. The following code snippet shows an example of the NOSCRIPT element.

The noscript element to represents nothing scripting is enabled, and represents  children if scripting  disabled. It used to present different markup to user agents  support scripting and those don't support scripting, by affecting how the document is parsed.

<script type="text/javascript">

document.write("Good Morning.")

</script> 

<NOSCRIPT>Javascript is disabled or not supported on your browser.</NOSCRIPT>NOSCRIPT element can only applied on elements that inside the BODY element. If you do not want to apply script on any session of the BODY element, you can define it in the NOSCRIPT element. This element cannot contain any nested elements.


3 The STYLE Element:

The STYLE element is used to declare the style sheets within the HTML document. This element specifies how the HTML elements are rendered in a browser. The STYLE element has three attributes: type, media, and scoped. Generally, the STYLE element is placed inside the HEAD element but if you use the scoped attribute, then you can place the STYLE element in the BODY element of the document. The following code snippet shows the use of the STYLE element in a document:

<HEAD>

<STYLE type="text/css">

body (background-color: powderblue;}

hi (color: red;)

p [color: blue;)

</STYLE></HEAD>


In the preceding code snippet, the STYLE element is used within the HEAD element


Related Post :-

html form tag

html table attributes