There are many programs with which you can create webpages, even without knowing the HTML language, such as Microsoft FrontPage or Macromedia Dreamweaver.
The text editors are the most basic programs, and the most used for editing the webpage. The advantage is their simplicity, to create a webpage a few of the HTML language's codes are necessary, so the documents are made easily and rapidly, even more it uses very little space and memory sources, but they require knowing the HTML language.
Of the known text editors, the most used are NotePad, and NotePad++, which is also used for this course, but you can use any text editor. For beginners I recommend using Notepad++.
There are general elements that are necessary to create a HTML document.
First open the Notepad and write the basic structure of a web page. This is:
<!DOCTYPE html> <html> <head> <title>Title</title> </head> <body> <h1>Title displayed in page</h1> Content </body> </html>
<!DOCTYPE html> <html> <head> <title>HTML - Free courses and Tutorials</title> </head> <body> <h1>Page title</h1> Lessons, examples and explanations. </body> </html>
- Document properties can be controlled by the attributes of the BODY element, ex: such as colors for page background and text color.
Colors are set by using the basic colors: red, green and blue, the word used is RGB (Red, Green, Blue), they are represented as hexadecimal values and are written betwin quotes (' '), but first you must add the character '#'. Each 2 units of the code represent one of the RGB colors.
For example: #00aa11
is a color that does not have Red (00), has Green (aa) and has less Blue (11).
style
attribute with properties to define the backgound color or image, and the text color.<body>
the attribute style
and the property background-color
with the value of the color you want.<body style='background-color:#0000ff;'>Content</body>
color
property can be added in the style attribute to define the color of the text in page.<body style='background-color:#0000fe; color:#fe0000;'>Content</body>
background-image:url('bgimage.jpg')
property offers the possibility of replacing the webpage's background with an image.<body style='background-image:url('bgimage.jpg');'>Content</body>In this example, the webpage's background will be given by the image in the file 'bgimage.jpg', located in the same folder
<ul> <li>http://coursesweb.net/html/</li> <li>http://coursesweb.net/css/</li> </ul>
.some_class { display: list-item; }
var obj = { "courses": ["php", "javascript", "ajax"] }; var jsonstr = JSON.stringify(obj); alert(jsonstr); // {"courses":["php","javascript","ajax"]}
$strhtml = '<body><div id="dv1">CoursesWeb.net</div></body>'; $dochtml = new DOMDocument(); $dochtml->loadHTML($strhtml); $elm = $dochtml->getElementById("dv1"); echo $elm->nodeValue; // CoursesWeb.net