HTML5 Attributes with examples | HTML5 tutorial for beginners

HTML5 tutorial Attributes in HTML5 for beginners

Attributes in in HTML5 forms HTML5 using Attributes

Most of elements can have attributes Attributes will make additional information about an element These attributes always starts after the start tag It will name value pairs like id=”userid”

html5 href Attribute HTML tutorial for beginners
In html link will define with <a> tag, this link with in <a> tag one href attribute require to write that link address where to go (the link address). Example: <a href=""> this is an example link </a> Will cover more about link <a> tag in this tutorial

html5 src Attribute
images are defined in html using <img> tag. For this tag one attribute is require give an image source path where the image is located that is src attribute is used to write source of the image. Example: <img src="sunrise.jpg" alt="php tutorial"> <img src="MyDocuments/sunrise.jpg" alt="harisystems" >

HTML5 Attributes of width and height

In HTML to show images these two attributes are also require to set the sizes of image:

Example: <img src="sunrise.jpg" width="300" height="300" alt="linux tutorial"> In width attribute we used size as width=”150” means 300 pixel wide. Will cover more on images chapter

html5 alt Attribute

This attribute is use for specifying an alternate text to that image, the value of the attribute can be read by screen readers, some time it can be "listening" to webpage. Blind people can hear that element attribute name.

Example: <img src="sunrise.jpg" alt="html tutorial">

html5 style Attribute

This style attribute is used to specify the style of an element to design, page appearance, like color of font, font type, size and more. For better style you need to learn CSS – cascading style sheet that will cover on upcoming tutorials

Example: <p style="color:blue">This is a paragraph of HTML5 tutorials for beginners</p>

Lang attribute
The language we need to specify our HTML document to read it can be declared on <html> tag. Language is declared with the lang attribute this is important for SEO activities like search engines to identify the language in the html form as well screen readers Example: <!DOCTYPE html> <html lang="en-US"> <body> ... </body> </html>
HTML5 Title attribute
Title attribute is added to the <p> element it will use for tooltip for paragraph on mouse over Example: <p title="this is title tool tip"> paragraph context written here. </p> While using attributes use Double quotes for text written on this it will always better usage on html forms Example: title="this is title name" Suggestion: earlier we suggest that always recommends lowercase tag names
Web development fullstack course Web development course 2021: Fullstack
Online course Online Courses: Include Certification
Harisystems is optimized for learning, testing and training. courses are designed to be simplified to improve reading and basic understanding for beginners to expert level. Tutorials and examples are constantly reviewed to avoid errors, however we cannot warrant full correctness of all content. if any found need to correct write us at we Harisystems is not responsible for any with this tutorials, While using this site, you agree to have read and accepted our terms of use, cookie and privacy policy. Copyright 2007-2022 by Harisystems. All Rights Reserved.
Copyright © Harisystems 2022