HTML <style> tag
HTML <style> tag : Definition
• The HTML <style> element is used to specify the style appearance and position of various element on a web page.
• The <style> <element> is recommended to be used inside the <head> tag, When a browser reads a style sheet, it will format the HTML document according to the information in the style sheet.
Html <style> tag example 1:
<!DOCTYPE html>
<html lang="en">
<head>
<title>Example of HTML section Tag</title>
<style>
h1{
font-size: 36px;
color: red;
font-family: fantasy;
}
p{
color: green;
font-size: 25px;
font-family: cursive;
}
</style>
</head>
<body>
<h1>This is a heading</h1>
<p>This is a paragraph.</p>
</body>
</html>
Output :
This is a heading
This is a paragraph.