Monday, 18 July 2016

What is Difference Between Html Elements And Attributes And How to use html Element and Attributes

Posted by

Html Elements and Html Attributes

Html Element Consist of Starting and Ending Tags Content is write between them.every Thing write Between Start and End Tags Same display on Web Page.every Html element have Attributes.Attributes means Extra and Addition information of element in other words Attributes define the element .for example element name,element language,width and hight of elements.Attributes define in Starting Tags.

Example

<!DOCTYPE html>
<html lang="en-US">
<body>

<p title="I'm a tooltip">

This is a paragraph.

</p>

</body>
</html>
  
In this example <html></html><body></body><p></p> are elements and  lang="en-Us" and title="I m tooltip" is attributes.defined the information of elements.
in below image explain the Example.

What is diffrent Between Html Elements And Attributes And How to use html Element and Attributes




Some Important Things Using Html Elements and Html Attributes.


Forget the Eng Tags of Element

Some element display correctly if You miss the closing tags but some element not display in web Browsers.so always use ending tag.


Empty Html Element

The element which have no Content is called empty Html elements for example <br></br> it is use give the line break in html .in html5 not use ending tag only use <br> for line break.

Use Lower Case Tags in Html Element

Html tags are not Case Sensitive <p> means <P> is same working . means you use capital Words and smaller Words same functionality.  


1 comment: