HTML Elements
HTML Elements
An HTML document consists of HTML elements. HTML tags define these elements. It has the following parts:
- Opening HTML Tag
- Element content
- Closing HTML Tag
Example
<html>
<!–
####################################
# HTML Elements Demo
####################################
–>
<head>
<title> HTML Tutorials – www.TestingDocs.com</title>
</head>
<body>
<h1> This is Heading</h1>
<br>
<p> This is a sample paragraph text. </h2>
</body>
</html>
HTML Attributes
Attributes give additional information about an HTML element.
Syntax
Attributes are specified in the start tag of the element. The syntax to specify an attribute is:
attribute-name = “attribute-value”
Example
<input type=”radio” name=”radioDemo” value=”Maths”>
The input tag in the example has three attributes: type, name and value. The values of the attributes are specified within the double quotes.
—
HTML Tutorials
HTML Tutorials on this website:
https://www.testingdocs.com/html-tutorials/