This document provides an introduction to HTML, explaining what markup languages are and the advantages of using HTML for web development. It details the structure of an HTML document, including the head and body sections, and how to create elements with opening and closing tags. Additionally, it covers the use of comments in HTML and provides examples of HTML code for creating a simple webpage.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
5 views15 pages
1.Introduction to HTML
This document provides an introduction to HTML, explaining what markup languages are and the advantages of using HTML for web development. It details the structure of an HTML document, including the head and body sections, and how to create elements with opening and closing tags. Additionally, it covers the use of comments in HTML and provides examples of HTML code for creating a simple webpage.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 15
Introduction to HTML
What is Markup Language
• We can display the text on the Web using markup languages. • As the name suggests, a markup language is used to mark text and define it. • A markup languages provide us with tags to mark the text on the Web. • Some of the most commonly used markup languages are HTML , Extensible Hypertext Markup Language(XHTML). Advantages of HTML • HTML is easy to learn. • HTML can display web pages with a wide range of colours, shapes and objects. • HTML has a fixed number of defined tags. • HTML is completely free to use for creating websites. What is Elements? • HTML elements define the web page just like our body parts define how we look. HTML elements tell browser how to display the web page. • HTML has some predefined elements that define its structure and usages. What does an elements look like? • An elements consists of two tags-an opening tag and a closing tag. • e.g <HTML></HTML> An elements consist of three basic parts:
• <HTML> - Opening HTML tag
• Elements content - some text or other elements. • </HTML> - Closing HTML tag.
Elements are not case sensitive.
HTML Document Structure <html> <head><title>Title goes here</head> <body>Body goes here</body> </html> <html> <head> <title>Page Title</title> </head> <body> Welcome to webpage </body> </html> An HTML Document is mainly divided into two parts: • HEAD: This contains the information about the HTML document. For Example, the Title of the page, version of HTML, Meta Data, etc. • BODY: This contains everything you want to display on the Web Page. • The <html>.....</html> elements tells the browser that this is an HTML documents. • The <head>.....</head> element contains meta information about the HTML page such as author, copyright, keywords and description of what appears on the page. Data stored in the <head> tag is not displayed to the user, it is just written for reference purposes and as a watermark of the owner. • The <title>.....</title> element appears within <head> tag. It gives title of the page that appears on the title bar of the browser . Try to make it titles descriptive but not more than 20 words in length. • The <body>......</body> elements holds all your content: words, pictures, artwork and other elements. Creating a ‘welcome’ Page for our Website <html>
<head> <title> Welcome </title> </head>
<body> Welcome every morning with a smile. </body>
</html> HTML Comment Tag
• You can add comments to your HTML source by using
the following syntax: • <!-- Write your comments here --> • Notice that there is an exclamation point (!) in the start tag, but not in the end tag. Adding Comments • An HTML comment begins with <! –– and the comment closes with ––> . • HTML comments are visible to anyone that views the page source code, but are not rendered when the HTML document is rendered by a browser. <html> <head> <title>HTML comment</title> </head> <body> <!-- This is a single line HTML comment. --> <!-- This is a multiple line HTML comment. This is very useful for me.--> </body> </html> HTML Naming Convention • Page number-11