The Basic Building Blocks of HTMLWhen you write your HTML, you use elements( HTML elements are defined using HTML tags) to define the structure of the document, to define the presentation of your document, to insert media like images or Video, to define links to other documents, and to specify desired behavior.
A HTML file is a text file containing small markup tags (words surrounded by '<' and '>').
HTML tags are used to mark-up HTML elements. The markup tags tell the Web browser how to display the page. Tags in HTML usually have three parts: start tags, content, and end tags(e.g <b>text</b>). but this is not a default case, most elements have start tags and optinal end tags(e.g. <p>) and some have only start tag (single tag e.g. <br>). HTML tags are not case sensitive, <b> means the same as <B> or <br> means the same as <Br> or <bR> or <BR>.
<H1>Heading with a <B>bolded title</B></H1>
Every HTML element have some attribute which define characteristic of an element, that give you flexibility while writing your HTML code. Attributes have some values and they come in pairs. If you are going to include an attribute, you must have to include the value for that attribute. Its good if you enclosed attribute values in double quotation marks(its optinal and depends on Version of HTML you are using). Attributes and attribute values are case-insensitive. However, the World Wide Web Consortium (W3C) recommends lowercase attributes/attribute values in their HTML 4 recommendation, and XHTML always used lowercase attributes/attribute values.
<table> - defines a table.
<table width="300px"> here we have define table width to 300px, where width is attribute and 300px is its value.
Â <p> - define a paragraph
<p align="left"> here we have define paragraph alignment to left, where align is attribute and left is its value.
Following figure will give you detail idea about the Basic Building Blocks of HTML. You will learn more about HTML tags(elements) later.