- Introduction To HTML
- HTML Elements And Tags
- Text Formatting And Styling
- HTML Elements
- HTML Attributes
- HTML Headings
- HTML Paragraphs
- HTML Styles
- HTML Formatting Elements
- HTML Quotation
- HTML Comments
- HTML Colors
- HTML Styles - CSS
- HTML Links
- HTML Images
- HTML Tables
- HTML Lists
- HTML Block And Inline
- HTML Class
- HTML Id
- HTML Iframes
- HTML JavaScript
- HTML File Paths
- HTML Head
- HTML Layout
- HTML Responsive
- HTML Computer Code
- HTML Semantic
- HTML Forms
- HTML Form Attributes
- HTML Form Elements
- HTML Input Types
- HTML Input Attributes
- HTML Input Form Attributes
- HTML Canvas
- HTML SVG
- HTML Media
- HTML Video
- HTML Audio
- HTML YouTube
HTML Attributes
HTML Attributes
- Every element in HTML can have attributes.
- Additional information about elements is provided by attributes.
- Always specify attributes in the start tag.
- The standard format for attributes is name="value"
The Href Attribute
A hyperlink is defined using the <a>
tag. The URL of the page to which the link points is specified by the href attribute:
The Src Attribute
An image can be included in an HTML page using the <img> tag. The path to the image that will be shown is specified by the src attribute:
The Alt Attribute
If an image cannot be displayed for some reason, the mandatory alt property for the <img>
tag gives an alternative text for the picture. This can be because of a src attribute problem, a slow connection, or the user's use of a screen reader.
The Style Attribute
Using the style attribute, you may give an element additional style like colour, font, size, and others.
The Lang Attribute
To specify the language of the Web page, the lang attribute must always be included inside the <html>
tag. Search engines and browsers are intended to benefit from this.
The example that follows uses English as the language:
<html lang="en">
<body>
...
</body>
</html>
The language code in the lang attribute may optionally be supplemented with a country code. Thus, the HTML page's initial two characters specify the language, while its final two characters specify the nation.
The English language and the United States are specified in the example below:
<html lang="en-US">
<body>
...
</body>
</html>
The Title Attribute
The title attribute provides more details about an element.
When you hover your cursor over the element, a tooltip containing the value of the title attribute will appear:
Products
Partner
Copyright © RVR Innovations LLP 2024 | All rights reserved - Mytat.co is the venture of RVR Innovations LLP