0% found this document useful (0 votes)
5 views3 pages

Understanding HTML Basics and Tags

HTML is the code that defines the structure and layout of web pages. It uses tags to indicate elements like headings, paragraphs, images, and links. The simplest HTML page has an opening and closing <html> tag with <head> and <body> sections, and some text between opening and closing <p> tags. Comments in HTML start with <!--- and end with -->, and cannot contain - or > characters. Links allow clicking to jump between pages, defined with <a> tags. Tables can be nested by embedding one table inside a cell of another, though this has compatibility issues with older browsers.

Uploaded by

Lakshmi Pujari
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as RTF, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views3 pages

Understanding HTML Basics and Tags

HTML is the code that defines the structure and layout of web pages. It uses tags to indicate elements like headings, paragraphs, images, and links. The simplest HTML page has an opening and closing <html> tag with <head> and <body> sections, and some text between opening and closing <p> tags. Comments in HTML start with <!--- and end with -->, and cannot contain - or > characters. Links allow clicking to jump between pages, defined with <a> tags. Tables can be nested by embedding one table inside a cell of another, though this has compatibility issues with older browsers.

Uploaded by

Lakshmi Pujari
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as RTF, PDF, TXT or read online on Scribd

What is HTML?

Answer1:
HTML, or HyperText Markup Language, is a Universal language which allows an
individual using special code to create web pages to be viewed on the nternet!
Answer":
HTML # H yper T ext M arkup L anguage$ is the language used to write %eb pages! &ou
are looking at a %eb page right now!
&ou can view HTML pages in two ways:
' (ne view is their appearance on a %eb browser, )ust like this page ** colors, di++erent
text si,es, graphics!
' The other view is called -HTML .ode- ** this is the code that tells the browser what to
do!
What is a tag?
n HTML, a tag tells the browser what to do! %hen you write an HTML page, you enter
tags +or /any reasons ** to change the appearance o+ text, to show a graphic, or to /ake a
link to another page!
What is the simplest HTML page?
HTML .ode:
0HTML1
0H2A31
0TTL21This is /y page title4 05TTL21
05H2A31
06(3&1
This is /y /essage to the world4
056(3&1
05HTML1
6rowser 3isplay:
This is /y /essage to the world4
How do I create frames? What is a frameset?
7ra/es allow an author to divide a browser window into /ultiple #rectangular$ regions!
Multiple docu/ents can be displayed in a single window, each within its own +ra/e!
8raphical browsers allow these +ra/es to be scrolled independently o+ each other, and
links can update the docu/ent displayed in one +ra/e without a++ecting the others!
&ou can9t )ust -add +ra/es- to an existing docu/ent! :ather, you /ust create a +ra/eset
docu/ent that de+ines a particular co/bination o+ +ra/es, and then display your content
docu/ents inside those +ra/es! The +ra/eset docu/ent should also include alternative
non*+ra/ed content in a ;(7:AM2< ele/ent!
The HTML = +ra/es /odel has signi+icant design +laws that cause usability proble/s +or
web users! 7ra/es should be used only with great care!
How can I include comments in HTML?
Technically, since HTML is an <8ML application, HTML uses <8ML co//ent syntax!
However, the +ull syntax is co/plex, and browsers don9t support it in its entirety anyway!
There+ore, use the +ollowing si/pli+ied rule to create HTML co//ents that both have
valid syntax and work in browsers:
An HTML co//ent begins with -04**-, ends with -**1-, and does not contain -**- or -1-
anywhere in the co//ent!
The +ollowing are exa/ples o+ HTML co//ents:
' 04** This is a co//ent! **1
' 04** This is another co//ent,
and it continues onto a second line! **1
' 04****1
3o not put co//ents inside tags #i!e!, between -0- and -1-$ in HTML /arkup!
What is a Hypertext link?
A hypertext link is a special tag that links one page to another page or resource! + you
click the link, the browser )u/ps to the link9s destination!
How comfortable are you with writing HTML entirely by hand?
>ery! don?t usually use %&<%&8! The only occasions when do use 3rea/weaver
are when want to draw so/ething to see what it looks like, and then ?ll usually either
take that design and hand*/odi+y it or build it all over again +ro/ scratch in code! have
actually written /y own desktop HTML 32 +or %indows #it?s called Less Than <lash$
with the intention o+ deploying it +or use in web develop/ent training! + has built*in
re+erence +eatures, and will autoco/plete code by parsing the 3T3 you speci+y in the
+ile! That is to say, the progra/ doesn?t know anything about HTML until a+ter it parses
the HTML 3T3 you speci+ied! This should give you so/e idea o+ /y skill level with
HTML!
What is everyone using to write HTML?
2veryone has a di++erent pre+erence +or which tool works best +or the/! @eep in /ind
that typically the less HTML the tool reAuires you to know, the worse the output o+ the
HTML! n other words, you can always do it better by hand i+ you take the ti/e to learn a
little HTML!
What is a !"T#$%? Which one do I use?
According to HTML standards, each HTML docu/ent begins with a 3(.T&B2
declaration that speci+ies which version o+ HTML the docu/ent uses! (riginally, the
3(.T&B2 declaration was used only by <8ML*based tools like HTML validators,
which needed to deter/ine which version o+ HTML a docu/ent used #or clai/ed to use$!
Today, /any browsers use the docu/ent9s 3(.T&B2 declaration to deter/ine whether
to use a stricter, /ore standards*oriented layout /ode, or to use a -Auirks- layout /ode
that atte/pts to e/ulate older, buggy browsers!
"an I nest tables within tables?
&es, a table can be e/bedded inside a cell in another table! Here9s a si/ple exa/ple:
0table1
0tr1
0td1this is the +irst cell o+ the outer table05td1
0td1this is the second cell o+ the outer table,
with the inner table e/bedded in it
0table1
0tr1
0td1this is the +irst cell o+ the inner table05td1
0td1this is the second cell o+ the inner table05td1
05tr1
05table1
05td1
05tr1
05table1
The /ain caveat about nested tables is that older versions o+ ;etscape ;avigator have
proble/s with the/ i+ you don9t explicitly close your T:, T3, and TH ele/ents! To avoid
proble/s, include every 05tr1, 05td1, and 05th1 tag, even though the HTML
speci+ications don9t reAuire the/! Also, older versions o+ ;etscape ;avigator have
proble/s with tables that are nested extre/ely deeply #e!g!, tables nested ten deep$! To
avoid proble/s, avoid nesting tables /ore than a +ew deep! &ou /ay be able to use the
:(%<BA; and .(L<BA; attributes to /ini/i,e table nesting! 7inally, be especially
sure to validate your /arkup whenever you use nested tables

You might also like