473,668 Members | 2,508 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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">te xt text</p><p class="line">te xt text</p>
http://jaspoid.com/blogtests/p-line

Jan 17 '07 #1
5 2341

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.engli sh 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.co mwrote:
<style>
p.line {margin: 0em;}
</style>

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

<!-- To -->
<p class="line">te xt text</p><p class="line">te xt 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****@stanford alumni.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><elemen t></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
3714
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 bug? Can someone excellent to tell me the reason. best wishes
23
4074
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 <foo/>) From XHTML specification:
17
8507
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" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> There are many errors returned at the W3C validator but the first one has me stumped. It's my stylesheet link tag. <LINK REL="stylesheet" HREF="styles.css" type="text/css">
9
6044
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 value="1">test</option> </select>
11
1820
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 find at: http://michaelsremarks.com Because I want it to have good xhtml and css, I also posted a similar message (concerning css) into the authoring.stylesheets-group.
11
4204
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 way? -tt.
22
2855
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 long as possible and since i'm not in a hurry at all, i wanted to use the most up-to-date authoring language. i use quite a lot html 4.01 in the past, then i recently read carefully the xhtml 1.0 specifications on the w3.org website --just few...
29
5096
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
2067
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 type="text/css" href="proj_default.css" title="ss_default"> <title>Testing html</title> </head>
0
8462
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8381
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8893
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8583
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8656
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7401
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5681
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4205
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
1786
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.