Become a fan of Slashdot on Facebook

 



Forgot your password?
typodupeerror
×

The NSFW HTML Attribute 273

phaln writes "Over at The Frosty Mug Revolution, PJ Doland makes a compelling case for a new HTML attribute in the spirit of the highly-regarded 'nofollow' attribute promoted by Google — the NSFW attribute (rel='nsfw'). His original idea has been refined and expanded by positive comments from readers, resulting in a semantic solution to the issue he raises in the original post. From the article: 'Content creators can apply the attribute to paragraph tags, div tags, or any other block-level element. Doing so will indicate that the enclosed content is not safe for work. Visitors will be able to configure their browsers to block display of just the content enclosed by the flagged block-level element. This isn't about censorship. It is about making us all less likely to accidentally click on a goatse.cx link when our boss is standing behind us. It is also about making us feel more comfortable posting possibly objectionable content by giving visitors a means of easily filtering that content.'"
This discussion has been archived. No new comments can be posted.

The NSFW HTML Attribute

Comments Filter:
  • ambiguous (Score:4, Informative)

    by j00r0m4nc3r ( 959816 ) on Friday December 29, 2006 @09:49AM (#17397580)
    NSFW doesn't really have a concrete meaning. What's safe in one workplace may not be safe in another.
  • by kurtmckee ( 870398 ) on Friday December 29, 2006 @09:54AM (#17397628) Homepage
    The rel attribute is designed to specify a forward relationship with the current document. Google broke that when they proposed 'nofollow' (a nice idea that does not appear to have solved the spam problem except for Google's spidering of blogs). Further, you can't add it to images and paragraphs and everything else this guy is envisioning. The rel attribute is only applicable to a and link tags, and to use it otherwise deviates from the XHTML spec.
  • Re:uh.. what? (Score:5, Informative)

    by Bogtha ( 906264 ) on Friday December 29, 2006 @10:59AM (#17398194)

    This relies on the people making links to use the NSFW tag or the guys making content to use it. Frankly, I don't see it ever being used properly.

    There's plenty of places where NSFW is specified in link text already. This is just a way of making it machine-readable.

    how about a universal close tag for the last opened tag

    Such shortcuts [w3.org] have already existed since HTML 2 [ietf.org]. These have been universally ignored by browser developers.

  • by Zarel ( 900479 ) on Friday December 29, 2006 @12:24PM (#17399086)

    There are instances where elements can be nested not in the order they are opened. For example, having an underlined and bolded sequence intersect would be such a case:
     
    <i>this <b>is a</i> test sequence</b>
     
    It seems silly, but it is valid html that doesn't perfectly nest as would be required for a universal close tag.
    That's not valid HTML at all, and would fail the W3C's validator. The correct way to do something like that would be:

    <i>this <b>is a</b></i> <b>test sequence</b>
  • by Anonymous Coward on Friday December 29, 2006 @01:11PM (#17399720)

    Please, just stop. You clearly don't know anything about HTML. The markup produces a tree. In all cases. Elements don't overlap the way you think they do, and that makes everything you are saying incorrect. The new paragraph should not be bold (yes, some browsers get this wrong). Your example is not ambiguous at all precisely because elements don't overlap.

    there are tags that can, but do not require closing

    You are talking about element types, not tags. And you are wrong, every element is always closed. You just don't always need tags to do it. You have assumed that elements remain open when there is no closing tag, and that is why you think that elements overlap. They don't. When an opening tag is encountered that is not in the content model of the parent element, then the parent element is implicitly closed.

  • by Anonymous Coward on Friday December 29, 2006 @01:18PM (#17399826)
    Please submit a single example of a government mandated HTML tag.

    See US Code Title 18, Part 1, Chapter 110, $2257 [cornell.edu], Record keeping requirements.

    Basically, if you don't link (or embed) information of who is and how to contact the custodian of records, you risk 5 years hard time.
  • by SatanicPuppy ( 611928 ) * <Satanicpuppy.gmail@com> on Friday December 29, 2006 @01:35PM (#17400052) Journal
    I'll call bullshit on that one...Having to have, on your porn site, a link telling the federal investigators who to contact to procure the legally mandated age records of your "models" isn't at all, or in any way, a legally mandated HTML tag.

    The same information would have to be available on any printed publication or movie.
  • by Junta ( 36770 ) on Friday December 29, 2006 @01:49PM (#17400296)
    Ugh, fine, replace bold with a LI. LI can legally have P as a child, so a generic close tag followed only by a open LI and open P tag could refer to either. since an LI does not have to be closed (explicitly or implicitly) before P opens. You have a P nested in an LI and you ask to close something, the browser doesn't know without future context. You've changed the task of the parser to require look ahead rather than knowing what it is doing based on parsing done so far, and the parser has to evaluate things more carefully in the context of the HTML nesting rules. Add to that there may be cases I can't readily produce where a reasonable guess about which tag is being closed is impossible (in the LI, P case, if the close tag had anything other than LI, it would have to be a close P tag I think, since UL/OL can't have anything but LI nested underneath, and a new LI or close UL/OL would mean both closed regardless of which explicitly closed). The short of it is, HTML dictated closing tags that match opening tags, and HTML has never been explicitly designed since to handle the concept of generic closing, and some concepts exist that would break.

    When I say do not require closing, it is clear I mean does not require explicit closing. implicit closing is a given.

    Anyway, if anything, the examples show how much more complicated an HTML parser has to be to evaluate generic close tags.
  • by Jugalator ( 259273 ) on Friday December 29, 2006 @01:53PM (#17400352) Journal
    Talk about totally missing out on the already existing adult content rating standards.

    Instead of inventing something redundant here, just have browsers installed at work block access to pages rated as "breast exposure", or whatever. There is already a standard with very fine-grained control of exactly what a web page contains, if it's "visible sexual touching", language, or whatever, and the administration can then decide on exactly what they wish to allow. You can even tell that it's "nudity, but in a medical context" if you intend to loosen up the regulations in special cases.

    http://www.icra.org/label/generator/ [icra.org]

    ICRA is supported by Internet Explorer and while strangely enough Firefox don't seem to have built-in support for these schemes to aid for website classification, there should be extensions like ViQ for Firefox [unimi.it] to add this support, although I haven't tested it.

    Of course, few sites today use this system well, but that's still being vastly better off than inventing some new inflexible "nsfw" HTML attribute, and modifying the HTML standard. Wow...
  • Re:Good idea (Score:5, Informative)

    by KillerCow ( 213458 ) on Friday December 29, 2006 @10:42PM (#17405562)
    It's been done before and is not a new idea.

    PICS labels [w3.org] have been around since 1996, and were proposed [w3.org] to label for language, violence, and sexual content (among others).

    ASACP RTA [asacp.org] is another labelling scheme from 1996.

    ICRA labels [icra.org] have been doing the same since 1999.

    RTA and ICRA are in active use today. PICS fell mostly away (to my knowledge) -- probably because it wasn't just for filtering, but for any kind of content tagging. Being a general solution doesn't get the "save the children" mouth-breathers behind you.

    The problem with the rel=nsfw is that it is binary. I can't establish any kind of scale for what I want to see (nudity is okay, sex acts are not), and it only filters in one dimension (I can't say that I am okay with sex, but not with violence, or vice-versa for the U.S.A.).

Get hold of portable property. -- Charles Dickens, "Great Expectations"

Working...