html attributes

HTML Attributes

Welcome to the third unit of the HTML course titled HTML Attributes. In our previous unit of this course series, We learnt about the elements used in HTML. Now, to HTML Attributes.

HTML Attributes

These provide additional information about the elements. If you remember in our previous unit, we learnt that html elements are everything from the opening tag to the closing tag. To add additional information for additional purposes, we need attributes to achieve that. For instance,

    <a href="http://facebook.com">Facebook</a>    <h1 class="surprise">Wonders</h1>    <h1 id="surprise">Wonders</h1>    

The following table explains the attributes in the codes above

Tag Attribute Use
<a> href class  for defining links
 <h1> surprise class  for adding additional style to a class of elements
 <h1> surprise id  for adding additional style to only the Wonders heading

The class and id would be explained further in our upcoming lessons. Thank you for following through, and see you in the next unit.


About The Author

Leave A Comment?