HTML have two main sections. One is Head and the another one is Body.
The <head> element is a container for all the head elements. Elements inside <head> can include scripts, instruct the browser where to find style sheets, provide meta information, and more.
The following tags can be added to the head section: <title>, <style>, <meta>, <link>, <script>, <noscript>, and <base>.
The <body> tag defines the document's body.
The <body> element contains all the contents of an HTML document, such as text, hyperlinks, images, tables, lists, etc.
HEAD Section
The <head> element is a container for all the head elements. Elements inside <head> can include scripts, instruct the browser where to find style sheets, provide meta information, and more.
The following tags can be added to the head section: <title>, <style>, <meta>, <link>, <script>, <noscript>, and <base>.
BODY Section
The <body> tag defines the document's body.
The <body> element contains all the contents of an HTML document, such as text, hyperlinks, images, tables, lists, etc.
Example :-
- Open a text editor and type the following lines.
- Save that file as "myweb2.html" (or any other name).
- Open that file (myweb2.html) in a web browser.
- You get like this out put.
In this example:-
Head Section | <head> <title>My Web Page!</title> </head> | |
Body Section | <body> <h1>Sub heading</h1> <p>Avoid losing floppy disks with important school...</p> </body> |
Note:- Don't worry if the examples use tags you have not learned. You will learn about them in the next chapters.
No comments:
Post a Comment