Comment,Tag, Element and Attribute in HTML
Table of contents
HTML
Hyperactive Text Markup Language(HTML)
The favoured luxury language for erecting Web runners is HTML. A Web runner's structure is described in HTML. Several rudiments make up HTML. The content's donation in the cybersurfer is controlled by HTML rudiments.
Comments
HTML comments allow you to include notes and explanations in your code without making them visible to visitors when the page is viewed in a web browser. They are employed to provide the code context and documentation.
It can help eliminate portions of your code that you wish to temporarily disable without removing them totally by adding comments to them.
To add comments to your HTML code you have to write enclosing them with in the <!-- Comment Area -->.
<!-- these lines are belongs to comment in HTML -->
<span> This is normal line inclueded to HTML </span>
Tags
Tags in HTML are used to specify the organisation and design of a webpage. They serve as the fundamental building blocks for developing page components. To construct a paragraph element, for instance, use the p tag. To make a heading element, use the h1 tag. The tag may be used singly or in pairs with an opening tag and a closing tag, such as this: tag <Content/tag>, or it may self-close.
Some self-closing tags in HTML are <img tag/>, <br/>,<hr/>.
some tags are:
<p>, <h1>, <strong>, <em>
<img>, <area>, <map>
table, tr, th, tbody
Elements
The many parts that make up an HTML document, such as headers, paragraphs, and graphics, are called elements. Each element has a matching HTML tag to represent it. For instance, the p> tag represents a paragraph element, while the h1>, h2>, etc. tags indicate a heading element. Between the opening and closing tags lies the element content.
Attributes
To offer more details about an element, attributes are employed. They usually take the form of name-value pairs and are appended to the beginning tag of an element. The src attribute, for instance, is used to define an image's source, and the href attribute is for a link's destination.
<a href="attribute link">HTML attributes</a>
Subscribe to my newsletter
Read articles from Sipun Panda directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by