CQ Forums
WELCOME TO THE CQ FORUMS!
We are a growing community of 34 users.
If you are a returning user, log in to join the discussions. If you are new, please register to get started.


Give a warm welcome to... yeaimalright!
 
HomeCommunityFAQMemberlistLog inRegister
Top posters
Superfoo
 
Starshade
 
Rainbow Dash
 
Goofy
 
wizardhunter
 
Spock
 
Telepath
 
TheLittlePurrmaid
 
TristenJenkins
 
shagohod
 
December 2017
SunMonTueWedThuFriSat
     12
3456789
10111213141516
17181920212223
24252627282930
31      
CalendarCalendar

Share | 
 

 HTML Basics - Lesson One

View previous topic View next topic Go down 
AuthorMessage
Starshade
Codemeister
avatar

Posts : 430
Join date : 2013-10-21
Location : Hoenn

PostSubject: HTML Basics - Lesson One   Sun Mar 16, 2014 9:05 pm

Okay; lesson one.  Always a good place to begin.
The first thing you're going to need in any HTML document is the opening and closing tags.

Code:
<!DOCTYPE html>
     <!-- This is where your code would go -->
</html>

Each of the items enclosed inside < and > is called a tag.  On line one is what's called an opening tag.  Don't worry too much about what it all means, just know that it tells the computer that everything between it and the closing tag (at the very end) is HTML code.  A couple things to remember: closing tags always have the / at the beginning, to let the computer know that it is the end of a block of code.  In addition, just because all of the opening tags I've used so far have a ! at the beginning doesn't mean that all opening tags do.  In fact, most opening tags just begin with a word.  Here's an example:

Code:
<head>
     <title>Starshade's HTML Classroom</title>
</head>

Lines one and three have the head tag, which tells the computer that this is the head, meaning it doesn't display on the actual website.  See line two?  That's a title tag, which tells the computer the title of the webpage.  For example, when you type in "cqsuperfoo.forumotion.com" into your web browser, the title you get is "CQ Forum - Community".  If you opened up the HTML document above, the title would show up as "Starshade's HTML Classroom".  Of course, usually you'll want the text to appear on the actual webpage, not in the status bar.  For that, you'd use the heading tags.

Code:
<body>
     <h1>Starshade's HTML Classroom</h1>
</body>

Remember the head tags for the title?  Well, body tags like the ones above show the computer that the code inside goes on the actual website.  You can replace the number 1 in the heading tag to change the size of the heading.  A larger number means a smaller size.  This is useful for, say, outlines, marking the different sections.

Now that you have headings, you're going to want regular text on your page.  The basic way to add text to a webpage is the paragraph tag.  Remember to put this code inside of a body tag.

Code:
<p>The paragraph tag adds text</p>

So, there you have it.  The very (read: extremely) bare basics of HTML.  Just to recap, I'm putting another thread in my classroom which will contain a template for an HTML document, using all of the stuff in this lesson with proper syntax.


Last edited by Starshade on Fri May 30, 2014 9:00 pm; edited 6 times in total (Reason for editing : End of Lesson One! Finally!)
Back to top Go down
http://console-dot-log.forumotions.com
 

HTML Basics - Lesson One

View previous topic View next topic Back to top 
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
CQ Forums :: CQ University :: Classrooms :: HTML Basics-