HTML

HTML Projects

HTML Project

Components of HTML
Previous Home Next

In HTML pages also contained by of Doctype, Comments, Elements or Tags, Attributes, Frames.There are also contained others HTML pages.

Explaination of HTML Component

DOCTYPE: The <!DOCTYPE> declaration must be the very first thing in your HTML document, before the <html> tag. The <!DOCTYPE> declaration is not an HTML tag; it is an instruction to the web browser about what version of HTML the page is written in.

In HTML 4.01, the <!DOCTYPE> declaration refers to a DTD, because HTML 4.01 was based on SGML. The DTD specifies the rules for the markup language, so that the browsers render the content correctly. HTML5 is not based on SGML, and therefore does not require a reference to a DTD.

Tip: Always add the <!DOCTYPE> declaration to your HTML documents, so that the browser knows what type of document to expect.

Example

<!DOCTYPE html>
<html>
<head>
<title>Title of the document</title>
</head>
<body>
This content of the document......
</body>
</html>

Output :

HTML Elements and Tags

HTML Elements are define by the a starting tag and this element contains others content with closed tag like as <p>...</p>,<h1>....</h1>. HTML Elements name is written by forward slash(e.g "/") with html tag.

Some tags are not used closed tag such as <img>...</img>,<hr>...</hr>,<br>...</br>elements and these elements do not used closed tags.

Example

<!DOCTYPE html>
<html>
<head>
<title>Html Elements Example</title>
</head>
<body>
<h1>This is <i>italic</i> heading</h1>
<p>This is <u>underlined</u> paragraph</p>
</body>
</html>

Output :

HTML Attribute

An Html attributes is providing additional information for associated property about HTML elements and Html attribute can be written within a specified in start tag. Html attributes are written with of two parts: a name and a value

Html attributes come in name/value pairs like: name="value"

Note: Html attribute names are case-insensitive and attribute values are not case-insensitive.

This name and value is shown like as :

Example

<!DOCTYPE html>
<html>
<head>
<title>Align Attribute  Example</title>
</head>
<body>
<p align="left">welcome users in left aligned </p>
<p align="center">welcome users in  center aligned</p>
<p align="right">This is right aligned</p>
</body>
</html>

Output :

HTML FRAMES

HTML FRAMES works to divide your browser window into multiple section where each section can load a separate HTML document. HTML FRAMES provides how to be make a home page that make a normal HTML documents that should be loaded into each of these frames. Collection of frames in browser window is known as a frameset and it performed by rows and columns. Html frame is frameset page is loaded the browser automatically loads related pages.

Creating Frames

To use frames on a page we use <frameset> tag instead of <body>> tag. The <frameset> tag defines how to divide the window into frames. The rows attribute of <frameset> tag defines horizontal frames and cols attribute defines vertical frames. Each frame is indicated by <frameset> tag and it defines which HTML document shall open into the frame.

Example

<!DOCTYPE html>
<html>
<frameset cols="25%,*,25%">
  <frame src="framea.html">
  <frame src="frameb.html">
  <frame src="framec.html">
</frameset>
</html>

 

Output :

Above Example explained

save as : frameA.html
<html>
<body style="background-color:#FF9933">
<h3>Frame A</h3>
<p>This is Example of frame</p>
<p><b>Note:</b> The frameset, frame, and noframes 
elements are not supported in HTML5.</p>
</body>
</html>
.....................................................
save as : frameB.html
<html>
<body style="background-color:#ffffff">
<h3>Frame B</h3>
</body>
</html>
......................................................
save as : frameC.html
<html>
<body style="background-color:#138808">
<h3>Frame C</h3>
</body>
</html>
Previous Home Next

Tolal:0 Click:

Show All Comments

Did not find what you were looking for leave your name and message. We will revert within 24 hours
Name:
eMail:
Comment / Feedback: