Lets get started
What is needed?
But I am using Adobe Dreamweaver.
1. Edit your HTML with Notepad/Adobe Dreamweaver
Type your HTML code into your editor(notepad/dreamweaver)
<!DOCTYPE html> <html> <body> <h1>My first heading</h1> <p>My first paragraph</p> </body> </html>
2. Save your HTML
Select save as.. in notepad /dreamweaver file menu.
When you save an HTML file, you can use either the .htm or the .html file extension. There is no difference, it is entirely up to you.
Save the file in a folder that is easy to remember, like HTMl TUTS.
3. Run the HTML in your browser
Open your HTML TUTS folder and right click on html page and open with your favourite browser.
The result should look much like this:
The first line on the top, <!DOCTYPE html>, is a document type declaration and browser know which flavor of HTML you are using(HTML 5, in this case).
The >!DOCTYPE> declaration must be the very first thing in your HTML Document, before the <html> tag.
The <!DOCTYPE> declaration is not and HTML tag; it is an instruction to the web browser about what version of HTML page is written in.
Common DOCTYPE Declarations
<!DOCTYPE html> HTML 4.01 Strict This DTD contains all HTML elements and attributes, but does NOT INCLUDE presentational or deprecated elements (like font). Framesets are not allowed.
HTML 4.01 Transitional
This DTD contains all HTML elements and attributes, INCLUDING presentational and deprecated elements (like font). Framesets are not allowed.
HTML 4.01 Frameset
This DTD is equal to HTML 4.01 Transitional, but allows the use of frameset content.
XHTML 1.0 Strict
This DTD contains all HTML elements and attributes, but does NOT INCLUDE presentational or deprecated elements (like font). Framesets are not allowed. The markup must also be written as well-formed XML.
XHTML 1.0 Transitional
This DTD contains all HTML elements and attributes, INCLUDING presentational and deprecated elements (like font). Framesets are not allowed. The markup must also be written as well-formed XML.
XHTML 1.0 Frameset
This DTD is equal to XHTML 1.0 Transitional, but allows the use of frameset content.
XHTML 1.1
This DTD is equal to XHTML 1.0 Strict, but allows you to add modules (for example to provide ruby support for East-Asian languages).
To get back to the point, <html> is the opening tag that kicks things off and tells the browser that everything between that and the </html> closing tag is an HTML document. The stuff between <body> and </body> is the main content of the document that will appear in the browser window.
What is needed?
- Web Browser like (internet explorer, Mozilla firefox, google chrome etc).
It is not important which browser you use. The most common is Microsoft Internet Explorer.
- HTML Editor
- Adobe Dreamweaver
- Notepad
- Notepad ++
If you are using Windows you can use Notepad, which is usually found in the start menu under Programs in Accessories.
But I am using Adobe Dreamweaver.
1. Edit your HTML with Notepad/Adobe Dreamweaver
Type your HTML code into your editor(notepad/dreamweaver)
<!DOCTYPE html> <html> <body> <h1>My first heading</h1> <p>My first paragraph</p> </body> </html>
2. Save your HTML
Select save as.. in notepad /dreamweaver file menu.
When you save an HTML file, you can use either the .htm or the .html file extension. There is no difference, it is entirely up to you.
Save the file in a folder that is easy to remember, like HTMl TUTS.
3. Run the HTML in your browser
Open your HTML TUTS folder and right click on html page and open with your favourite browser.
The result should look much like this:
Common DOCTYPE Declarations
<!DOCTYPE html> HTML 4.01 Strict This DTD contains all HTML elements and attributes, but does NOT INCLUDE presentational or deprecated elements (like font). Framesets are not allowed.
| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> |
| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd"> |
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> |
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd"> |
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> |


0 comments:
Post a Comment