Example Of Some HTML Tags And Their uses

Asked By 40 points N/A Posted on -
qa-featured

State the uses of the following HTML Tags: –

  1. <style>
  2. <class>
  3. <a href>
  4. <span>
  5. <nav-bar>
SHARE
Answered By 50 points N/A #186721

Example Of Some HTML Tags And Their uses

qa-featured

Hi

The uses of the HTML tags are as follows:
 
a. <style> : The style attribute is used to specify any customization that we intend to do on our web page.For example, Changing the width, color, background color, etc.
 
b. <class> : The class attribute is used to make containers on the web page
 
c. <a href> : It is used to provide a link to other web pages
 
d. <span> : It is used to group elements of the web page. When creating a table, we can use this tag to merge two columns or two rows, etc.
 
e. <nav-bar> : It is used to make customizations to the navigation bar.
 
Answered By 564815 points N/A #186723

Example Of Some HTML Tags And Their uses

qa-featured

The style tag <style></style> is used to describe the style information for an HTML document and should be used with a closing tag. Within the style tag, you need to specify how the HTML elements should be rendered or displayed in a web browser. An HTML document can have multiple instances of the style tag and is supported in all major web browsers.

The class attribute is used to indicate one or more classnames for an element and is frequently used to point or direct to a class in a style sheet. Nevertheless, you can also use it with a JavaScript using the HTML DOM to make modifications to HTML elements with a specified class. The class attribute is supported in all major web browsers.

In HTML5, you can use the class attribute on any HTML element though it is not necessarily useful. But in HTML 4.01, you cannot use the class attribute with the following HTML tags:

  • * <base>
  • * <head>
  • * <html>
  • * <meta>
  • * <param>
  • * <script>
  • * <style>
  • * <title>

Href is not a tag but an attribute to the anchor tag <a></a>. It is used to specify the URL of the page where the link goes to. For example, <a href="http://www.techyv.com">Visit TechyV.com!</a>. The span tag <span></span> is used to group inline-elements in an HTML document but provides no visual change. It is supported in all major web browsers. For example, <p>My mother has <span style="color:blue">blue</span> eyes. </p>.

Login/Register to Answer

Related Questions