HTML Tutorial
\(\huge\sf HTML \ Tutorial\)
First let's see what is HTML ?
Every webpage you look at is written in a language called HTML. You can think of HTML as the skeleton that gives every webpage structure.We will learn here how to use HTML for creating a webpage.
\(\large\sf \ How \ to \ create \ a \ HTML \ file?\)
You just need a basic text editor like Notepad to compose the HTML code. After composing HTML code save the file as .html
What would the HTML code be?
Let's see ! \(\bigstar\) The first thing we should do is set up the skeleton of the page. a. Always put <!DOCTYPE html> on the first line. This tells the browser what language it's reading (in this case, HTML). b. Always put <html> on the next line. This starts the HTML document. c. Always put </html> on the last line. This ends the HTML document.
Have u opened ur notepad ?
Type as shown after opening it
Does Microsoft Word work?? :p
Use notepad, it's light and easy. Right click on ur dekstop---->New----->Text document
I suppose u r using windows and not Mac !
Aha!! Never knew that existed! xD
XD
\(\LARGE \sf Basic Terminology\) \(\bigstar\) To learn more HTML, we should learn how to talk about HTML. Already you have seen we use <> a lot \(\bullet\) Things inside <>s are called tags. \(\bullet\) Tags nearly always come in pairs: an opening tag and a closing tag. \(\bullet\) Example of opening tag: <html> \(\bullet\) Example of closing tag: </html> You can think of tags as being like parentheses: whenever you open one, you should close it. Tags also nest, so you should close them in the right order: the most recently opened tag should be the first one closed, like in the example below.
Okay
\(\large \sf \ Task \ Time \)
\(\large \sf \ Create~a~HTML~file\) \(\bullet\) Put in the <!DOCTYPE HTML> tag. \(\bullet\) Put in the <html> opening and closing tags. \(\bullet\) Between the <html> tags, write whatever you like. \(\bullet\) Save the Code as .html and open the file from abrowser to see what you've made
I will upload the screenshots of the steps if u r confused !
Okay, yeah screenshots xD
\(\large \sf Step \ 1\)
\(\large \sf \ Step \ 2\)
\(\large \sf \ Step \ 3\)
Follow Step 1 after opening notepad
After Step 1 Press Ctrl+S and then do as STEP 2
Sorry, got busy :p
\(\hspace{60pt}\huge \sf \ Paragraphs \ in \ the \ body \)
The body is where you put your content, such as text, images, and links. The content in the body is what will be visible on the actual page. The body goes inside the <html> tags, right after the <head> tags, like this:
\(\bullet\) Inside the body, we can create paragraphs. Each paragraph starts with an opening <p> tag and ends with a closing </p> tag. We can write content in between the tags, like this:
\(\hspace{130pt}\large \color{red}{\sf \ Task \ Time}\) \(\bullet\) Underneath the closing </head> tag, put an opening <body> tag and a closing </body> tag, like in the example above. \(\bullet\) Inside the body, create two paragraphs.
\(\hspace{65pt}\huge \sf More \ about \ headings!\) HTML actually lets us have more than one heading size. There are six heading sizes, where <h1> is the boss and <h6> is puny! <h1> - The CEO <h2> - VP <h3> - Director <h4> - Middle management <h5> - Lowly assistant <h6> - Gets coffee for everyone
\(\hspace{80pt}\huge\sf \ Adding \ images\) You can add images to your websites to make them look fancy. We use an image tag, like so: <img>. This tag is a bit different from the others. Instead of putting the content between the tags, you tell the tag where to get the picture using src. It's also different because there is no ending tag. It has / in the tag to close it: <img src="url" />.
Every image on the web has its own image URL. Simply right-click on an image and choose "Copy image URL." Paste that URL in quotes after src= to insert with your <img> tag.
So far, it all makes sense! Awesome! :D
Join our real-time social learning platform and learn together with your friends!