Skip to main content

HTML Attributes - What is Attributes in HTML


HTML Attributes





HTML Attributes define additional characteristics or properties of the element for example width and height of an image. 





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




Tip: Both single and double quotes can be used to quote attribute values. However, double quotes are the most common. In situations where the attribute value itself contains double quotes, it is necessary to wrap the value in single quotes





href Attribute in HTML





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





For Example:





<a href=" https://ilmiblog.com.pk/ ">This is a link</a>





src Attribute in HTML





HTML images are defined with the tag. The filename of the image source is specified in the src attribute:





For Example:





<img src="ilmiblog-logo.png">





width and height Attributes in HTML





The width and height attributes of the IMG element specifies the width and height of an image.





For Example:





<img src="ilmiblog-logo.png" width="500" height="600">





alt Attribute in HTML





The required alt attribute specifies an alternate text for an image if the image cannot be displayed. The alt attribute provides alternative information for an image if a user for some reason cannot view it.





For Example:





<img src="ilmiblog-logo.png" alt="Logo of Ilmiblog">





lang Attribute in HTML





The language of the document can be declared in the tag. The language is declared with the lang attribute. Declaring a language is important for accessibility applications and search engines:





For Example:





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





title Attribute in HTML





The value of the title attribute will be displayed as a tooltip when you mouse over the paragraph:





For Example:





<h2 title="ilmiblog Title" > ilmiBlog </h2>





HTML Attributes in Urdu/Hindi Video






https://www.youtube.com/watch?v=7jp4x7RODAc&t=82s




Social Accounts





You Can Visit our YouTube Channel: Techz Hub


Comments

Popular posts from this blog

PARTS OF SPEECH – ENGLISH GRAMMAR

There are nine parts of speech Noun Pronoun Adjective Adverb Verb Preposition Conjunction Article Interjection You Can Read All Of Them By Just Clicking On The Topic Link

SCOPE SUBJECTS OF FSC PRE-MEDICAL

F.SC PRE-MEDICAL SUBJECTS SCOPE OF FSC PRE-MEDICAL F.SC PRE-MEDICAL SUBJECTS SCOPE OF FSC PRE-MEDICAL The students those are interested in medical sciences in future they must also improve their skills and abilities that helps them to become a good doctor or pharmacists. Thus FSc Pre-medical provides a general definition of the fundamentals of scientific research in the field of mobile science.We are giving you detailed information about admission in FSc in pre-medical group, FSc Pre-Medical Subjects and eligibility criteria for admission. This is very complex and conceptual field so we recommend students who are simply crazy to be a doctor or anything else. This is the first step in your journey to be good doctor. Read this article fully we provide all the essential information here. Top 10 Degrees which has More Scope in Pakistan – 2020 FSc Pre-Medical Subjects : FSc pre-Medical group is two year program which is divided into two part. The subject list is given below these all subje...

Pronoun and its types

Pronoun Definition:  A word used in place of noun is known as pronoun. Note:  Pronoun is used in sentences to avoid repetition of the noun in a sentence over and over again. Example: Michael is at the movie with  Michael’s wife. Michael   enjoys spending time with  Michael’s wife . Note:  In the above example noun (Michael) is used over and over again, to avoid such repetition we can simply replace this noun with pronouns like he, his, her. Michael is at the movie with  his  wife.  He enjoys spending time with  her . TYPES OF PRONOUN There are several types of pronoun. 1. Personal Pronoun:  Pronouns in their different forms show person, number, gender (whether male, female) and case (the relationship of a word with other words) known as personal pronoun. Personal pronouns are I, we, us, you, your, yourself, they, them themselves Example: We  are happy. They  bethought  them  of a new exp...