Elements and Tags by G Krishna Chauhan


You are now ready to learn the essence of HTML elements.

The basic structure of an HTML document includes tags, which surround content and apply meaning to it.Elements give structure to a HTML document and tells the browser how you want your website to be presented. Generally elements consists of a start tag, some content, and an end tag.

"Tags"?

Tags are labels you use to mark up the beginning and end of an element.

All tags have the same format: they begin with a less-than sign "<" and end with a greater-than sign ">".

Generally speaking, there are two kinds of tags - opening tags: <html> and closing tags: </html>. The only difference between an opening tag and a closing tag is the forward slash "/". You label content by putting it between an opening tag and a closing tag.

HTML is all about elements. To learn HTML is to learn and use different tags. Change your document so that it looks like this:



<body>


My HTML Teacher is Er. G Krishna Chauhan.

</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 for example, 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 My First Web Page</title>' is a title element.

In next Lecture we are trying to know how it works 



No comments:

Post a Comment