answersLogoWhite

0

How is a tag in HTML used?

Updated: 8/11/2023
User Avatar

Wiki User

10y ago

Best Answer

An HTML tag may be an opening tag, or a closing tag, if a closing tag is required for the element. An opening tag consists of an element surrounded by angle brackets, and may optionally contain attributes as well. A closing tag, if it is nessary or optional for that element, contains a back-slash before the element, to distinguish it from the opening tag.

H1, P, FORM are all elements, while <H1>, <P> and <FORM> are all tags. There is no H1 tag, only an H1 element.

Elements make up the structure of an HTML document. Attributes compliment the elements, eg: <p class="something">This paragraph as a different class attribute.</p>

User Avatar

Wiki User

13y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

11y ago

We use tags in HTML to define what kind of data we're dealing with. Tags are used to set apart things like lists, headings, and paragraphs. They are also used to separate the meta data contained in the HTML documents HEAD with the actual content of the page, contained in the BODY.

The key part is that information regards what the data isnot how the data will be displayed. The older versions of HTML muddied the waters on this principle. But the current versions borrow from XML the concept that page structure is separate from presentation.

This answer is:
User Avatar

User Avatar

Wiki User

10y ago

Tags are mainly comprised of an opening tag < > to indicate the start of the affected area, and a closing tag to indicate where the affected area ends. For instance, this text is bold, would be written in HTML as: this text is bold.

HTML tags can also be nested within each other, for example:

This text is bold and italic, but this text is only italic.

would be written in HTML as:

This text is bold and italic, but this text is only italic.

Which tag is used first in this instance is unimportant, but it is a good habit to order them in this way to make it easier to read the HTML if there are problems.

Note that not all tags, for instance the
tag used to define a line-break, require a closing tag.

This answer is:
User Avatar

User Avatar

Wiki User

9y ago

Most HTML tags have opening and closing tags. For example, if you wanted to display SOMETHING in bold, you would use the following HTML tags: SOMETHING.

This answer is:
User Avatar

User Avatar

Wiki User

9y ago

The purpose of HTML tag is to provide a proper function. The function is to get a view on the webpage.

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How is a tag in HTML used?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is used to meta tag in HTML?

html


How is a HTML tag used?

A HTML tag is used within two symbols. The symbols are less than (&lt;) and greater than (&gt;).


What HTML tag is used to mark the top of the page?

The first tag you use when developing an HTML document is the tag. The first tag you use for the main content of your page is the tag. is the tag that marks the top of an HTML page. The minimum required first like is , which starts the definition of the page content.


What is document tag in HTML?

HTML does not have a DOCUMENT tag. The closest thing it has is DOCTYPE, which specifies which specification of HTML (there are several versions) is being used for that page.


What is the full form of BR in HTML?

The correct HTML form for BR is . BR is a tag to force a line break. It was introduced as a single tag, with no companion tag. The and tags work with older HTML, but for HTML 5, you need to have an ending tag for each tag. You can create your own ending tag by adding forward slash within the single tag: .


Differentiate HTML tag from an HTML documents?

HTML tags are used to delimit HTML elements inside an HTML document.


What tag is used in adding variables in HTML?

HTML has no variables of its own. Javascript does.


What is the A HTML tag called?

The HTML tag is called the "anchor" tag.


What character is used to indicate an end tag in HTML?

The frontslash tag. For example, here it is used in the bold tag. &lt;b&gt;Bold text&lt;/b&gt;


What is a tag List 10 HTML tag?

There are various tags in HTML that can be used. 10 of them are: p, a, br, head, body, html, title, script, link, style.


Which tag is used to define frames in HTML?

&lt;frame&gt;


Is an HTML element is a tag?

The term tag and element are both used for the same thing.