HTML is specified as TAGS in an HTML document.
HTML Tags-It is basically
word or group of words enclosed between Angle Brackets as <html>.
Usually, These Tags comes in pair as <h1> & </h1> , that are wrapped around
some text. They are called Container tags. 1st tag in the pair is opening
tag and the 2nd one is End/closing tag.
On
the other hand, Empty Tag is a single tag like <br>. They don’t have to be wrapped around any text.
Its structure-
All HTML docs. are mainly divided into 2 parts- Head & Body. We have <html>, <head> & <body>
container tags in each HTML document. <html> tag tells the browser that
it a HTML document. The <head> tag includes information like the title.
The <body> tag contains content like- paragraphs, headings, links,
pictures etc.
<html> <head> <body> <h1>---</h2> <p>----</p> </body> </head> </html> |
We can use HTML formatting tags (like <b>,<sub>,<sup>,<em>, <i>) to bold,
italicized , subscript,
superscript text etc.
Element- An HTML element
is all the thing that is written between opening and ending tag.
<p> this is a simple text. </p> |
opening tag content end tag |
HTML attributes- Additional information of elements
is provided by them. They are also specified in the opening tag. They have name
/value pair like this: name= “value”
E.g. -
§ <table
border= “2”></table>
§ <a href= “http:/www.google.com”>Google</a>
Style attribute- It introduces
CSS to HTML. The purpose of this attribute is to provide style to all HTML
elements. Styles were introduced in HTML4. Styles can be added directly to HTML
element by using the style attribute or indirectly by in separated CSS files.
e.g.-
style= “background-color:red” |
style= “font-size:20px” |
style= “text-align:center” |
Comments
Post a Comment