HTML docs are simply text files in which extra tags have been added within angle brackets, like this: <head>.
So, for example, the tag <i> tells the Web browser that all the following text should be displayed using an italic font.
And when a </i> is encountered, the preceding slash (/) character tells the browser to disable the italics.
Example:
The <b>fox</b> jumps over the <i>dog</i>.
The result looks like this:
The fox jumps over the dog.
So, for example, the tag <i> tells the Web browser that all the following text should be displayed using an italic font.
And when a </i> is encountered, the preceding slash (/) character tells the browser to disable the italics.
Example:
The <b>fox</b> jumps over the <i>dog</i>.
The result looks like this:
The fox jumps over the dog.
Tag Attributes
Many of the tags either support or require the use of attributes. These are arguments that you pass alongside the tag to provide further information to the web browser.
Generally an attribute consists of an attribute name followed by the = sign and then either single or double quotation marks enclosing a value.
Example (creating a hyperlink):
Using the <a> tag (which stands for anchor), like this:
<a href='http://google.com'>Visit Google</a>
Displays simply as:
Visit Google
Note:-
In HTML tags you can generally use single or double quotation marks interchangeably.
Wherever possible, though, I tend to use single quotes because I don't need to press shift key to type them in.
Also there are sometimes occasions when you need two levels of nested quotes.
Many of the tags either support or require the use of attributes. These are arguments that you pass alongside the tag to provide further information to the web browser.
Generally an attribute consists of an attribute name followed by the = sign and then either single or double quotation marks enclosing a value.
Example (creating a hyperlink):
Using the <a> tag (which stands for anchor), like this:
<a href='http://google.com'>Visit Google</a>
Displays simply as:
Visit Google
Note:-
In HTML tags you can generally use single or double quotation marks interchangeably.
Wherever possible, though, I tend to use single quotes because I don't need to press shift key to type them in.
Also there are sometimes occasions when you need two levels of nested quotes.
The <!DOCTYPE> Declaration
All well-formatted HTML pages begin with a line that tells the browser information about the type of content to expect.
This line consists of the <!DOCTYPE> declaration, along with some arguments if the HTML version is LESS than 5.
All well-formatted HTML pages begin with a line that tells the browser information about the type of content to expect.
This line consists of the <!DOCTYPE> declaration, along with some arguments if the HTML version is LESS than 5.
The <html> Tag
Within a pair of <html> tags, there are generally two other tags used to contain the header and body text of the document.
These are <head> & <body>.
Within a pair of <html> tags, there are generally two other tags used to contain the header and body text of the document.
These are <head> & <body>.