DONATE  
MENU
JAVASCRIPT
JSON
HTML
AJAX

HTML Tutorials

INTRODUCTION

» Introduction to HTML

» PRACTICE IT Editor

» Getting Started

» HTML Example

» HTML Tags

» HTML Elements

» Nesting Tags

» Block & Inline Elements

» HTML Attributes

» HTML Comments

» File Paths

» HTML Entities & Symbols

TAGS/ELEMENTS

» Important Tags

» HTML Headings

» Text Formatting

» HTML Links

» HTML Lists

» HTML Tables

» HTML Images

» HTML Audios

» HTML Videos

» HTML Iframes

» HTML Styles

» HTML Scripts

» Semantic Elements

» HTML Metadata

ATTRIBUTES

» Elements' ID

» Elements' Class

» Elements' Style

» Element's Align

» Element's Height & Width

HTML FORMS

» HTML Forms

» Input Elements

» HTML Textarea

» HTML Select

HTML EXAMPLE

» Login Page

.. » HTML » Tags/elements » HTML Styles
Share Tweet WhatsApp

HTML Styles

The HTML style tag is used in defining and declaring styles for HTML elements in a webpage. Styles are very important for the beautification of your websites and webpages. With the <style> tag, you can declare such styles on various elements existing in a webpage. EXAMPLE
<!DOCTYPE html>
<html>
<head>
<style>
h1{
color:blue;
margin: 1%;
}
</style>
</head>
<body>
<h1>Hello World</h1>
</body>
</html>

Copy PRACTICE IT

With the <style> tag, you can define styles for just any HTML element just as you would do on a separate CSS file but then, such styles can only be applied on elements existing on that particular webpage.
NOTE:
  • You will properly learn all you need to know as regard applying styles to HTML elements in the separate CSS tutorial.
You can declare as many style elements as you want on any part of a webpage. SUMMARY
  1. Styles are important to just any webpage. They are to a webpage what the human skin is to the skull.
  2. The HTML <style> tag helps us define and declare styles that should be applied on a web page's elements.
  3. More than one <style> elements can exist on a webpage and practically anywhere.
Take a short quiz on HTML Styles.
Ask a question or tell us if HTML Styles is easy or not.
cent?

Join our 1,090 subscribers to receive tutorials' updates!

  We won't spam your mail box. We hate it.





StackBeginner 2021 © Joseph Omamode