HTML Tags and Text Formatting
HTML Tags and Text Formatting
b. XHTML
◼ HTML Editors
WYSIWYG editor like FrontPage, Macromedia HomeSite, or Adobe PageMill
To be a skillful Web developer, use a plain text editor!
HTML Tags
◼ HTML tags are used to mark-up HTML elements
<html>
<head>
<title>Title of page: DRS</title>
</head>
<body>
This is my first homepage.
<b>This text is bold</b>
</body>
</html>
General Structure of an HTML File
<html>
<head>
<title>Title of page: DRS</title>
</head>
<body bgcolor="red">
This is my first homepage.
<b>This text is bold</b>
</body>
</html>
HTML Container and Empty Tags
◼ There are two basic types of tags that are used in a
HTML document (web page):
Container tags.
Empty tags
◼ Head Tags
<title>: defines the document title
<base>: defines a base URL for all the links
➢ <base href="http://www.w3schools.com/images/" />
<link>: defines a resource reference
➢ <link rel="stylesheet" type="text/css" href="theme.css" />
<meta>: defines meta information about your page,
such as descriptions and keywords for search engines
and refresh rates
… The <head> tag
metadata is always passed as name/value pairs
<meta name="keywords" content="HTML, DHTML, CSS,
XML, XHTML, JavaScript, VBScript" />
<meta http-equiv="refresh" content="5" />
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1256">
ISO-8859-6 (Arabic)
◼ Paragraphs
Paragraphs are defined with the <p> tag
HTML automatically adds an extra blank line before and after a
paragraph
◼ Line Breaks
The <br> tag is used when you want to end a line, but don't
want to start a new paragraph
◼ Comments in HTML
<!-- This is a comment -->