Basic Introduction HTML & CSS
Now that you have learned all about the web at a high level and you have gotten your computer set up, you are probably ready to write a web page. That is , after all , Wht you bought this lession, you get to create your very first web page, learn about HTML , and learn about the following :
- What HTML is and why you have to se it.
- What you can and connot do when you design HTML pages
- What HTML tags are and how to use them
- How to write pages that conform to the HTML standard
- How you can use cascading Style Sheets to control the look and feel of your pages.
What HTML Is
Take note of just one more thing before you start writing web pages. You Should know what HTML is, what it can do, and most important , What it can't do.
HTML Stands for Hypertext Markup Language. HTML was originally based on the Standard Generalized Markup Language [SGML], a much larger, more complicated document processing system. To write HTML pages , You won't need to know much about SGML. However, knowing that one of the main features of SGML is that it describes the general structure of the content inside document --rather then its actual appearance on the page or onscreen -- does help. This concept might be a bit foreign to you if you are used to working with WYSIWYG editors, so let's go over the information carefully.
HTML Describes the Structure of a Page
HTML , by virtue of ots SGML heritage, is a language for describing the structure of a document, not its actual presentation. The idea here is that most documents have common elements--for example , Titles, Paragraphs, and lists. Beforj you start writing, therefore, you can identify and define the set of element is that document and name them appropriately :- See-
What HTML Files Look Like
Enough theory, it's time to get into writing HTML . HTML document are plain-text files . Which means that they contain no platform- or program-specific information. Any editor that supports text can be used to Create them.
HTML Files contain the following :
- The text of the page itself
- HTML tags that identify page elements, structure, following and hypertext links to other pages or to included media.
Most HTML tage look Something like the following :
<thetagname>Affected Text Word</thetagname>
The tag name itself is enclosed in angle brackerts (< > ). HTML tags generaly have a beginning and an ending tag surrounding the text they affect. The begin-ning tag "turns on" a feature and the ending tag turns it off. Closing tags contain the tag name preceded by a slash ( / ). The opening tag ( for example , <p> for paragraphs) and closing tag ( For example, </p> for paragraphs) compose what is officially called an HTML element.
Open your text editor and tyep the following code. you don't have to understand what any of it means at this point. You'll learn more about much of this in this lesson and the following lesson. This simple expample is just to get you started :
Text Formatting and HTML :
When an HTML page is parsed by a browser, any formatting you might have done with whitespace characters- that is , any extra space, tabs, returns, and so on - is ignored. the only thing that specifies formatting in an HTML page is an HTML tag. If you spend hours carefully editing a plain text file to have nicely formatted paragraphs and columns of numbers but don't include any tags, when a web browser loads the page , all the text will flow into one paragraph. All your work will have been in vain.
The advantage of having all whitespace (spaces, tabs, returns) ignored is the you can put your tags wherever you want. The following examples all produce the same output. Try them!
<h1> Know About Html </h1>
<h1>
Know About HTML </h1>
<h1>
Know About HTML </h1>
HMTL Attributes
HTML element can be modified by attributes , Attributes are placed within the opening tag in an element. Many elements support specialized attributes , and there are also a few global element that can be used with any tag. For example, The ID attribute is used to specify an identifier that uniquely identifies that element on the page. Theas identifiers are used with JavaScript and Cascading Style Sheets. as you'll learn in later lessons. Here ' s what a tag with an attrinute looks like :
<h1 id="thetopheading">Know About HTML</h1>
As you can see , the atteibute is placed within the opening tag. to the right of the tag name , You can also include multiple attributes in a single tag. as follows:
<h1 id="thetopheading" class="First"> Known About HTML</h1>
Using The Style Attribute
The Advance of CSS is that it can be used in various ways. For example, You can put all your styles into a separate file and link to that file form your web pages. That way, if you want to change the appearance an entire site, You can simply edit your CSS file and make changes that span every page that link to your style sheet. Or, If you prefer, you can include style at the top of your page so that they apply only to that page. Style sheets affect the entire page : there's also a way to apply style one tag at a time , using the Style attribute. You can also include style inside the tags themseves using the style attribute.


