LERAN HTML COMPLETE

Learn one of the most powerful programming languages in the world and become a rockstar developer.

HTML Headings


The HTML <head> Element

The <head> element is a container for metadata (data about data) and is placed between the <html> tag and the <body> tag.

HTML metadata is data about the HTML document. Metadata is not displayed.

Metadata typically define the document title, character set, styles, scripts, and other meta information.

The following tags describe metadata: <title><style><meta><link><script>, and <base>.


The HTML <title> Element

The <title> element defines the title of the document, and is required in all HTML documents.

The <title> element:

  • defines a title in the browser tab
  • provides a title for the page when it is added to favorites
  • displays a title for the page in search engine results

A simple HTML document:

<!DOCTYPE html>
<html lang="en">
    <head>
        <title>Hello World Document</title>
     </head>
    <body>
        <p>Hello World!</p>
    </body>
</html>

The HTML <style> Element

The <style> element is used to define style information for a single HTML page:

<head>
    <title>Internal style sheet</title>
    	<style>
    	    body {
    	        background-color: YellowGreen; 
    	    }
    	    h1 {
    	        color: red; 
    	    }
    	    p {
    	        color: green; 
    	    }
    	</style>
</head>

The HTML <link> Element

The <link> element is used to link to external style sheets:

<link rel="stylesheet" href="mystyle.css">

The HTML meta Element

The <meta> element provides metadata about the HTML document. Metadata is a set of data that describes and gives information about other data.


The HTML script Element

The <script> element is used to define a client-side script, such as a JavaScript.

The script and noscript element will be explained in a later chapter.


x
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our Privacy Policy That's Fine