HTML-Styles in HTML(HTML-10)

                                                     

It can be a bit overwhelming to wrap your head around all the different ways you can style your web pages. In this blog post, we'll go over some of the basic HTML styles you can use to make your pages look great.

There are 3 types that you can use as styles in HTM,

  1. Inline style
  2. Internal style
  3. External style

Inline style

First off, let's talk about inline styles. You add these styles directly to your HTML elements using the "style" attribute. For example, if you wanted to make a paragraph of text blue, you could use the following code:


You can use inline styles to change a variety of properties, including font size, background color, border style, and more. However, using inline styles for large-scale styling is generally not recommended, as they can make your HTML code harder to read and maintain.

Internal style

Next up, we have internal styles. These are styles that you add to the "head" section of your HTML document, using the "style" tag. For example:


Internal styles are great for styling multiple elements on a single page. You can target specific elements using CSS selectors, and then apply styles to them as needed. This can help keep your HTML code clean and organized.

External style

Finally, we have external styles. These are styles that you define in a separate CSS file, and then link to from your HTML document using the "link" tag. For example:

External stylesheets are the most powerful way to style your web pages. You can define styles for multiple pages at once, and you can reuse the same stylesheet across multiple pages. They also make it easier to maintain your code, as you can separate your styling from your content.

Conclusion

In conclusion, there are many different ways to style your HTML pages, from inline styles to external stylesheets. As you become more comfortable with HTML and CSS, you'll develop your own preferred methods for styling your pages. Just remember to keep your code clean and organized, and always strive to create visually appealing web pages that are easy to read and navigate. Internal, inline, and external styles are related to CSS (Cascading Style Sheets) which is used to style and format HTML elements. HTML is used to create the structure of a web page, while CSS is used to define the visual style of the HTML elements. We'll get to know more about CSS in upcoming posts.

THANKYOU CATCH YOU AT THE NEXT ONE😍

Post a Comment

أحدث أقدم
LightBlog
LightBlog