Thursday, 21 February 2013

Tags, Attributes and Elements (HTML BY GOPAL KRISHNA)


Now you know this , basics of HTML are plain text, we need a bit more to make it a  valid HTML document.



Tags :

The basic structure of an HTML document includes tags, which surround content and apply meaning to it.

Change your document so that it looks like this:


<body>
My HTML TEACHER IS ER. GOPAL KRISHNA.
</body>


Write everything in body section  as i say previously .

Now save the document again, go back to the web browser and select
'refresh' (which will reload the page).  


The appearance of the page will not have changed at all, but the purpose of
HTML is to apply meaning  .


Not all tags have closing tags like this (<html></html>) some tags, which do
not wrap around content will close themselves. 

The line-break tag forexample, looks like this : <br />. 


We will come across these examples later.

All you need to remember is that all tags must be closed and most (those
with content between them) are in the format of opening tag - content -
closing tag.



Attributes:

Tags can also have attributes, which are extra bits of information. Attributes appear inside the opening tag and their value is always inside quotation marks. They look something like <tag  attribute="value">Margarine</tag>.

We will come across tags with attributes later.



Elements:

Tags tend not to do much more than mark the beginning and end of an element. Elements are the bits that make up web pages. You would say, for example, 
that everything that is in-between and includes the <body> and
</body> tags is the body element. 

As another example,

 whereas '<title>'and '</title>' are tags, 

<title>Rumple Stiltskin</title>' is a title element.




TRY IT ......
(HTML BY GOPAL KRISHNA)

No comments:

Post a Comment