
- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to use the <style> tag to define style information for an HTML page?
The HTML <style> tag is for declaring style sheets within the head of the HTML document and the technique is known as Internal CSS to add CSS to HTML Page. CSS can be used in various ways in HTML. One of them is by using Internal CSS i.e. using a <style> tag.
The <style> tag is used in the <head>…</head> tag. It defines CSS style for a single page.
Example
You can try to run the following code to use the <style> tag
<!DOCTYPE html> <html> <head> <style> h1 {color: green;} p {font-size: 14px;} </style> </head> <body> <h1>Tutorials</h1> <p>We provide free learning content.</p> </body> </html>
- Related Questions & Answers
- How to use the <base> tag to define the base URL for an HTML page?
- How to use the <title> tag to define HTML document title?
- How do we style HTML elements using the division tag <div>?
- How do we style HTML elements using the span tag <span>?
- How to use style attribute to define style rules?
- How to use the <datalist> tag in HTML?
- How to use the <keygen> tag in HTML?
- How to use the <output> tag in HTML?
- How to use the <script> tag to define client-side JavaScript?
- How to use the <link> tag to define a relationship to an external resource?
- How to create an inline frame using the <iframe> tag inside an HTML page?
- What are the different <meta> tags to define special meta information in HTML page?
- HTML <html> Tag
- How to use the <kbd> tag for keyboard input formatting in HTML?
- Working with <style> element for CSS
Advertisements