1.

In how many ways can we specify the CSS styles for the HTML element?

Answer»

There are three ways in which we can SPECIFY the STYLES for HTML elements:

  • Inline: Here we use the ‘style’ attribute inside the HTML element.
  • Internal: Here we use the <style> tag inside the <head> tag. To apply the style we bind the elements USING ‘id’ or ‘class’ attributes.
  • External: Here we use the <link> tag inside <head> tag to reference the CSS file into our HTML code. Again the binding between elements and styles is done using ‘id’ or ‘class’ attributes.


Discussion

No Comment Found