Top Ads

Html Use Attribute

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

Code

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

Title Attribute

title attribute is added to the <p> element. The value of the title attribute will be displayed as a tooltip when you mouse over the paragraph

Code

<p title="I'm a tooltip">
This is a paragraph.
</p>


HREF ATTRIBUTE

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

Code

<a href="http://www.webtech100.blogspot.com">This is a link</a>

SIZE ATTRIBUTES

The filename of the source (src), and the size of the image (width and height) are all provided as attributes

Code

<img src="webtech100.jpg" width="500" height="230">

ALT ATTRIBUTE

The alt attribute specifies an alternative text to be used, when an image cannot be displayed

Code

<a href="http://www.webtech100.blogspot.com" alt="webtech100.blogspot.comwidth="500" height="230">