Building Blocks of HTML
Last time we have seen, Semantic Elements in HTML. Now we are going to learn about the Building Blocks of HTML. So let's get started...
What are Building Blocks?
The Building Block is nothing but a group of different types of elements
that are used to implement a program. It includes sequential layouts,
selections, and iterations which create the algorithm to implement a
program.
In HTML, there are mainly two Building Blocks which are Tags and
Attributes. The Comment is also one of the HTML Building Blocks, but
mostly it is not considered as the Building Block.
Tags in HTML
In HTML, all the Web page development code is written in between the
opening and closing tags of HTML. Each Tag in HTML represents its own meaning itself, to the user or
developer.
These tags are enclosed between the opening and closing angular Brackets
(<Tag_Name>). The HTML Tags are always closed using the slash symbol after the opening
angular bracket (</Tag_Name>).
Syntax :
<tag_name> Web-page Content </tag_name>
Attributes in HTML
The Attribute of HTML is used to provide extra information about the
given tag. These attributes are used in the start Tag of HTML.
The HTML Attributes mainly consist of Attribute names and Attribute
Values.
Syntax :
<tag_name attribute_name="attribute_value"> Web-page Content </tag_name>
Comments in HTML
The comments help us to understand the written program very easily. The
comments are mostly used by the developers to understand the meaning and
flow of the program.
In HTML, there are no single-line or multi-line comments. The comments
can be given using the opening angular bracket(<) later on the
exclamatory mark(!) followed by two hyphens(--). And the comments are
closed using the two hyphens (--) followed by the closing angular
bracket.
Syntax :
<p> I am the Paragraph...!!!</p> <!-- Comments -->
Basic Attributes in HTML
As we have seen in the above Building Blocks, there are attributes that
are used to provide extra information about the given tag. In HTML, there
are two main attributes that are mostly used in the programs. Let's take a
look at them...
- class=" "
- id=" "
The above two attribute defines the unique class name and id for the
specific tag. These attributes are mostly used for designing the web page
using CSS.
The HTML Elements can be accessed in CSS or any other language using the
class and id attributes of HTML Attributes.
So, now it's time to end the session. See you guys Next Time, stay tuned for further updates on HTML Programming Languages...!!!
Our website will definitely help you to improve your Programming Skills and Knowledge.
Thanks for Visiting...!!!
0 Comments
Please do not add Any Spam link in Comments !