Tuesday, 7 March 2023

Building Block of HTML

 

Building blocks of HTML


An HTML document consist of its basic building blocks which are:
  • Tags: An HTML tag surrounds the content and apply meaning to it. It is written between < and > brackets.
  • Attribute: An attribute in HTML provides extra information about the element, and it is applied within the start tag. An HTML attribute contains two fields: name & value.

Syntax

  1. <tag name  attribute_name" attr_value"> content </ tag name>   
  • Elements: An HTML element is an individual component of an HTML file. In an HTML file, everything written within tags are termed as HTML elements.
Example:

<html>

                <head>

                                <title>Body and its attribute</title>

                </head>

                <body bgcolor="pink" background="1.jpg" link="blue"

                alink="white" vlink="black">

                     <h1> This is my First Website </h1>

                                 

                                 <center>

                                 <a href="#">Home</a>

                                 <a href="#">About Us</a>

                                 <a href="#">Contact Us</a>

                                 </center>

                </body>

</html>






No comments:

Post a Comment

Full Form of IT and ITes Industry

                                                 Full Form (IT and ITeS) ICT - Information Communication Technology IT - Information Tec...