ad

Tuesday, August 30, 2022

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


HTML FONT Program

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" ...) 


HTML FONT Program

<!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>

HTML FONT Program

Explain Program



HTML FONT Program

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] Html Div tag 


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.


Related Post

css position property

css table property

css menu design


Thursday, August 25, 2022

HTML Body Tag Structure, Syntax, and Examples

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







   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