A web page may be used to display various type of information, which may be in form of text, image, multimedia etc. And we need to specify the type of information to displayed in the scripts accordingly. This is where HTML tags come into play. There are specific ways in which information is displayed. And to specify those ways, we have HTML Attributes or Tags. We've already seen the use of tags such as <html> </html>, <body> </body>. All tags, except for a few, have some attributes like background image , color of text etc. associated with them. And almost every tag, in a way, acts more or less like a parenthesis to a block or to faction certain segments of the code. Like in <body> <\body>, anything placed between those two tags form the body of your web page. So, now we'll discuss HTML tags in a little more details. It has already been discussed earlier but let us do that again, but in a bit more detail, 'cause there is no harm in trying good things again and again.
Some Fundamental tags :
1) <!DOCTYPE> - Tells the browser which set of standards your page adheres to.- Lists the standard - Identifies the location of the standard by linking to the URL. There are several standards and mode that can be specified with Doctype such as strict etc. But here we'll stick to just <!Doctype html> to let the browser know that we are using HTML5.
2) <html> </html> - Frames the entire HTML page.
3) <head> </head> - Frames the identification information for the page, such as the title,that is transferred to the browser and search engines.
4) <body> </body> - Frames the content of the page to be displayed in the browserwindow.
5) <title> </title> - Gives the name of the page that will appear at the top of the browser window and be listed in search engines.Is contained within <head> and </head>.
6) <div> </div> - Declares a division within which we can place different objects like table , paragraph , form etc.
So lets build a simple web page :
a) Open notepad and write the following code
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/transitional.dtd">
<html>
<head>
<title>My First HTML Page</title>
</head>
<body>
This is a very basic HTML page.
</body>
</html>
and save the file with extension '.html' , e.g: hotel.html ; and then follow the following steps.
Remember the location (the directory which we have said to remember) where the XAMPP is installed , open it and find a folder "htdocs" and delete the index.html file and copy paste the above saved file "hotel.html" in the htdocs folder , now open the XAMPP control panel and start the Apache module , now open the browser and in the address panel write "localhost" , now you can view all the files in your Apache server, then click you file open to view the Page you created.
(We taught you how to install XAMPP and Apache server in our first tutorial, remember!)
Simillarly there are many tags for various purposes , so download this PDF by clicking on the link below ,
It contains a list of all the tags of html with all their attributes mentioned , and start experimenting with various tags to discover different effects. Just go through the PDF and try to study all tags and their attributes and have fun experimenting and coming up with new things.
Note:
1) An alternative to using the XAMPP module is to save your file as filename.html in almost any folder. Right click on the file and select open with > browser, that could be chrome, firefox etc. (This option is valid only if you're a windows user)
2) if you have stored your HTML file at suppose, C:/Users/You/Documents/filename.html, then you can simply open your browser and type this adress on it's adress bar ;
You'll need to enter this adress - file:///C:/Users/You/Documents/filename.html, and your file will be compiled
That's all for this time, we'll be back with more just in a short time.
Some Fundamental tags :
1) <!DOCTYPE> - Tells the browser which set of standards your page adheres to.- Lists the standard - Identifies the location of the standard by linking to the URL. There are several standards and mode that can be specified with Doctype such as strict etc. But here we'll stick to just <!Doctype html> to let the browser know that we are using HTML5.
2) <html> </html> - Frames the entire HTML page.
3) <head> </head> - Frames the identification information for the page, such as the title,that is transferred to the browser and search engines.
4) <body> </body> - Frames the content of the page to be displayed in the browserwindow.
5) <title> </title> - Gives the name of the page that will appear at the top of the browser window and be listed in search engines.Is contained within <head> and </head>.
6) <div> </div> - Declares a division within which we can place different objects like table , paragraph , form etc.
So lets build a simple web page :
a) Open notepad and write the following code
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/transitional.dtd">
<html>
<head>
<title>My First HTML Page</title>
</head>
<body>
This is a very basic HTML page.
</body>
</html>
and save the file with extension '.html' , e.g: hotel.html ; and then follow the following steps.
Remember the location (the directory which we have said to remember) where the XAMPP is installed , open it and find a folder "htdocs" and delete the index.html file and copy paste the above saved file "hotel.html" in the htdocs folder , now open the XAMPP control panel and start the Apache module , now open the browser and in the address panel write "localhost" , now you can view all the files in your Apache server, then click you file open to view the Page you created.
(We taught you how to install XAMPP and Apache server in our first tutorial, remember!)
Simillarly there are many tags for various purposes , so download this PDF by clicking on the link below ,
It contains a list of all the tags of html with all their attributes mentioned , and start experimenting with various tags to discover different effects. Just go through the PDF and try to study all tags and their attributes and have fun experimenting and coming up with new things.
Note:
1) An alternative to using the XAMPP module is to save your file as filename.html in almost any folder. Right click on the file and select open with > browser, that could be chrome, firefox etc. (This option is valid only if you're a windows user)
2) if you have stored your HTML file at suppose, C:/Users/You/Documents/filename.html, then you can simply open your browser and type this adress on it's adress bar ;
You'll need to enter this adress - file:///C:/Users/You/Documents/filename.html, and your file will be compiled
That's all for this time, we'll be back with more just in a short time.
No comments:
Post a Comment