HTML Attributes and HTML Comments ( PART-02 )

Published by StudyMuch on

HTML Attributes and Comments

In this tutorial you will learn the HTML Attribute and HTML Comments with all the programming examples.

1.    HTML Attributes

2.    HTML Comments

HTML attribute are used to add more information to an HTML element. 

Important things to remember about HTML attribute-

·       HTML attribute are found in HTML tag.

·       HTML element can have multiple attribute.

·       HTML attribute only appear in start tag. It is never used in end tag.

Some important attribute given below here-

List of HTML Attribute.

ATTRIBUTES DESCRIPTION
lang We use this attribute to define the language of HTML file.
href Specific the URL, for a link.
 title Specific extra information about an element.
style Style attribute is used in inline CSS stylefor an element.
id Specific a unique id for an element.
value Specific the value for an input element.
class Specific a unique id for an element.
disabled Specific that an input element should be disabled.
src Used for URL of an image.

Here we are using some attribute with an example. Seeing which you can easily understand.

1.    Example of lang Attribute;

1.      <!DOCTYPE html>
2.      <html lang=”en”>
3.      <head>
4.          <title>Studyons.com</title>
5.      </head>
6.      <body>
7.          <P>Hello World</P>
8.      </body>
9.      </html>

Here we used the lang attribute to define the language of an HTML file.        
The language are define above in English, <html lang “en”>

2.    Example of href Attribute;

     <!DOCTYPE html>
      <html lang=”en”>
      <head>
          <title>Studyons.com</title>
      </head>
      <body>

          <a href=”https://www.studyons.com”>Visit StudyMuch.in</a>
   </body>
   </html>

Here we used the href attribute to specific the URL (https://www.studymuch.in) for a link. Link are define using anchor <a> element.
On the example above we used the href attribute to display URL.

3. Example of style Attribute;

<!DOCTYPE html>
<html lang=”en”>
    <style type=”text/css”>
    body{color: brown; font-size: 40px;}
    </style>
<head>
    <title>Studyons.com</title>
</head>
<body>
    <a href=”https://www.studyons.com”>Visit StudyOns.Com</a>
</body>
</html>

On the example above we created body using the <body> element and change style using <style> attribute. Here we used style attribute to change its color and font size.

4. Example of src Attribute;

<!DOCTYPE html>
<html lang=”en”>
    <style type=”text/css”>
    body{color: brown; font-size: 40px;}
    </style>
<head>
    <title>Studyons.com</title>
</head>
<body>
    <img src=”shubham.jpg”/>
</body>
</html>

In the above example we use the src attribute to display the image.

HTML comments are text, sentences or phrase on the HTML file, They are only show in coding file not display output in browser. here we know  how to write HTML comments?                                                                                 
An HTML comments starts with <!– and end with –>.It look like this type:            <!–Studymuch.in–>

Example of HTML Comment;

<!DOCTYPE html>
<html lang=”en”>
    <style type=”text/css”>
    p {color: brown; font-size: 20px;}
    </style>
<head>
    <!–This is the tytle of HTML file–>
    <title>Studyons.com</title>
</head>
<body>
    <!–This is Heading 1–>
    <h1>Studyons Learning</h1>
    <!–This is Paragraph–>
    <P>This is an Educational website</P>
</body>
</html>


On the example given above you learn how to write comments on HTML file. You also put single and multiple line of comments on HTML file, between start tag and end tag and you also put comments outside start and end tag. So, in this tutorial we learned two main things are HTML Attribute and HTML Comments. We will learn a new things in next tutorial.

  • what is an attribute in html,
  • html elements and attributes,
  • html attributes example,
  • elements in html,
  • html attributes list,
  • html attributes list with examples,
  • html tags and attributes pdf,
  • html elements list,
  • HTML comments example,
  • What is HTML,

42 Comments

doxycyclinevurne · December 25, 2022 at 11:59 am

I’m not sure where you’re getting your info, but good topic. I needs to spend some time learning much more or understanding more.
Thanks for great information I was looking for this info for my mission.

antibioticsK · January 10, 2023 at 12:04 am

Thanks for wonderful information I was looking for this information for my mission.

Maudie Schwentker · May 7, 2023 at 11:12 am

Spot on with this write-up, I truly believe this site requirements additional consideration. I’ll likely to end up again to see additional, thank you for that info.

Elliot Segar · May 21, 2023 at 1:49 pm

what’s up, puissant blog on oleaginous loss. analogous helped.

Alesha Zuleger · May 21, 2023 at 10:10 pm

what’s happening, chief blog on unctuous loss. said helped.

Torri Bok · July 4, 2023 at 3:57 pm

what’s up, regal blog on oleaginous loss. this helped.

Becki Fleurantin · December 10, 2023 at 12:12 am

Thank you for the sensible critique. Me & my cousin were just preparing to do a little research about this. We grabbed a book from our local library but I think I learned more from this post. I am very glad to see such great info being shared freely out there…

Sudie Drossos · December 11, 2023 at 3:33 pm

I was very encouraged to find this site. The reason being that this is such an informative post. I wanted to thank you for this special read of the subject. I definitely savored every little bit of it and I have you bookmarked to check out new stuff you post.

Clair Arkins · December 23, 2023 at 2:33 pm

I can understand that this is life during wartime, but many other films of this genre manage to squeeze in some hot babe scenes.

Devora Shoe · December 24, 2023 at 7:03 am

I always was interested in this topic and stock still am, regards for putting up.

Nina Qiu · December 24, 2023 at 10:13 am

Hi there. Very cool site!! Guy .. Beautiful .. Wonderful .. I will bookmark your website and take the feeds additionally…I am glad to locate so much useful info right here in the article. Thanks for sharing…

Stevie Dellarocco · December 25, 2023 at 1:01 am

very nice submit, i certainly love this web site, carry on it}

