You are currently viewing HTML Tag Attributes |  Lesson 06
HTML Tag Attributes

HTML Tag Attributes | Lesson 06

First of all this lesson explain basic HTML Tag Attributes used by html tags, like lang, title, src, href, width, height and style.

This video could help for more understanding:

HTML Attribute video

HTML Attributes

  • All HTML elements can have attributes
  • HTML attributes provide additional information about an element
  • Also attributes are always specified in the start tag
  • Attributes usually come in name/value pairs like: name=”value”

The href Attribute

HTML links are defined with the <a> tag. The link address is specified in the href attribute:

example:

 <a href="https://www.safhatech.com">Safhatech link</a> 

The src Attribute

HTML images are defined with the <img> tag. The file path of the image source is specified in the src attribute:

example:

 <img src="image_file_path.jpg"> 

The width and height Attributes

Images in HTML have a set of size attributes, which specifies the width and height of the image:

example:

 <img src="image_file_path.jpg" width="700px" height="400px"> 

The style Attribute

The style attribute is used to specify the styling of an element, like color, font, size etc.

example:

 <p style="color:red">This is Paragraph tag</p> 

The lang Attribute

The language of the document can be declared in the <html> tag. The language is declared with the lang attribute. Declaring a language is important for accessibility applications (screen readers) and search engines:

example:


<!DOCTYPE html>
<html lang="de">
<body>

safhatech example

</body>
</html>

hint: “en” for English, “de” for Germany, “fr” for France, “ar” for Arabic….

Title Attribute:

Finally here, a title attribute is added to the <p> element. The value of the title attribute will pop This lesson explain basic HTML Tag Attributes used by html tags, like lang, title, src, href, width, height and style. up as a tool tip when you mouse over the paragraph:

example:

 <p title="This is Title">
This is a paragraph.
</p> 

This post is one of the HTML5 for deep understanding course. where we will learn every common elements from basic to the advanced element.

In addition each lesson has a video which you could visit and watch for more practicing and for deep understanding.

We hope that we could give the best for you and for the deep and easy understanding.

You could follow the series from our website SAFHATECH.com and go to categories and then programming and then Choose the course you want then just click next post to go step by step.

Finally we hope every thing is works as you suspect.


Consequently You could follow us at :

Website URL: https://www.safhatech.com/

Youtube: https://www.youtube.com/channel/UCIVzh6iykNowNcOUT5Gfasw

Twitter: http:// https://twitter.com/safhatech

Instegram: https://www.instagram.com/safhatech

Facebook: http:// https://www.facebook.com/Safhatech-487171875443687

Phone:967772223681

This Post Has 5 Comments

    1. Mofreh

      Hello,
      How are you
      could you tell me what your intention of using my video is?

  1. Shelby Weisenfels

    At this moment I am going away to do my breakfast, later than having my breakfast coming again to read more news.|

  2. Taylor Lesa

    An intriguing discussion is worth comment. I believe that you should write more on this topic, it may not be a taboo subject but typically people do not talk about such issues. To the next! Cheers!!|

  3. Yasmin Michealson

    Helpful information. Lucky me I discovered your web site by chance, and I am shocked why this accident didn’t came about in advance! I bookmarked it.|

Leave a Reply