Class 12 computer
06.08.2020
HTML Tags
HTML tags are like keywords which defines that how web
browser will format and display the content. With the help of tags, a web
browser can distinguish between an HTML content and a simple content. HTML tags
contain three main parts:
opening tag, content and closing tag. But some HTML tags
are unclosed tags.
When a web browser reads an
HTML document, browser reads it from top to bottom and left to right. HTML tags
are used to create HTML documents and render their properties. Each HTML tags
have different properties.
An HTML file must have some essential tags so that web
browser can differentiate between a simple text and HTML text. You can use as
many tags you want as per your code requirement.
- All HTML tags must enclosed within < > these
brackets.
- Every tag in HTML perform different tasks.
- If you have used an open tag <tag>, then you
must use a close tag </tag> (except some tags)
HTML Attribute
- HTML attributes are special words which provide additional information about the elements or attributes are the modifier of the HTML element.
- Each element or tag can have attributes, which
- defines the behaviour of that element.
- Attributes should always be applied with start tag.
- The Attribute should always be applied with its name
and value pair.
- The Attributes name and values are case sensitive,
and it is recommended by W3C that it should be written in Lowercase only.
- You can add multiple attributes in one HTML element,
but need to give space between two attributes.
- <element attribute_name="value">content</element>
- <html>
- <head>
- </head>
- <body>
- <h1> This is Style attribute</h1>
- <p style="height: 50px; color: blue">It will add style property in element</p>
- <p style="color: red">It will change the color of content</p>
- </body>
- </html>
The href attribute in HTML
Description: The href attribute is the main attribute of <a> anchor
tag. This attribute gives the link address which is specified in that
link. The href
attribute provides the hyperlink, and if it is blank, then it will remain in
same page.
1. <a href="https:// ">This is a link</a>
Comments
Post a Comment