• The title attribute is an HTML attribute used to provide additional information or a tooltip for an element.
• It is typically used with elements like <a>, <img>, <abbr>, or any other element that can contain text.
• The text specified in the title attribute is displayed when a user hovers over or focuses on the element.
• The title attribute helps in providing additional context, explanation, or clarification about the element's purpose or content.
• It is important to keep the text in the title attribute concise and descriptive for better user experience.
<!DOCTYPE html>
<html>
<head>
<:title>Title Attribute<title>
</head>
<body>
<h1 title="Hello Guys">Welcome To JTC</h1>
<p title="See the result">Move the cursor over text area</p>
</body>
</html>
• The href attribute is an HTML attribute used to specify the destination or target URL of a hyperlink.
• It is used with the <a> (anchor) element to create clickable links to other web pages, documents, or resources.
• The href attribute value can be a relative URL (relative to the current page) or an absolute URL (including the full web address).
• Clicking on a hyperlink with the href attribute redirects the user to the specified URL.
• The href attribute can also be used for internal linking, allowing users to navigate within the same web page by using anchor tags and corresponding IDs.
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<h1 style="color: red;">Welcome to JTC</h1>
<a href="www.jtcindia.org">Click Here!! You will be Redirected to JTC Home page</a>
</body>
</html>
• The src attribute is an HTML attribute used to specify the source or location of a media file, such as an image, video, or audio.
• It is commonly used with elements like <img>, <video>, <audio>, or any other element that can display media content.
• The src attribute value contains the URL or file path pointing to the desired media file.
• When the web browser encounters an element with the src attribute, it fetches and displays the media content specified by the URL.
• The src attribute allows web developers to embed media files into webpages, providing visual or auditory content to enhance the user experience.
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<h1 style="text-align:center">src attribute</h1>
<img src="coding.jpg" >
</body>
</html>
• The alt attribute is an HTML attribute used to provide alternative text for an image when it cannot be displayed.
• It is commonly used with the <img> element to describe the content or purpose of the image.
• The text provided in the alt attribute is displayed in place of the image if it fails to load or if the user is using assistive technologies.
• The alt attribute is important for accessibility, as it enables visually impaired users or those with images disabled to understand the image's meaning.
• It is recommended to provide concise and descriptive alternative text that conveys the image's essential information.
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<h1>alt attribute</h1>
<img src="coding.jpg" alt="Man Leaning Coding">
</body>
</html>
• The style attribute is an HTML attribute used to apply inline styles to an element.
• It allows you to specify CSS properties and values directly within the HTML tag.
• With the style attribute, you can control the appearance, layout, and design of individual elements.
• The style attribute is flexible and can be used to set properties like color, font size, margin, padding, and more.
• Inline styles defined with the style attribute take precedence over external CSS stylesheets and embedded styles.
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<h1 style="text-align: center;">style attribute</h1>
<p style="color: red;">Hello Everyone!!Welcome to JTC</p>
</body>
</html>
• The lang attribute is an HTML attribute used to specify the language of the content within an element.
• It is commonly used with the <html> or <body> element to define the language for the entire document or specific sections.
• The lang attribute value follows the language code standards, such as "en" for English, "es" for Spanish, or "fr" for French.
• Including the lang attribute helps assistive technologies, search engines, and translation tools understand and process the content accurately.
• By providing the appropriate lang attribute, you improve accessibility and ensure that the content is displayed correctly for users in different language environments.
<!DOCTYPE html>
<html lang="hi">
<head>
</head>
<body>
<h1>lang attribute</h1>
<p>नमस्ते </p>
</body>
</html>