[Show all top banners]

metalgal
Replies to this thread:

More by metalgal
What people are reading
Subscribers
Subscribers
[Total Subscribers 2]

MaEkBalak

Smaran
:: Subscribe
Back to: Computer/IT Refresh page to view new replies
 code
[VIEWED 7894 TIMES]
SAVE! for ease of future access.
Posted on 06-11-11 11:12 PM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

how make own code website and where to learn ?
 
Posted on 06-12-11 9:11 AM     [Snapshot: 111]     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

For basic start i would not go in all  the process involved in web development as you might get confused. So, for now start with at the very basic.

Open Notepad.

Type the code which is in RED color only.

and save it as "yourfilename.html". remember to add the extension .html at the end of the file.

Go to the location and open the file in your browser(chorme, firefox or IE). and you will see the output. 




<html>

<head>

<title>My First Web Page</title>

</head>

<body>

Hello World !

<h1>Metal Girl</h1>

<br/>

<b>Metal girl</b>

<p>Metal girl Metal girl Metal girl Metal girl Metal girl Metal girl
Metal girl Metal girl Metal girl Metal girl Metal girl Metal girl
Metal girl Metal girl Metal girl Metal girl Metal girl Metal girl
Metal girl Metal girl Metal girl Metal girl Metal girl Metal girl
</p>



<p>Metal girl Metal girl Metal girl Metal girl Metal girl Metal girl
Metal girl Metal girl Metal girl Metal girl Metal girl Metal girl
Metal girl Metal girl Metal girl Metal girl Metal girl Metal girl
Metal girl Metal girl Metal girl Metal girl Metal girl Metal girl
</p>

<font color="red">I am Red</font>

</body>

</html>





Explanation:

Congrats, you just created your first web page

So what is happening here now? All of the code you just wrote is called HTML (Hypertext Markup Language).

The code starts with less than < and greater than > sign are html elements. in above example Html, head, title, body, p all are
elements. 

Each elements should have an ending element.  The less than sign and a slash (</) denotes the ending of an element.

so that means if you have a element called <html> it must be closed like this </html> . so is true for all elements.

Why doesn't <br/> have and ending element?
Because these elements are empty elements. Empty elements are closed on the same tag. These elements doesn't contain
any content within them. Here <br/> means a line break.  If you want to have content inside the element then it must have a starting and ending tag.

Similary font is also an element. It can contain content inside it.  the "color" inside the font element is called attribute. Each element
can have several attributes which will add an extra behaivor for that element . To make you understand this, i wll take an example of
our real world. A car is an automobile. However, each car would have a specific attribute, like its color or the numbe of door. SImilary an element can have several attributes which would add an extra behavior for that element.

If you haven't fell asleep so far, read on

<h1> means a header and it can be h2, h2 ,h4 and i think its up to h7. I don't use this element much so not sure about it. You go ahead and try it.

<br/> as stated earlier adds a line break.

<b> make the content bold.

<P> dentotes a start of a paragraph.

<font> can be used to define the font, size color of content.

<title> would define the title of the web page. Look at the top bar of your browser

What <html><head> and <body Does?

If i explain it right now, you would hate me so for now, the short answer, is  "it doesn't do anything". Then why i have to write an extra code? Because these are the standards of web page. Take it like this way, you can't make a roof without making the pillar first? can you?

Just remember few rules.

1. Every element should be contained inside the body element. 
2. The body element itself should be wrapped inside the html element.
3. The title element should inside in the head element and head should be closed before the body element starts. remember head element should contained inside the html element. 

Here is a basic structure

<html> 
<head>
<title></title>
</head>
<body>
</body>
</html>


I am done with the above code? what now?

go to this web page 

www.w3schools.com/html/

To your left side there is  a section called "html basics" which defines almost every element, their attributes. Take look on those
elements and use it in your page. The" notepad file"(you can't change it in browser)  and make sure everything is inside the body element.  if you don't know how to use some elements leave that for now, and go with the another one..

when you have good grasp of html, bump this thread again and i will try my best to explain more.


GOOD LUCK





 

 
Posted on 06-12-11 12:50 PM     [Snapshot: 160]     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

@Metalgal
Your question is not so clear. It's not clear, what exactly you are trying to acheive.
Are you trying to develop just a regular website or a website where you can post your code?
Following are some guidelines to get started, from what I know about web programming -

1. You must know some - HTML (XHMTL), CSS, and Javascript. If you are really a beginner then I suggest you go to http://www.w3schools.com, and learn about these. These are the stuffs that are delivered to the client machine.
On the client machine, bowser loads the HTML and renders your page.
Javascript is the part of your program that runs on the browser. Mostly, you will be writing javascript functions, that are either called by some other javascript functions or by the browser when some events occur on your page (e.g. click event...).
CSS is used to apply styles to your HTML elements. e.g. <div>, <p>, ... are the HTML elements and you use CSS to apply styles like color, backgroundcolor, font-size, etc. etc. to those elements.

2. What language are you planning to use for server-side programming? It can be PHP, J2EE, etc. These are the tools that are specially designed to ease your web programming tasks. You use one of these to write your program that runs on the server machine. If you know nothing about programming then these can be really hard to understand and learn. But if you have done some programming (like desktop application programming), then you should be good to get started. E.g. if you have done some Java then you can go with J2EE.

And following are some points to remember, that might help you while you are learning web programming (if you are really serious about it) -
1. In the context of web application, there are always two machines involved. Client and Server. It's good to know, what runs on the server and what on client.
2. Request, Response and Session. These are really important terms when we are talking about web applications. The more familiar you are with these terms the easier it will be for you to learn other advanced stuffs. These the very basic, but kind of like foundational stuffs, other advanced stuffs are build around them.

These are some basic and very general ideas about web programming. But if you keep these things in mind then it might keep you from being lost while you are learning.

Best of luck.

For others who are reading this, these came right off the top of my head, if you find any mistakes then please point them out and put your suggestions, it will helpful for me and everybody else trying to learn.

Thanks.
 


Please Log in! to be able to reply! If you don't have a login, please register here.

YOU CAN ALSO



IN ORDER TO POST!




Within last 60 days
Recommended Popular Threads Controvertial Threads
TPS Re-registration case still pending ..
Toilet paper or water?
ढ्याउ गर्दा दसैँको खसी गनाउच
Tourist Visa - Seeking Suggestions and Guidance
To Sajha admin
From Trump “I will revoke TPS, and deport them back to their country.”
I hope all the fake Nepali refugee get deported
wanna be ruled by stupid or an Idiot ?
MAGA denaturalization proposal!!
advanced parole
and it begins - on Day 1 Trump will begin operations to deport millions of undocumented immigrants
How to Retrieve a Copy of Domestic Violence Complaint???
Travel Document for TPS (approved)
All the Qatar ailines from Nepal canceled to USA
MAGA and all how do you feel about Trumps cabinet pick?
Those who are in TPS, what’s your backup plan?
MAGA मार्का कुरा पढेर दिमाग नखपाउनुस !
NOTE: The opinions here represent the opinions of the individual posters, and not of Sajha.com. It is not possible for sajha.com to monitor all the postings, since sajha.com merely seeks to provide a cyber location for discussing ideas and concerns related to Nepal and the Nepalis. Please send an email to admin@sajha.com using a valid email address if you want any posting to be considered for deletion. Your request will be handled on a one to one basis. Sajha.com is a service please don't abuse it. - Thanks.

Sajha.com Privacy Policy

Like us in Facebook!

↑ Back to Top
free counters