473,402 Members | 2,072 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,402 software developers and data experts.

Old XHTML to new XHTML/CSS: Paragraph line?

one
Cutting out the <br>s.. Anyone who has a semantic/browser problem with
this conversion? Thanks.

<style>
p.line {margin: 0em;}
</style>

<!-- From -->
<p>text text<br />text text</p>

<!-- To -->
<p class="line">text text</p><p class="line">text text</p>
http://jaspoid.com/blogtests/p-line

Jan 17 '07 #1
5 2329

on*@jaspoid.com wrote:
Cutting out the <br>s..
Why? If they're really embedded linebreaks, then leave them as
linebreaks and <br>. If you mean "show my very short text snippets
without margins, but still mark them up as paragraphs" then it's fine.

You _might_ start a religious war over in alt.usage.english as to
whether a "snippet" can be a true paragraph, but that's sufficiently
unclear and arguable that it would eb wrong to make dogmatic HTML
coding decisions against it.

p.line {margin: 0em;}
I'd use margin-top and margin-bottom here, so as to leave the side
margins unchanged.

You also don't need units on 0
XHTML is a total red herring here. For entirely other reasons it's best
avoided anyway.

Jan 17 '07 #2
<on*@jaspoid.comwrote:
<style>
p.line {margin: 0em;}
</style>

<!-- From -->
<p>text text<br />text text</p>

<!-- To -->
<p class="line">text text</p><p class="line">text text</p>
It looks similar to what I'm considering doing for marking up poetry,
except I'd use a DIV rather than a P. Semantically, a line of poetry (or
whatever) isn't really a "paragraph", but a DIV can be anything. Also, the
default presentation of the DIVs is closer to the desired presentation.
--
Darin McGrew, mc****@stanfordalumni.org, http://www.rahul.net/mcgrew/
Web Design Group, da***@htmlhelp.com, http://www.HTMLHelp.com/

"FAILURE IS NOT AN OPTION. It comes bundled with the software."
Jan 17 '07 #3
Thanks, guys! You're both, sort of, onto something.

The reason I'm pondering on this is that I'm building conversion
software for weblogs. From poor, non-standards XHTML to cutting edge,
contemporary XHTML that will probably be converted further into XHTML
2.0 when that becomes a W3C Recommendation.

Two additional reasons I want to move from <brto
<element></element><element></elementare:

1. I wan't true markup so that one can manipulate the stylesheets and
make effect without touching the HTML. You can't style a <p><BR></p>
although it consists of two elements - that is, lines.

2. I don't wan't hacky </empty tags in the documents for cleansity.

3. Call me picky :)

Anyway, Darin, I think you're probably right. If I can't make the
distinction between (context-changing) paragraph and line I will
probably go with that too - until XHTML 2.0, with <lline element,
becomes a W3C Recommendation:

http://www.w3.org/TR/xhtml2/mod-text.html#sec_9.7

Jan 17 '07 #4

Daniel Gr wrote:
1. I wan't true markup so that one can manipulate the stylesheets and
make effect without touching the HTML. You can't style a <p><BR></p>
although it consists of two elements - that is, lines.
You can style it, you just can't style it with existing CSS selectors.

You could also try this, which is as CSS-able as you could wish.

<p>
<span id="line-1" >...</span>
<br />
<span id="line-2" >...</span>
</p>

I think this is probably the best for what you want, although it's
horribly mechanical in how it presents structured text as no more than
a crude list of lines.
<div>
<div id="line-1" >...</div>
<div id="line-2" >...</div>
</div>

Really the best option is to apply an additional annotation mechanism
_over_ the expressed document through something like XPointer or a
development of it. This avoids the problem of intermeshing nested
elements from two unrelated purposes.

2. I don't wan't hacky </empty tags in the documents for cleansity.
Empty tags aren't hacky, mixed content models are hacky.

Jan 17 '07 #5
Thank you. I've gotten what I wanted to hear now. Just have to make up
my own mind now.

Jan 19 '07 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: mike | last post by:
regards: I use Jtidy (api) to translate a HTML file into a "XHTML file". But The "XHTML file" cannot be identified by nokia 6600. Do I miss something important? Or this is Jtidy's weakness or...
23
by: Mikko Ohtamaa | last post by:
From XML specification: The representation of an empty element is either a start-tag immediately followed by an end-tag, or an empty-element tag. (This means that <foo></foo> is equal to...
17
by: Bruce W...1 | last post by:
I don't seem to be getting anywhere with trying to make my web page transitional XHTML. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"...
9
by: aragon | last post by:
Hi all, is it legal to use a fully-numeric string as "name" attribute for the <select> tag in the XHTML standard? E.g.: <form action="action.php" method="get"> <select name="12345"> <option...
11
by: Michael Kalina | last post by:
Hi everybody! Can the honoured readers of this newsgroup maybe help me with my xhtml-skills. The only thing I would like to have, is some feedback on my coding style on my website, which you can...
11
by: Tomek Toczyski | last post by:
What is the best way to attach a caption to an image in xhtml? I can attach a caption to a table by a "<caption>" tag but I would like to do sth similar to an image. How to do it in a natural...
22
by: Gianni Rondinini | last post by:
hi all. please excuse the misusage of some tech terms, but writing in english is not as easy as in italian :) i'm designing our new website and, since i want to do something that will last as...
29
by: Michael Bulatovich | last post by:
Is there a way to use CSS to format "plain" text in an html document. By plain I mean text which is not contained by <por <h#tags. Is there no way to control how this stuff is rendered? tia
10
by: Robert Huff | last post by:
Can someone offer suggestions why, on the same server (Apache 2.2.8), this works <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"> <html lang="en-US"> <head> <link rel=stylesheet...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.