8 replies [Last post]
gautamz07
gautamz07's picture
Offline
Enthusiast
Last seen: 6 years 10 weeks ago
Timezone: GMT+5.5
Joined: 2014-04-24
Posts: 265
Points: 403

Hey guys , is this HTML semantic or not ???

				<h1>We are your neighbourhood wellness club in lala- land </h1>
 
				<h4>Please leave us a message and we will get back to you as soon as possible.</h4>
 
				<h4>Lorem Ipsum</h4>
 
				<p><span>Entry Hours: </span>Mon-Sun: 5:30am-11:00pm</p>
 
				<p><span>Staffed Hours: </span>Mon-Thur 10am-8pm, Fri: 10am-7pm, Sat-Sun: 10am-5pm</p>
 
				<p>(080) - 567 567</p>  

Thanks .

Gautam.

//mod edit: Did you forget how to tag your source code for the forum? Fixed. ~gt

gary.turner
gary.turner's picture
Offline
Moderator
Dallas
Last seen: 1 year 39 weeks ago
Dallas
Timezone: GMT-6
Joined: 2004-06-25
Posts: 9776
Points: 3858

In a word?

No! It appears to be tagged based on the desired appearance, instead of what the element is. It's a ridiculously incompetent example of coding.

cheers,

gary

If your web page is as clever as you can make it, it's probably too clever for you to debug or maintain.

gautamz07
gautamz07's picture
Offline
Enthusiast
Last seen: 6 years 10 weeks ago
Timezone: GMT+5.5
Joined: 2014-04-24
Posts: 265
Points: 403

any other combination

any other combination of tags tat you'd suggest ??

gary.turner
gary.turner's picture
Offline
Moderator
Dallas
Last seen: 1 year 39 weeks ago
Dallas
Timezone: GMT-6
Joined: 2004-06-25
Posts: 9776
Points: 3858

Having to guess at a possible structure

<!DOCTYPE HTML>
<html>
  <head>
    <meta http-equiv="Content-Type"
          content="text/html; charset=utf-8">
    <title>
      Test document
    </title>
    <style type="text/css">
/*<![CDATA[*/
 
 
    /*]]>*/
    </style>
  </head>
  <body>
    <hr>
 
    <p>
      We are your neighbourhood wellness club in lala- land
    </p>
 
    <p>
      Please leave us a message and we will get back to you as soon
      as possible.
    </p>
 
    <p>
      Lorem Ipsum
    </p>
 
    <dl>
      <dt>
        Entry Hours:
      </dt>
 
      <dd>
        Mon-Sun: 5:30am-11:00pm.
      </dd>
 
      <dt>
        Staffed Hours:
      </dt>
 
      <dd>
        Mon-Thur 10am-8pm,
      </dd>
 
      <dd>
        Fri: 10am-7pm,
      </dd>
 
      <dd>
        Sat-Sun: 10am-5pm.
      </dd>
    </dl>
 
    <p id="pho">
      tel. (080) - 567 567
    </p>
  </body>
</html>

The HR is used to indicate a new topic or section that doesn't rate a heading element. If you use a heading (at the proper structural level, you can remove the rule. You can hide the HR with hr { display:  none;}, but don't simply remove it; assistive technologies use it like a heading to indicate a sectional change.

cheers,

gary

If your web page is as clever as you can make it, it's probably too clever for you to debug or maintain.

gautamz07
gautamz07's picture
Offline
Enthusiast
Last seen: 6 years 10 weeks ago
Timezone: GMT+5.5
Joined: 2014-04-24
Posts: 265
Points: 403

considering ....

Thanks gary , one more question though , considering i would want all that to look like this .

would you still suggest the same markup ?

gary.turner
gary.turner's picture
Offline
Moderator
Dallas
Last seen: 1 year 39 weeks ago
Dallas
Timezone: GMT-6
Joined: 2004-06-25
Posts: 9776
Points: 3858

Of course

You do not base your markup on how you want it to look. That's CSS's job.

If that's your whole page, maybe that top line could be an H1. It looks more like a footer to me. However, the line does not introduce the topic and really has nothing to do with the hours.

g

If your web page is as clever as you can make it, it's probably too clever for you to debug or maintain.

gautamz07
gautamz07's picture
Offline
Enthusiast
Last seen: 6 years 10 weeks ago
Timezone: GMT+5.5
Joined: 2014-04-24
Posts: 265
Points: 403

Thank you.

TY , just out of curiosity, is there any document that speaks of "when" to use a perticular tag ??

gary.turner
gary.turner's picture
Offline
Moderator
Dallas
Last seen: 1 year 39 weeks ago
Dallas
Timezone: GMT-6
Joined: 2004-06-25
Posts: 9776
Points: 3858

It ain't always easy

Check out https://developer.mozilla.org/en-US/docs/Web/HTML

Ultimately, all content is text. That implies the basic structural element is the paragraph, <p>. The structural definition of a paragraph is a brief composition complete in one typographical section or paragraph; an item, remark, or quotation. All other tags are simply more specific markers.

The div and span tags are use to aggregate a group of block elements or segregate an inline element respectively to provide hooks for css or DOM scripting.

cheers,

gary

If your web page is as clever as you can make it, it's probably too clever for you to debug or maintain.

gautamz07
gautamz07's picture
Offline
Enthusiast
Last seen: 6 years 10 weeks ago
Timezone: GMT+5.5
Joined: 2014-04-24
Posts: 265
Points: 403

@gary

Thanks for your very insightful comment .

hv a nice dy.