Bill Staniszewski · December 25, 2023 at 5:14 am

Sometimes, blogging is a bit tiresome specially if you need to update more topics.,-`”.

Ronnie Bobak · December 25, 2023 at 10:09 pm

Very interesting details you have observed , appreciate it for posting .

Timothy Hokkanen · December 26, 2023 at 3:28 am

Woh I like your content , saved to bookmarks ! .

Austin Deluna · December 27, 2023 at 3:27 am

when giving corporate gifts, you should also be creative to find the best gifts to give”

Apolonia Sadin · December 27, 2023 at 7:31 am

Good day, i am doing research right now and your blog really helped me,  

Jeannine Levario · December 27, 2023 at 11:10 am

I love blogging and i can say that you also love blogging.`”‘*.

rajamas · January 18, 2024 at 7:16 pm

This is a great tip particularly to those new to the blogosphere. Short but very accurate info… Many thanks for sharing this one. A must read article!

Cruises · January 19, 2024 at 1:54 am

I love reading through an article that can make men and women think. Also, thank you for allowing me to comment.

Esmeralda Fornaro · January 21, 2024 at 6:54 am

I like what you guys are up also. Such smart work and reporting! Carry on the superb works guys I have incorporated you guys to my blogroll. I think it will improve the value of my web site

Eldora Elgar · January 21, 2024 at 10:20 am

Good post. I be taught something more difficult on totally different blogs everyday. It should always be stimulating to read content from other writers and observe a little bit one thing from their store. I’d prefer to use some with the content on my weblog whether or not you don’t mind. Natually I’ll give you a link in your net blog. Thanks for sharing.

Josue Kreisler · February 3, 2024 at 5:31 am

That very first offered me personally on this viewpoint to deal with something that gives a crucial description respecting ?

Russ Korns · February 3, 2024 at 1:08 pm

Regards for all your efforts that you have put in this. very interesting information.

Victorian fantasy · February 3, 2024 at 3:16 pm

Great post. I will be going through some of these issues as well..

Charley Hutchingson · February 3, 2024 at 11:28 pm

I really like forgathering utile info, this post has got me even more info! .

Queens Nails · February 10, 2024 at 4:42 pm

Hello there! Do you know if they make any plugins to help with SEO? I’m trying to get my blog to rank for some targeted keywords but I’m not seeing very good success. If you know of any please share. Kudos!

link bokep · February 10, 2024 at 11:31 pm

I was suggested this blog by my cousin. I’m not sure whether this post is written by him as nobody else know such detailed about my problem. You are amazing! Thanks!

Queens Nails · February 11, 2024 at 4:23 am

I’m not that much of a internet reader to be honest but your sites really nice, keep it up! I’ll go ahead and bookmark your website to come back down the road. Cheers

coffee samplers · February 24, 2024 at 6:44 pm

Hi! I just want to give you a huge thumbs up for the great info you’ve got right here on this post. I will be coming back to your website for more soon.

Diane Schutte · February 24, 2024 at 11:46 pm

Appreciate it for helping out, superb information.

Arron Bushby · April 9, 2024 at 2:16 pm

Basically received my first cavity. Rather devastating. I would like a super smile. Looking a lot more choices. Many thanks for the article

bokep indo · April 30, 2024 at 4:14 am

A person essentially help to make seriously posts I would state. This is the very first time I frequented your web page and thus far? I amazed with the research you made to create this particular publish amazing. Fantastic job!

situs bokep · April 30, 2024 at 4:40 am

I have recently started a site, the info you offer on this site has helped me greatly. Thanks for all of your time & work.

xparkles · May 5, 2024 at 7:38 pm

I would like to thank you for the efforts you’ve put in writing this site. I am hoping the same high-grade web site post from you in the upcoming as well. Actually your creative writing skills has inspired me to get my own website now. Actually the blogging is spreading its wings rapidly. Your write up is a great example of it.

situs bokep · May 6, 2024 at 6:17 am

I have not checked in here for some time as I thought it was getting boring, but the last few posts are great quality so I guess I?ll add you back to my everyday bloglist. You deserve it my friend 🙂

Rigoberto Dupuy · May 6, 2024 at 4:14 pm

Thanks for this post. I definitely agree with what you are saying. I have been talking about this subject a lot lately with my mother so hopefully this will get him to see my point of view. Fingers crossed!

link bokep · May 6, 2024 at 6:15 pm

Howdy would you mind stating which blog platform you’re using? I’m going to start my own blog soon but I’m having a tough time choosing between BlogEngine/Wordpress/B2evolution and Drupal. The reason I ask is because your design seems different then most blogs and I’m looking for something completely unique. P.S Sorry for getting off-topic but I had to ask!

Charisse Vanvranken · May 7, 2024 at 7:03 am

concerning this. I assume I will have to wait and see if there are any new posts that originate from the remarks left here.

Elwanda Baysmore · May 7, 2024 at 11:53 am

the good thing about solar water heaters is that they can help you conserve energy;;

PSL88 · June 18, 2024 at 11:23 am

Howdy! I could have sworn I’ve visited your blog before but after looking at a few of the articles I realized it’s new to me. Anyways, I’m definitely pleased I discovered it and I’ll be bookmarking it and checking back frequently!

smortergiremal · November 4, 2024 at 2:28 am

You actually make it appear really easy along with your presentation but I to find this matter to be actually one thing which I think I would never understand. It seems too complex and very huge for me. I’m looking forward on your next put up, I?¦ll try to get the dangle of it!

Leave a Reply

Avatar placeholder

Your email address will not be published. Required fields are marked *