The <style> element is employed to specify style information for an individual HTML page.
Example
<style> body {background-color: powderblue;} h1 {color: red;} p {color: blue;} </style> |
The <link> element establishes the connection between the current document and an external resource.
Typically, the <link> tag is utilized to reference external style sheets.
Example
<link rel=”stylesheet” href=”mystyle.css”> |
The <meta> element is commonly employed to define the character set, page description, keywords, authorship of the document, and viewport settings.
Although the metadata isn’t visible on the page, it is utilized by browsers to determine how to display content or refresh the page, by search engines to identify keywords, and by other web services.
Example
Specify the character encoding utilized:
<meta charset=”UTF-8″> |
Specify keywords for search engine optimization:
<meta name=”keywords” content=”HTML, CSS, JavaScript”> |
Provide a description of your webpage:
<meta name=”description” content=”Free Web tutorials”> |
Specify the authorship of a page:
<meta name=”author” content=”John Doe”> |
Refresh the document every 30 seconds:
<meta http-equiv=”refresh” content=”30″> |
Configuring the viewport to ensure optimal display of your website across various devices:
<meta name=”viewport” content=”width=device-width, initial-scale=1.0″> |
Illustration of <meta> tags:
Example
<meta charset=”UTF-8″> <meta name=”description” content=”Free Web tutorials”> <meta name=”keywords” content=”HTML, CSS, JavaScript”> <meta name=”author” content=”John Doe”> |