0% found this document useful (0 votes)
51 views1 page

HTML/Training/Tag Syntax Tag Syntax: Decomposition of HTML Elements

HTML uses tags composed of <, > symbols and optional / symbols to define elements. Tags usually come in pairs with an opening and closing tag, but some single tags like <br> don't require a closing tag. Elements can contain attributes to provide more information and tags are interpreted by browsers to structure and display HTML documents.

Uploaded by

Aayush
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
51 views1 page

HTML/Training/Tag Syntax Tag Syntax: Decomposition of HTML Elements

HTML uses tags composed of <, > symbols and optional / symbols to define elements. Tags usually come in pairs with an opening and closing tag, but some single tags like <br> don't require a closing tag. Elements can contain attributes to provide more information and tags are interpreted by browsers to structure and display HTML documents.

Uploaded by

Aayush
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

HTML/Training/Tag syntax

Tag syntax
HTML is using tags for its syntax. A tag is composed with special characters: <, > and /. They are
interpreted by softwares to compose an HTML element.

Decomposition of HTML elements


HTML elements usually come in tag pairs.

For opening a simple element with a start tag

1. it starts with <
2. then a list of characters without space, the tagname (or element)
3. ends usually with a >.
Then closing the simple element with an end tag

1. it starts with </
2. then the same list of characters without space, the tagname (or element)
3. ends usually with a >.
If the tagname is "cite", then you get

<cite></cite>

Some elements do not have an end tag (because they are implied by the following tags). For
example you might have seen:

<br>

An element can have attributes to refine its meaning.

You might also like