English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I have noticed some sites have something different in their HTML code. For example, instead of using just
they use


What is the difference between the 2? They both seem to get the same result.

2006-12-14 05:44:39 · 6 answers · asked by Yoi_55 7 in Computers & Internet Programming & Design

6 answers

Traditional HTML pages can be sloppily written - browsers (Mozilla Firefox, Netscape Navigator, Opera, and even Microsoft Internet Explorer) will make every effort to render (draw to the screen) pages correctly. Sometimes this 'looks ok in x browser', however, there could be deviations from a standard, which may render incorrectly in future browsers and operating systems and even in devices such as mobile phones and PDAs.

An example of sloppily written HTML is the overlapping tags syndrome - where a bit of code is overlapping another bit of code. HTML code can be thought of in the same way as a Tupperware container. Each container has a lid. In order to close it, you put the lid on the container. You can put one container inside another container. If you pile them up, container, then container, then lid then lid, neither container is actually closed, and the contents will leak out. Bold text can be coded in html as: bold text - italic text can be coded in html as: italic text, if you want bold and italic, use bold italic text, not bold italic text. (Developers now prefer the strong tag instead of the bold tag, and elitists will say use css classes instead, but this is another topic.)

The
tag is like having a Tupperware container with no lid. The br tag, by definition cannot have any contents, and must have a lid. This is a sort-of catch-22, as there is no lid "
" is illegal in the XHTML standard. So, we include the lid WITH the container by adding a trailing slash -
, meaning that it is basically a welded shut Tupperware container. (The 'meta' tag is similar)

Unfortunately, Internet Explorer doesn't recognize the
tag, and ignores it in some cases. If we put a space between the br and the /, then ie always recognizes it, so we get
.

2006-12-14 06:04:49 · answer #1 · answered by Monkeyman 3 · 2 0

the simple answer is there is no difference in both the tags..
for example if u use a

tag, after writing what ever u want in between the

tag u will have to close it with a

tag...

but tags such as
does not need to be closed...so they can either be written as
or
..

In HTML the
tag has no end tag.

In XHTML the
tag must be properly closed, like this:
.

2006-12-14 06:06:35 · answer #2 · answered by Anonymous · 1 0

There are different html standards.

Currently we are on Version 4.0 for html

There is also XHTML, which you will see as transitional or strict.

XHTML is similar to html, but is much more rigid. it requires
the slash before the close of any 1 part tag. for example:

click me

now with a 1 part tag:



you add the slash so the browser knows there isn't a second part that encompasses anything.

What is HTML?


HTML is the lingua franca for publishing hypertext on the World
Wide Web. It is a non-proprietary format based upon SGML, and can be created
and processed by a wide range of tools, from simple plain text editors - you
type it in from scratch- to sophisticated WYSIWYG authoring tools. HTML
uses tags such as

and

to
structure text into headings, paragraphs, lists, hypertext links etc. Here is
a 10-minute guide for newcomers to HTML. W3C's statement
of direction for HTML is given on the HTML Activity
Statement. See also the page on our work on the next
generation of Web forms, and the section on Web
history.


What is XHTML?


The Extensible HyperText Markup Language (XHTML™) is a family of current
and future document types and modules that reproduce, subset, and extend
HTML, reformulated in XML. XHTML Family document types
are all XML-based, and ultimately are designed to work in conjunction with
XML-based user agents. XHTML is the successor of HTML, and a series of specifications has been developed for
XHTML. See also: HTML and XHTML Frequently Answered
Questions

2006-12-14 06:01:44 · answer #3 · answered by Bradford K 4 · 2 0

HTML stands for Hyper textual content Markup Language An HTML record is a textual content record containing small markup tags The markup tags tell the web browser a thanks to exhibit the web page An HTML record must have an htm or html record extension An HTML record ought to nicely be created utilizing an basic textual content editor

2016-11-26 19:20:34 · answer #4 · answered by rosenstock 4 · 0 0

Basically there are few tags in HTML which doesn't needs to be closed. So in those cases you can use
tags. Basically it means

. It is a convention in XML to declare a tag and which doesn't contain any attrib in that. Like or is same.

2006-12-14 05:56:00 · answer #5 · answered by sushil 2 · 1 0

Good question.
I've use
tags only in NQL and some other website. Other than that it's always been
for me.

2006-12-14 05:48:59 · answer #6 · answered by Fez 3 · 0 0

fedest.com, questions and answers