HTML Tag or Tag element: refers to HTML codes that define the element in an HTML file, such as headings, images, paragraphs and list. There are two kinds of tags - the container tag and empty tag.
Container Tag: These tags, which bracket or contain text or other tag elements, are called container tags. These actually consist of two tags, a start tag and an end tag, which enclose the text they affect.
Empty tag: These are standalone and do not bracket or contain text or any other tag elements. An empty tag function is a standalone element within an HTML documents and thus does not bracket or contain anything else.
All the HTML files should include at least these tags:
The HTML tag: This tag defines the top most element, identifying it as an HTML document. It is container tag that has a start and an end tag and all other tags and texts are nested within it.<HTML>…</HTML>
The Head tag: this tag contains information about your HTML file. It may also contain tags that help you to identify your HTML file to the outside world. The Head tag is nested within the HTML tag.
<HTML>
<HEAD>...</HEAD>
</HTML>
Usually, the only tag contained within the head tag is the Title tag. Other tags also can be contained within the head tag but they are used less often.
The Title tag: this tag is nested within the Head tag. It identifies your page to the rest of the world. The tag output is displayed on your browser’s title bar but does not appear as a part of the page.
<HTML>
<HEAD>
<TITLE>My Homepage</TITLE>
</HEAD>
</HTML>
Body tag: this tag is the compliment of the Head tag and contains all of the tags, or elements that a browser actually displays as the body of your HTML document. Both the Head and the Body tag are nested within the HTML tag. Body tag comes after the head tag, they denote a separate part of the HTML document.
<HTML>
<HEAD>
<TITLE>My Homepage</TITLE>
</HEAD><BODY>Welcome to my webpage</BODY>
</HTML>
Paragraph and line break tags: The P (paragraph) and BR (break) tags let you insert block and lines of text on your page. The P tag is a container element with an implied ending. Starting tag <P> and end tag </P>.
The BR line break tag is an empty, or standalone tag that simply inserts a line break. <BR>
Preformatted text tag: The <PRE> tag is used to display a block of preformatted text in a monospace,fixed-pitch font.
The OL (Ordered List) tag: It defines a sequentially numbered list of items. It is used in conjunction with the LI (List Item) tag, which is used to tag the individual list items in a list. <OL><LI>A<LI>B<LI>C</OL>.
The UL (Unordered List) tag: The UL (Unordered List) tag defines a bulleted list of items. The LI tag is nested inside the UL tag and defines each item within the list. <UL><LI>A<LI>B<LI>C</UL>.
Nesting Lists: You can nest a list inside another list. The browser automatically indents nested list levels. You can nest the different kind of lists.
Definition List tag: allow you to create glossaries or list of terms and definitions. A glossary consists of three tag elements: a tag to define the list DL a tag to define the term DT and a tag to define definition DD.
<A href=”URL”>name</A> (Anchor tag): To anchor one or both ends of a hypertext links. <HR> Horizontal Rule tag is a standalone or empty, document element that allows you to add horizontal rules to your web pages.
Marquee tag: It displays content as moving text.
<Marquee behavior scroll=”left” loop=”-1”>text here</Marquee>
Container Tag: These tags, which bracket or contain text or other tag elements, are called container tags. These actually consist of two tags, a start tag and an end tag, which enclose the text they affect.
Empty tag: These are standalone and do not bracket or contain text or any other tag elements. An empty tag function is a standalone element within an HTML documents and thus does not bracket or contain anything else.
All the HTML files should include at least these tags:
The HTML tag: This tag defines the top most element, identifying it as an HTML document. It is container tag that has a start and an end tag and all other tags and texts are nested within it.<HTML>…</HTML>
The Head tag: this tag contains information about your HTML file. It may also contain tags that help you to identify your HTML file to the outside world. The Head tag is nested within the HTML tag.
<HTML>
<HEAD>...</HEAD>
</HTML>
Usually, the only tag contained within the head tag is the Title tag. Other tags also can be contained within the head tag but they are used less often.
The Title tag: this tag is nested within the Head tag. It identifies your page to the rest of the world. The tag output is displayed on your browser’s title bar but does not appear as a part of the page.
<HTML>
<HEAD>
<TITLE>My Homepage</TITLE>
</HEAD>
</HTML>
Body tag: this tag is the compliment of the Head tag and contains all of the tags, or elements that a browser actually displays as the body of your HTML document. Both the Head and the Body tag are nested within the HTML tag. Body tag comes after the head tag, they denote a separate part of the HTML document.
<HTML>
<HEAD>
<TITLE>My Homepage</TITLE>
</HEAD><BODY>Welcome to my webpage</BODY>
</HTML>
Paragraph and line break tags: The P (paragraph) and BR (break) tags let you insert block and lines of text on your page. The P tag is a container element with an implied ending. Starting tag <P> and end tag </P>.
The BR line break tag is an empty, or standalone tag that simply inserts a line break. <BR>
Preformatted text tag: The <PRE> tag is used to display a block of preformatted text in a monospace,fixed-pitch font.
The OL (Ordered List) tag: It defines a sequentially numbered list of items. It is used in conjunction with the LI (List Item) tag, which is used to tag the individual list items in a list. <OL><LI>A<LI>B<LI>C</OL>.
The UL (Unordered List) tag: The UL (Unordered List) tag defines a bulleted list of items. The LI tag is nested inside the UL tag and defines each item within the list. <UL><LI>A<LI>B<LI>C</UL>.
Nesting Lists: You can nest a list inside another list. The browser automatically indents nested list levels. You can nest the different kind of lists.
Definition List tag: allow you to create glossaries or list of terms and definitions. A glossary consists of three tag elements: a tag to define the list DL a tag to define the term DT and a tag to define definition DD.
<A href=”URL”>name</A> (Anchor tag): To anchor one or both ends of a hypertext links. <HR> Horizontal Rule tag is a standalone or empty, document element that allows you to add horizontal rules to your web pages.
Marquee tag: It displays content as moving text.
<Marquee behavior scroll=”left” loop=”-1”>text here</Marquee>
No comments:
Post a Comment